Esempio n. 1
0
 public bool Update(InvoiceItemFg obj)
 {
     try
     {
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 public int Add(InvoiceItemFg obj)
 {
     try
     {
         _db.InvoiceItemFgs.InsertOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(-1);
     }
     return(_db.InvoiceItemFgs.Max(x => x.InvoiceItemFgId));
 }