Ejemplo n.º 1
0
        public ActionResult DataVerify(long Key)
        {
            if (!CanRead)
            {
                return(GotoErrorPage(CannotReadText));
            }
            var service    = Container.GetService <IDataService>();
            var detailInfo = new DataVerifyDetailInfo();
            var dataitem   = service.GetModels(d => d.keyid == Key).FirstOrDefault();

            if (dataitem != null)
            {
                detailInfo.Data = DataInfo.ConvertToDataInfo(dataitem);
                var stepservice = Container.GetService <IDataVerifyStepService>();
                var steps       = stepservice.GetVModels(Key).ToList();
                detailInfo.Steps = DataVerifyStepInfo.ConvertToDataVerifyStepInfos(steps);
            }
            //PDF的页面也其他三个不同,所以另外返回
            if (detailInfo.Data.DataTypeKey == (int)DataTypeEnum.PDF)
            {
                return(View("PDFVerify", detailInfo));
            }
            else
            {
                return(View(detailInfo));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 审核步骤详情
        /// </summary>
        /// <param name="Key"></param>
        /// <returns></returns>
        public ActionResult DataVerifyDetails(long Key)
        {
            if (!CanRead)
            {
                return(GotoErrorPage(CannotReadText));
            }
            //获取步骤详情
            var service = Container.GetService <IDataVerifyStepService>();
            var cnt     = service.GetVModels(Key).Count();
            var items   = service.GetVModels(Key).ToList();
            var infos   = DataVerifyStepInfo.ConvertToDataVerifyStepInfos(items);

            return(View(infos));
        }
Ejemplo n.º 3
0
        public ActionResult DataVerify(DataVerifyStepInfo info)
        {
            var result = new AjaxResult();

            if (CanUpdated && CanCreated)
            {
                if (info.Key > 0)
                {
                    var service = Container.GetService <IDataVerifyStepService>();
                    var item    = service.GetModels(vf => vf.C_DataId == info.Key).AsEnumerable().LastOrDefault();
                    if (item != null)
                    {
                        item.C_UserId      = userDto.User.keyid;
                        item.C_Advice      = info.Advice;
                        item.C_State       = info.State;
                        item.C_UpdatedDate = DateTime.Now;
                        result.State       = service.Update(item);
                    }
                    else
                    {
                        result.Message = "审核失败,不存在的步骤!!!";
                    }
                    if (result.State)
                    {
                        result.Message = "操作成功";
                    }
                    else
                    {
                        result.Message = "操作失败";
                    }
                }
                else
                {
                    result.Message = "dataKey不能小0";
                }
            }
            else
            {
                result.Message = "你没有审核权限,请联系管理员开通,审核权限: 添加+修改";
            }
            return(Json(result));
        }