コード例 #1
0
        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"));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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"));
        }