public ActionResult AddShiftToEmployee(int Id) { ViewBag.shifts = new SelectList(shiftBL.GetShiftData(), "ID", "ID"); Employee_Shift model = new Employee_Shift(); model.Employee_ID = Id; return(View("AddNewShift", model)); }
public ActionResult AddShiftToEmployee(Employee_Shift employeeShift) { //reducing the credit from the User Credits if (loginBl.ReduceCredit((string)Session["username"]) == false) { return(RedirectToAction("Logout", "HomePage")); } employeeBL.AddNewShiftToEmployee(employeeShift); return(RedirectToAction("GetEmployeeList")); }