Пример #1
0
        public IActionResult OnPostQueryTecDayCourse(string date)
        {
            ResultList <RTecCourse> result = new ResultList <RTecCourse>();

            try
            {
                var us = GetUserSession(false);
                if (us != null)
                {
                    NLogHelper.InfoTxt($"QueryTecDayCourse TecCode:{us.TecCode}");
                    result.List = _TecSrv.GetOneDayCourse(us.TecCode, date);
                }
                else
                {
                    result.IntMsg   = -1;
                    result.ErrorMsg = "请重新登陆";
                }
            }
            catch (Exception ex)
            {
                result.ErrorMsg = "未能获取数据!请联系管理员或稍后再试";
                NLogHelper.ErrorTxt(ex.Message);
            }
            return(new JsonResult(result));
        }
Пример #2
0
        public IActionResult OnPostQueryOneDayCourse(string tecCode, DateTime date)
        {
            ResultList <RTecCourse> result = new ResultList <RTecCourse>();

            try
            {
                result.List = _TecSrv.GetOneDayCourse(tecCode, date);
                foreach (var c in result.List)
                {
                    c.CoursingStatusName = BaseEnumSrv.GetCoursingStatusName(c.CoursingStatus);
                }
            }
            catch (Exception ex)
            {
                result.ErrorMsg = ex.Message;
            }

            return(new JsonResult(result));
        }