public void AddCTHDThuoc(DTO_CTHDThuoc cTHDThuoc) { using (var context = new SQLServerDBContext()) { context.CTHoaDdonThuoc.Add(cTHDThuoc); context.SaveChanges(); } }
public bool LoadNPThuoc(DTO_CTHDThuoc cTHDThuoc) { try { using (var context = new SQLServerDBContext()) { context.CTHoaDdonThuoc.Attach(cTHDThuoc); var entry = context.Entry(cTHDThuoc); if (!entry.Reference(p => p.Thuoc).IsLoaded) { entry.Reference(p => p.Thuoc).Load(); } return(true); } } catch (Exception e) { Debug.WriteLine($"[ERRROR DAL BENH] {e.Message}"); return(false); } }
public void AddCTHDThuoc(DTO_CTHDThuoc cTHDThuoc) { DALManager.CTHDThuocDAL.AddCTHDThuoc(cTHDThuoc); }
public bool LoadNP_Thuoc(DTO_CTHDThuoc cTHDThuoc) { return(DALManager.CTHDThuocDAL.LoadNPThuoc(cTHDThuoc)); }
public bool LoadNP_HoaDon(DTO_CTHDThuoc cTHDThuoc) { return(DALManager.CTHDThuocDAL.LoadNPHoaDon(cTHDThuoc)); }