Beispiel #1
0
        public ActionResult Fiter(StoreRequestParameters parameters, string date, string state, string solved, string name = "")
        {
            var exception = new PunchedExceptionModle()
            {
                Name = name, Date = null, State = PunchedException.Exception, Solved = false
            };
            DateTime dateTime;

            if (DateTime.TryParse(date, out dateTime))
            {
                exception.Date = dateTime;
            }
            int attendState;

            if (int.TryParse(state, out attendState))
            {
                exception.State = (PunchedException)attendState;
            }
            bool attendSolved;

            if (bool.TryParse(solved, out attendSolved))
            {
                exception.Solved = attendSolved;
            }

            return(this.Store(exception.Exceptions.GetPage(parameters)));
        }
Beispiel #2
0
 public ActionResult Submit(PunchedExceptionModle form, string id)
 {
     form.Id = id;
     if (form.DealException())
     {
         X.Msg.Alert("页面消息", "操作成功!", "parent.App.win.close();").Show();
     }
     else
     {
         X.Msg.Alert("页面消息", "操作失败!").Show();
     }
     X.AddScript("parent.App.storedata.reload();");
     return(this.Direct());
 }
Beispiel #3
0
        public ActionResult Attend(string id, string userid)
        {
            var exception = new PunchedExceptionModle()
            {
                Id = id, EmployeeId = userid
            };

            if (exception.AttendValidRecords != null)
            {
                exception.Date = exception.AttendValidRecords.AttendTime;
                return(View(exception));
            }
            else
            {
                return(View("Error"));
            }
        }