public ActionResult ClockOut(ClockinClockOut Model) { if (Session["username"] == null) { return(RedirectToAction("Login")); } Model.UserName = Session["username"] as string; dal.ClockOut(Model.UserName); // return(RedirectToAction("Main")); }
public ActionResult Clock(string username) { if (Session["username"] == null) { return(RedirectToAction("Login")); } ClockinClockOut clk = new ClockinClockOut(); username = Session["username"] as string; clk.CanClockIn = dal.CanClockIn(username); clk.UserName = username; return(View("Clock", clk)); }
public ActionResult ClockIn(ClockinClockOut model) { if (Session["username"] == null) { return(RedirectToAction("Login")); } TimeCard tc = new TimeCard(); tc.Username = Session["username"] as string; tc.Notes = model.Notes; dal.ClockIn(tc); // return(RedirectToAction("Main")); }