Exemplo n.º 1
0
 public COMPTA_CustomerJournalLine CreateCustomerJournalLine(COMPTA_CustomerJournalLine customerJournalLineToAdd)
 {
     using(SUPERPEntities context = new SUPERPEntities(false))
     {
         var customerJournalLine = context.COMPTA_CustomerJournalLine.Add(customerJournalLineToAdd);
         context.SaveChanges();
         return customerJournalLine;
     }
 }
Exemplo n.º 2
0
        public COMPTA_CustomerJournalLine EditCustomerJournalLine(COMPTA_CustomerJournalLine customerJournalLineToEdit)
        {
            using(SUPERPEntities context = new SUPERPEntities(false))
            {
                var customerJournalLine = context.COMPTA_CustomerJournalLine.Find(customerJournalLineToEdit.id);

                if (customerJournalLine == null)
                    return null;

                customerJournalLine = customerJournalLineToEdit;
                context.SaveChanges();
                return customerJournalLine;
            }
        }