Ejemplo n.º 1
0
        public ActionResult GetAssign(string beginTime, string endTime, string department)
        {
            if (beginTime == "" || endTime == "")
            {
                this.ShowNotification(NotificationType.Error, "请填写日期!");
                return(null);
            }
            if (department == "")
            {
                this.ShowNotification(NotificationType.Error, "请填写部门!");
                return(null);
            }
            try
            {
                var begin = DateTime.Parse(beginTime);
                var end   = DateTime.Parse(endTime);
            }
            catch (Exception e)
            {
                this.ShowNotification(NotificationType.Error, "请填写正确日期!");
                return(null);
            }
            GetTimeSheetParameter gt = new GetTimeSheetParameter()
            {
                BeginTime = Convert.ToDateTime(Convert.ToDateTime(beginTime).ToString("yyyy-MM-dd")), EndTime = Convert.ToDateTime(Convert.ToDateTime(endTime).ToString("yyyy-MM-dd")), Dpartment = Convert.ToInt32(department)
            };
            var res = _byTeamTimeSheetServer.GetList(gt);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
 public List <SpRPTGetTimeSheetByTeam> GetList(GetTimeSheetParameter _byTeam)
 {
     return(_rptGetTimeSheet.ExecuteStoredProcedure(SpRPTGetTimeSheetByTeam.NAME,
                                                    SpRPTGetTimeSheetByTeam.Parameters(_byTeam)).ToList());
 }