コード例 #1
0
        public ActionResult StaffUpdate(TblStaff p)
        {
            var staff = db.TblStaff.Find(p.ID);

            staff.Staff = p.Staff;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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
     });
 }