Esempio n. 1
0
        public bool Delete(int Id)
        {
            try
            {
                tbl = db.tbl_DeXuat_KT.Find(Id);

                db.tbl_DeXuat_KT.Remove(tbl);
                db.SaveChanges();
                return true;
            } catch
            {
                return false;
            }
        }
Esempio n. 2
0
        public bool Update(DeXuatChiTietModel m)
        {
            try
            {
                
                tbl = db.tbl_DeXuat_KT.Find(m.Id);
                tbl.Ten = m.Ten;
                tbl.Mo_Ta = m.Mo_Ta;
                tbl.SoLuong = m.SoLuong;
                tbl.DVT = m.DVT;
                tbl.Ghi_Chu = m.Ghi_Chu;

                db.SaveChanges();
                return true;
            }
            catch
            {
                return false;
            }
        }
Esempio n. 3
0
 public DeXuatChiTietDao()
 {
     db = new EFDbContext();
     tbl = new tbl_DeXuat_KT();
 }