예제 #1
0
 public bool Update(PositionModel model)
 {
     try
     {
         tbl_CV tbl = new tbl_CV();
         tbl.Ma_CV           = model.Ma_CV;
         tbl.Ten_CV          = model.Ten_CV;
         tbl.Display         = model.Display;
         db.Entry(tbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 public bool Save(PositionModel model)
 {
     try
     {
         tbl_CV tbl = new tbl_CV();
         tbl.Ma_CV   = model.Ma_CV;
         tbl.Ten_CV  = model.Ten_CV;
         tbl.Display = model.Display;
         db.tbl_CV.Add(tbl);
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }