Beispiel #1
0
        /// <summary>
        /// 获取所有案例信息
        /// </summary>
        /// <returns></returns>
        public string GetAllCase()
        {
            string userId                  = Session["userId"].ToString();
            List <RegisterInfo>  list      = IRegisterInfo.GetAllCaseInfo(userId);
            List <RegisterModel> modelList = new List <RegisterModel>();

            foreach (RegisterInfo item in list)
            {
                RegisterModel model = new RegisterModel();
                model.BeSeekerName   = item.BeSeekerName;
                model.CaseCode       = item.CaseCode;
                model.getTaskDate    = item.GetTaskDateTime.ToShortDateString();
                model.IsBBHJ         = item.IsBBHJ;
                model.IsReturnTask   = item.IsReturnTask;
                model.PostLink       = item.PostLink;
                model.RegisterInfoId = item.RegisterInfoID;
                model.RegisterLink   = item.RegisterLink;
                model.Remarks        = item.Remarks;
                model.SRTypeId       = item.SRTypeID;
                model.SRTypeName     = item.SRType.SRTypeName;
                model.Title          = item.Title;
                modelList.Add(model);
            }
            RegisterCaseInfo data = new RegisterCaseInfo()
            {
                code  = 0,
                count = modelList.Count,
                data  = modelList,
                msg   = ""
            };

            return(JsonConvert.SerializeObject(data));
        }
Beispiel #2
0
        /// <summary>
        /// 获取所有案例信息
        /// </summary>
        /// <returns></returns>
        public string GetAllCase(int page, int limit, string whereStr)
        {
            int pageCount;
            // 案例类别下拉列表
            List <SelectListItem>       itemList = new List <SelectListItem>();
            Dictionary <string, string> whereDic = null;

            if (!string.IsNullOrEmpty(whereStr))
            {
                whereDic = JsonConvert.DeserializeObject <Dictionary <string, string> >(whereStr);
            }
            string userId = Session["userId"].ToString();
            List <RegisterModel>     list      = IRegisterInfo.GetAllCaseInfo(userId, page, limit, whereDic, out pageCount);
            List <RegisterViewModel> modelList = new List <RegisterViewModel>();

            foreach (RegisterModel item in list)
            {
                RegisterViewModel model = new RegisterViewModel();
                model.BeSeekerName   = item.RegisterInfo.BeSeekerName;
                model.CaseCode       = item.RegisterInfo.CaseCode;
                model.getTaskDate    = item.RegisterInfo.GetTaskDateTime.ToShortDateString();
                model.IsBBHJ         = item.RegisterInfo.IsBBHJ.ToString();
                model.IsReturnTask   = item.RegisterInfo.IsReturnTask;
                model.PostLink       = item.RegisterInfo.PostLink;
                model.RegisterInfoId = item.RegisterInfo.RegisterInfoID;
                model.RegisterLink   = item.RegisterInfo.RegisterLink;
                model.Remarks        = item.RegisterInfo.Remarks;
                model.SRTypeName     = item.SRTypeName;
                model.Title          = item.RegisterInfo.Title;
                modelList.Add(model);
            }
            RegisterCaseInfo data = new RegisterCaseInfo()
            {
                code  = 0,
                count = pageCount,
                data  = modelList,
                msg   = ""
            };

            return(JsonConvert.SerializeObject(data));
        }
Beispiel #3
0
        public string GetSuccessCaseList(int page, int limit, string whereStr)
        {
            string userId    = Session["userId"].ToString();
            int    pageCount = 0;
            Dictionary <string, string> whereDic = null;

            if (!string.IsNullOrEmpty(whereStr))
            {
                whereDic = JsonConvert.DeserializeObject <Dictionary <string, string> >(whereStr);
            }
            List <RegisterModel> registerInfoList         = ISuccessCase.GetList(userId, page, limit, whereDic, out pageCount);
            List <SRIS.ViewModels.RegisterViewModel> list = new List <ViewModels.RegisterViewModel>();

            foreach (RegisterModel item in registerInfoList)
            {
                SRIS.ViewModels.RegisterViewModel model = new ViewModels.RegisterViewModel();
                model.BeSeekerName    = item.RegisterInfo.BeSeekerName;
                model.CaseCode        = item.RegisterInfo.CaseCode;
                model.getTaskDate     = item.RegisterInfo.GetTaskDateTime.ToString("D");
                model.GetTaskDateTime = item.RegisterInfo.GetTaskDateTime;
                model.PostLink        = item.RegisterInfo.PostLink;
                model.RegisterInfoId  = item.RegisterInfo.RegisterInfoID;
                model.RegisterLink    = item.RegisterInfo.RegisterLink;
                model.Remarks         = item.RegisterInfo.Remarks;
                model.SRTypeName      = item.SRTypeName;
                model.Title           = item.RegisterInfo.Title;
                list.Add(model);
            }
            RegisterCaseInfo info = new RegisterCaseInfo()
            {
                code  = 0,
                count = pageCount,
                data  = list,
                msg   = ""
            };

            return(JsonConvert.SerializeObject(info));
        }