public ActionResult Add(LogTimeModel model)
 {
     try
     {
         var logtime = LogTimeModelIMapper.MapToLogTime(model);
         LogTimeHandler.Add(logtime);
     }
     catch (Exception ex)
     {
         model.Error = ex.Message;
         return(View("Add", model));
     }
     return(RedirectToAction("Index"));
 }
Exemple #2
0
        public ActionResult Add(ProfileLogModel model, string command)
        {
            LogTime log = new LogTime();

            log.IsInTime   = command == "Click here to Login Time";
            log.LogType    = model.LogType;
            log.LoggedTime = model.LogDate;

            var user = (User)Session[Constants.LoggedInUserName];

            log.EmployeeID = user.EmployeeID;

            LogTimeHandler.Add(log);
            return(RedirectToAction("Index"));
        }