public bool Update(InvoiceCoaItem obj) { try { _db.SubmitChanges(); } catch (Exception ex) { Debug.Print(ex.Message); return(false); } return(true); }
public int Add(InvoiceCoaItem obj) { try { _db.InvoiceCoaItems.InsertOnSubmit(obj); _db.SubmitChanges(); } catch (Exception ex) { Debug.Print(ex.Message); return(-1); } return(_db.InvoiceCoaItems.Max(x => x.InvoiceCoaItemId)); }