//DeleteCanBo public void DeleteCanBo(BangCanBo canBo) { BangCanBo CanBo = db.BangCanBoes.SingleOrDefault(x => x.CanBoID == canBo.CanBoID); if (canBo == null) { } else { db.BangCanBoes.Remove(canBo); } }
//PostCanBo public void PostCanBo(BangCanBo canBo) { if (canBo == null) { //return92 } else { db.BangCanBoes.Add(canBo); db.SaveChanges(); } //return }
//UpdateCanBo public void UpdateCanBo(BangCanBo canBo) { BangCanBo CanBo = db.BangCanBoes.SingleOrDefault(x => x.CanBoID == canBo.CanBoID); if (canBo == null) { } else { CanBo.HoTen = canBo.HoTen; CanBo.NgaySinh = canBo.NgaySinh; CanBo.DonVi = canBo.DonVi; canBo.ChucVu = canBo.ChucVu; } }