public void Clone <T>(T obj) where T : class, IModel { T_TranJournal objdata = obj as T_TranJournal; this.TranJournalId = objdata.TranJournalId; this.JournalNo = objdata.JournalNo; this.CompanyId = objdata.CompanyId; this.AmountType = objdata.AmountType; this.VoucherDate = objdata.VoucherDate; this.RefNo = objdata.RefNo; this.DebitPartyId = objdata.DebitPartyId; this.CreditPartyId = objdata.CreditPartyId; this.DebitNarration = objdata.DebitNarration; this.CreditNarration = objdata.CreditNarration; this.Amount = objdata.Amount; this.LUT = objdata.LUT; this.CreditAccountName = objdata.CreditAccountName; this.DebitAccountName = objdata.DebitAccountName; }
public T Copy <T>() where T : class, IModel, new() { T obj = new T(); T_TranJournal objdata = obj as T_TranJournal; objdata.TranJournalId = this.TranJournalId; objdata.JournalNo = this.JournalNo; objdata.CompanyId = this.CompanyId; objdata.AmountType = this.AmountType; objdata.VoucherDate = this.VoucherDate; objdata.RefNo = this.RefNo; objdata.DebitPartyId = this.DebitPartyId; objdata.CreditPartyId = this.CreditPartyId; objdata.DebitNarration = this.DebitNarration; objdata.CreditNarration = this.CreditNarration; objdata.Amount = this.Amount; objdata.LUT = this.LUT; objdata.CreditAccountName = this.CreditAccountName; objdata.DebitAccountName = this.DebitAccountName; return(obj); }