예제 #1
0
 public bool Insert(DM_DON_VI entity)
 {
     try
     {
         db.DM_DON_VI.Add(entity);
         db.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
예제 #2
0
 public bool Update(DM_DON_VI entity)
 {
     try
     {
         var dv = db.DM_DON_VI.Find(entity.DV_ID);
         dv.DV_MA      = entity.DV_MA;
         dv.DV_TEN     = entity.DV_TEN;
         dv.DV_GHI_CHU = entity.DV_GHI_CHU;
         db.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }