public bool AddImportBill_Detail(import_bill_detail i) { try { using (QLBH_PHONE_ENTITY data = new QLBH_PHONE_ENTITY()) { data.import_bill_detail.Add(i); data.SaveChanges(); return(true); } } catch (Exception e) { Debug.WriteLine(e); return(false); } }
public bool UpdateImportBill_Detail(import_bill_detail i) { try { using (QLBH_PHONE_ENTITY data = new QLBH_PHONE_ENTITY()) { data.Entry(i).State = EntityState.Modified; data.SaveChanges(); return(true); } } catch (Exception e) { Debug.WriteLine(e); return(false); } }