public ActionResult StaffUpdate(TblStaff p) { var staff = db.TblStaff.Find(p.ID); staff.Staff = p.Staff; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult StaffAdd(TblStaff p) { if (!ModelState.IsValid) { return(View("StaffAdd")); } db.TblStaff.Add(p); db.SaveChanges(); return(RedirectToAction("Index")); }
public AddClientBranchRegisterDTO AddNewCBR(TblStaff staff, TblClient client, TblBranch branch) { // create AddClientBranchRegisterDTO return(new AddClientBranchRegisterDTO { StaffNo = staff.StaffNo, BranchNo = branch.BranchNo, ClientNo = client.ClientNo }); }