예제 #1
0
 public COMPTA_BankJournalLine CreateBankJournalLine(COMPTA_BankJournalLine bankJournalLineToAdd)
 {
     using(SUPERPEntities context = new SUPERPEntities(false))
     {
         var bankJournalLine = context.COMPTA_BankJournalLine.Add(bankJournalLineToAdd);
         context.SaveChanges();
         return bankJournalLine;
     }
 }
예제 #2
0
        public COMPTA_BankJournalLine EditBankJournalLine(COMPTA_BankJournalLine bankJournalLineToEdit)
        {
            using(SUPERPEntities context = new SUPERPEntities(false))
            {
                var bankJournalLine = context.COMPTA_BankJournalLine.Find(bankJournalLineToEdit.id);

                if (bankJournalLine == null)
                    return null;

                bankJournalLine = bankJournalLineToEdit;
                context.SaveChanges();
                return bankJournalLine;
            }
        }