TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suman goud
NA
176
53.8k
How to insert data in two rows (debit and credit) on save
Aug 16 2016 5:52 AM
i have two dropdowns and amount in my page
1.Account
2.ContraAccount
3.Amount
when i save this details i want to insert in database like,
Amount should debit from Account(1 row),and amount should credit in another account(2nd row)
Account ContrAccoutn Debit Credit
Cash A 100 0
A Cash 0 100
my controller code
var Ledger = db.LedgerTables.Create();
Ledger.AccountID = strddlAccount;
Ledger.ContraAccountID = strddlCustomer;
Ledger.Debit = transactionGInfo.Amount;
db.LedgerTables.Add(Ledger);
db.SaveChanges();
Reply
Answers (
3
)
EntityFramework
which is better mcpd or mcse........?? pls anyone tell