Esempio n. 1
0
 public bool ADDLoaiDocGia(LoaiDocGiaDtos LoaiDG)
 {
     try
     {
         using (var db = new QuanLyThuVienEntities())
         {
             int ID = LoaiDocGiaDAO.Instance.IDPlus();
             db.LOAIDOCGIAs.Add(new LOAIDOCGIA()
             {
                 IDLoaiDG  = ID,
                 TenLoaiDG = LoaiDG.TenLoaiDG,
             });
             db.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 2
0
 //add form LoaiDocGia
 public void ADDLoaiDocGia(LoaiDocGiaDtos LoaiDG)
 {
     this._LoaiDocGia.ADDLoaiDocGia(LoaiDG);
 }