public static BaseLedgerPostingModel ToBaseLedgerPosting(this LedgerPosting ledgerPosting) { BaseLedgerPostingModel _result = new BaseLedgerPostingModel(); _result.Id = ledgerPosting.Id; _result.Date = ledgerPosting.Date; _result.VoucherTypeId = ledgerPosting.VoucherTypeId; _result.VoucherNumber = ledgerPosting.VoucherNumber; _result.LedgerId = ledgerPosting.LedgerId; _result.Debit = ledgerPosting.Debit; _result.Credit = ledgerPosting.Credit; _result.DetailsId = ledgerPosting.DetailsId; _result.FinancialYearId = ledgerPosting.FinancialYearId; _result.InvoiceNumber = ledgerPosting.InvoiceNumber; _result.Text = ledgerPosting.Text; _result.ChequeNumber = ledgerPosting.ChequeNumber; _result.ChequeDate = ledgerPosting.ChequeDate; _result.CreatedDate = ledgerPosting.CreatedDate; _result.ModifiedDate = ledgerPosting.ModifiedDate; return(_result); }
public static LedgerPosting ToLedgerPosting(this BaseLedgerPostingModel ledgerPosting) { LedgerPosting _result = new LedgerPosting(); if (ledgerPosting.Id.HasValue) { _result.Id = ledgerPosting.Id.GetValueOrDefault(); } _result.Date = ledgerPosting.Date; _result.VoucherTypeId = ledgerPosting.VoucherTypeId; _result.LedgerId = ledgerPosting.LedgerId; _result.Debit = ledgerPosting.Debit; _result.Credit = ledgerPosting.Credit; _result.DetailsId = ledgerPosting.DetailsId; _result.FinancialYearId = ledgerPosting.FinancialYearId; _result.InvoiceNumber = ledgerPosting.InvoiceNumber; _result.Text = ledgerPosting.Text; _result.ChequeNumber = ledgerPosting.ChequeNumber; _result.ChequeDate = ledgerPosting.ChequeDate; return(_result); }