Exemplo n.º 1
0
        public ActionResult ClockIn(ClockInOutModel input)
        {
            TimeCardModel m = new TimeCardModel();

            m.UserName = input.Username;
            m.Project  = input.Project;
            dal.SaveNewRecord(m);
            return(RedirectToAction("Report"));
        }
Exemplo n.º 2
0
        public ActionResult ClockOut(ClockInOutModel input)
        {
            TimeCardModel m = new TimeCardModel();

            m.UserName = input.Username;
            m.Notes    = input.Note;

            dal.ClockOut(m);
            return(RedirectToAction("Report"));
        }
Exemplo n.º 3
0
        public ActionResult ClockInOut(string username, string note)
        {
            var model = new ClockInOutModel();

            model.Username      = username;
            Session["username"] = model.Username;
            model.Note          = note;
            Session["notes"]    = model.Note;
            model.CanClockIn    = !dal.CanClockOut(model.Username);;
            return(View("ClockInOut", model));
        }