예제 #1
0
 public bool Update(TeamModel model)
 {
     try
     {
         tbl_TO tbl = new tbl_TO();
         tbl.Ma_TO           = model.Ma_TO;
         tbl.Ten_TO          = model.Ten_TO;
         tbl.Ma_BP           = model.Ma_BP;
         db.Entry(tbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 public bool Save(TeamModel model)
 {
     try
     {
         tbl_TO tbl = new tbl_TO();
         tbl.Ma_TO  = model.Ma_TO;
         tbl.Ten_TO = model.Ten_TO;
         tbl.Ma_BP  = model.Ma_BP;
         db.tbl_TO.Add(tbl);
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }