예제 #1
0
        public ActionResult Delete(string ids)
        {
            Result <int> result = new Result <int>();
            List <long>  list   = ids.SplitString(",").ToLongList();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.DeleteAdPutRecordByIds(list);
            }
            return(Json(result.ToResultView()));
        }
예제 #2
0
        public ActionResult Edit(long id)
        {
            Result <Epm_Template> result = new Result <Epm_Template>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetTemplateModel(id);
            }
            Helper.IsCheck(HttpContext, GetModule(result.Data.TemplateTypeName + "模板"), SystemRight.Add.ToString(), true);
            return(View(result.Data));
        }
예제 #3
0
        public ActionResult DeleteDetails(string ids)
        {
            Result <int> result = new Result <int>();
            var          list   = ids.SplitString(",").ToLongList();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.DeleteTemplateDetailsByIds(list);
            }
            return(Json(result.ToResultView()));
        }
예제 #4
0
        /// <summary>
        /// 修改批复构成
        /// </summary>
        /// <returns></returns>
        public ActionResult Edit(long id)
        {
            Result <Epm_WorkMainPoints> result = new Result <Epm_WorkMainPoints>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetWorkMainPointsModel(id);
            }
            GetWorkMainPoints(false, result.Data.DicKey);
            return(View(result.Data));
        }
예제 #5
0
        public ActionResult Add(Epm_Constitute model)
        {
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                model.IsCharging = model.IsCharging.HasValue ? model.IsCharging.Value : false;
                result           = proxy.AddConstitute(model);
            }
            return(Json(result.ToResultView()));
        }
예제 #6
0
        public ActionResult GetTemplateDetailsTree(long TemplateId, long pId = 0, bool last = true, string chk = "")
        {
            Result <List <Epm_TemplateDetails> > result = new Result <List <Epm_TemplateDetails> >();
            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            if (TemplateId == 0)
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "TemplateId";
                ce.ExpValue    = "Null";
                ce.ExpOperater = eConditionOperator.Is;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            else
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "TemplateId";
                ce.ExpValue    = TemplateId;
                ce.ExpOperater = eConditionOperator.Equal;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetTemplateDetailsList(qc);
            }
            var list = result.Data;

            list.Insert(0, new Epm_TemplateDetails()
            {
                Id = 0, ParentId = -1, Name = "根节点", Sort = -1
            });

            var       first    = list.FirstOrDefault(i => i.Id == pId);
            RightNode rootTree = new RightNode();

            rootTree.checkboxValue = first.Id.ToString();
            rootTree.@checked      = chk == first.Id.ToString();
            rootTree.data          = new { id = first.Id.ToString() };
            rootTree.name          = first.Name;
            rootTree.spread        = true;

            var tree = createTree(first.Id, list);

            if (!last)
            {
                tree = createTreeNoLast(first.Id, list, chk);
            }
            rootTree.children = tree;
            return(Json(rootTree, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        //修改资料
        // GET: DataConfig/Edit/5
        public ActionResult Edit(long id)
        {
            Result <Epm_DataConfig>     result = new Result <Epm_DataConfig>();
            Result <List <Base_Files> > list   = new Result <List <Base_Files> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetDataConfigById(id);
            }

            return(View(result.Data));
        }
예제 #8
0
        public ActionResult GetDetails(long templateId)
        {
            Result <List <MilepostView> > result = new Result <List <MilepostView> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetTemplateDetailsViewList(templateId);
            }
            var list = result.Data;

            return(Json(list));
        }
예제 #9
0
        public ActionResult GetCheckItemTree(long pId = 0, bool last = true, string chk = "")
        {
            Result <List <Epm_CheckItem> > result = new Result <List <Epm_CheckItem> >();
            QueryCondition qc = new QueryCondition();

            qc.PageInfo.isAllowPage = false;
            ConditionExpression ce = new ConditionExpression();

            ce.ConditionList.Add(new ConditionExpression()
            {
                ExpName     = "Level",
                ExpValue    = 1,
                ExpOperater = eConditionOperator.Equal,
                ExpLogical  = eLogicalOperator.Or
            });
            ce.ConditionList.Add(new ConditionExpression()
            {
                ExpName     = "Level",
                ExpValue    = 2,
                ExpOperater = eConditionOperator.Equal,
                ExpLogical  = eLogicalOperator.Or
            });
            qc.ConditionList.Add(ce);
            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetCheckItemList(qc);
            }
            var list = result.Data;

            list.Insert(0, new Epm_CheckItem()
            {
                Id = 0, ParentId = -1, Name = "根节点", Sort = -1, Level = 0
            });

            var       first    = list.FirstOrDefault(i => i.Id == pId);
            RightNode rootTree = new RightNode();

            rootTree.checkboxValue = first.Id.ToString();
            rootTree.@checked      = chk == first.Id.ToString();
            rootTree.data          = new { id = first.Id.ToString() };
            rootTree.name          = first.Name;
            rootTree.spread        = true;
            rootTree.Level         = first.Level;

            var tree = createTree(first.Id, list);

            if (!last)
            {
                tree = createTreeNoLast(first.Id, list, chk);
            }
            rootTree.children = tree;
            return(Json(rootTree, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        public ActionResult Index(string AdName = "", string AdTargetName = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.AdName    = AdTargetName;
            ViewBag.AdName    = AdName;
            ViewBag.pageIndex = pageIndex;

            //广告位下拉框数据
            Result <List <Epm_AdTarget> > list = new Result <List <Epm_AdTarget> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                list = proxy.GetAdTargetList();
            }
            ViewBag.AdTargetList = list.Data;

            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            if (!string.IsNullOrEmpty(AdName))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "AdName";
                ce.ExpValue    = "%" + AdName + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            if (!string.IsNullOrEmpty(AdTargetName))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "AdTargetName";
                ce.ExpValue    = "%" + AdTargetName + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);

            SortExpression sort = new SortExpression("Sort", eSortType.Asc);

            qc.SortList.Add(sort);

            Result <List <Epm_AdPutRecord> > result = new Result <List <Epm_AdPutRecord> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetAdPutRecordList(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }
            return(View(result.Data));
        }
예제 #11
0
        /// <summary>
        /// 批复构成列表
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(string mainPoints = "", string projectNatureCode = "", string constituteName = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.MainPoints        = mainPoints;
            ViewBag.ConstituteName    = constituteName;
            ViewBag.ProjectNatureCode = projectNatureCode;
            ViewBag.pageIndex         = pageIndex;
            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            if (!string.IsNullOrEmpty(mainPoints))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "MainPoints";
                ce.ExpValue    = "%" + mainPoints + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            if (!string.IsNullOrEmpty(constituteName))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "ConstituteName";
                ce.ExpValue    = "%" + constituteName + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            if (!string.IsNullOrEmpty(projectNatureCode))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "ProjectNatureCode";
                ce.ExpValue    = projectNatureCode;
                ce.ExpOperater = eConditionOperator.Equal;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);
            qc.SortList.Add(new SortExpression("Sort", eSortType.Asc));

            Result <List <Epm_Constitute> > result = new Result <List <Epm_Constitute> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetConstituteList(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }

            GetProjectNature();

            return(View(result.Data));
        }
예제 #12
0
        public ActionResult Edit(long id)
        {
            Result <Epm_Milepost> result = new Result <Epm_Milepost>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetMilepostById(id);
            }

            SetMilestionCategory(false, id.ToString());

            return(View(result.Data));
        }
예제 #13
0
        /// <summary>
        /// 项目性质下拉数据
        /// </summary>
        public void GetProjectNature(string projectNature = "")
        {
            Result <List <Epm_ProjectNature> > result = new Result <List <Epm_ProjectNature> >();
            QueryCondition qc = new QueryCondition();

            qc.PageInfo.isAllowPage = false;
            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetProjectNatureList(qc);
            }

            ViewBag.ProjectNatureCode = result.Data.ToSelectList("NATURE_MC", "NATURE_BH", true, projectNature);
        }
예제 #14
0
        /// <summary>
        /// 检查项列表
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(string name = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.Name      = name;
            ViewBag.pageIndex = pageIndex;

            Result <List <Epm_CheckItem> > result = new Result <List <Epm_CheckItem> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                QueryCondition qc = new QueryCondition();
                qc.ConditionList.Add(new ConditionExpression()
                {
                    ExpName     = "Level",
                    ExpValue    = 2,
                    ExpOperater = eConditionOperator.Equal,
                    ExpLogical  = eLogicalOperator.And
                });
                qc.PageInfo.isAllowPage = false;
                qc.SortList.Add(new SortExpression("Sort", eSortType.Asc));
                List <Epm_CheckItem> categoryList = proxy.GetCheckItemList(qc).Data;

                qc = new QueryCondition();
                qc.ConditionList.Add(new ConditionExpression()
                {
                    ExpName     = "Level",
                    ExpValue    = 3,
                    ExpOperater = eConditionOperator.Equal,
                    ExpLogical  = eLogicalOperator.And
                });
                if (!string.IsNullOrEmpty(name))
                {
                    qc.ConditionList.Add(new ConditionExpression()
                    {
                        ExpName     = "Name",
                        ExpValue    = "%" + name + "%",
                        ExpOperater = eConditionOperator.Like,
                        ExpLogical  = eLogicalOperator.And
                    });
                }
                qc.PageInfo = GetPageInfo(pageIndex, pageSize);
                qc.SortList.Add(new SortExpression("Sort", eSortType.Asc));
                result = proxy.GetCheckItemList(qc);
                foreach (var item in result.Data)
                {
                    item.Remark = categoryList.Where(p => p.Id == item.ParentId).First().ParentName;
                }
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }
            return(View(result.Data));
        }
예제 #15
0
        public ActionResult Add(Epm_AdTarget model)
        {
            ResultView <int> view = new ResultView <int>();

            //表单校验
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "广告位名称不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.TargetNum))
            {
                view.Flag    = false;
                view.Message = "广告位编号不能为空";
                return(Json(view));
            }
            if (model.ShowCount <= 0)
            {
                view.Flag    = false;
                view.Message = "显示数量不能为零";
                return(Json(view));
            }
            if (model.Hight <= 0)
            {
                view.Flag    = false;
                view.Message = "高度不能为零";
                return(Json(view));
            }
            if (model.Lenght <= 0)
            {
                view.Flag    = false;
                view.Message = "长度不能为零";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddAdTarget(model);
            }
            return(Json(result.ToResultView()));
        }
예제 #16
0
        public ActionResult Index(long parentId = 0, int pageIndex = 1, int pageSize = 10)
        {
            Result <List <MilepostView> > result = new Result <List <MilepostView> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetMilepostViewList(parentId, pageIndex, pageSize);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.pageIndex = pageIndex;
            }

            SetMilestionCategory(true, parentId.ToString());

            return(View(result.Data));
        }
예제 #17
0
        public ActionResult Index(string name, string typeNo, int pageIndex = 1, int pageSize = 10)
        {
            ResultView <string> view = new ResultView <string>();

            if (string.IsNullOrEmpty(typeNo))
            {
                view.Flag    = false;
                view.Message = "模板标识不能为空";
                return(Json(view));
            }
            Base_TypeDictionary tempType = GetTempType(typeNo);

            Helper.IsCheck(HttpContext, GetModule(tempType.Name + "模板"), SystemRight.Browse.ToString(), true);

            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            ce             = new ConditionExpression();
            ce.ExpName     = "TemplateTypeId";
            ce.ExpValue    = tempType.Id;
            ce.ExpOperater = eConditionOperator.Equal;
            ce.ExpLogical  = eLogicalOperator.And;
            qc.ConditionList.Add(ce);
            if (!string.IsNullOrEmpty(name))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "Title";
                ce.ExpValue    = "%" + name + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);
            Result <List <Epm_Template> > result = new Result <List <Epm_Template> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetTemplateList(qc);
            }
            ViewBag.Total        = result.AllRowsCount;
            ViewBag.name         = name;
            ViewBag.typeNo       = typeNo;
            ViewBag.pageIndex    = pageIndex;
            ViewBag.TemplateId   = tempType.Id;
            ViewBag.TemplateName = tempType.Name;
            return(View(result.Data));
        }
예제 #18
0
        public ActionResult Edit(Epm_Template model)
        {
            ResultView <string> view = new ResultView <string>();
            string fileDataJson      = Request.Form["fileDataJson"];                                       //获取上传文件json字符串

            List <Base_Files> fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            if (model.TemplateTypeId == null)
            {
                view.Flag    = false;
                view.Message = "模板类型ID不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.TemplateTypeName))
            {
                view.Flag    = false;
                view.Message = "模板类型名称不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Title))
            {
                view.Flag    = false;
                view.Message = "标题不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Description))
            {
                view.Flag    = false;
                view.Message = "说明不能为空";
                return(Json(view));
            }
            if (model.TrainCompanyId == null)
            {
                view.Flag    = false;
                view.Message = "单位不能为空";
                return(Json(view));
            }
            model.IsDelete = false;
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateTemplate(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
예제 #19
0
        public ActionResult Add(Epm_ConstituteCompany model)
        {
            ConstituteCompanyView cv   = new ConstituteCompanyView();
            ResultView <int>      view = new ResultView <int>();

            string ISPValue = Request.Form["ISPValue"];

            cv.ConstituteCompanyDetails = JsonConvert.DeserializeObject <List <Epm_ConstituteCompanyDetails> >(ISPValue);
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                cv.ConstituteCompany = model;
                result = proxy.AddConstituteCompany(cv);
            }
            return(Json(result.ToResultView()));
        }
        /// <summary>
        /// 考勤设置列表
        /// </summary>
        /// <returns></returns>
        // GET: ProjectAttendance
        public ActionResult Index(int pageIndex = 1, int pageSize = 10)
        {
            QueryCondition qc = new QueryCondition();

            qc.SortList.Add(new SortExpression("OperateTime", eSortType.Desc));
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);

            Result <List <Epm_ProjectAttendance> > result = new Result <List <Epm_ProjectAttendance> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetProjectAttendanceList(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }
            return(View(result.Data));
        }
예제 #21
0
        public ActionResult Edit(Epm_CheckItem model)
        {
            ResultView <int> view = new ResultView <int>();
            //表单校验
            //if (string.IsNullOrEmpty(model.Name))
            //{
            //    view.Flag = false;
            //    view.Message = "检查名称不能为空";
            //    return Json(view);
            //}
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateCheckItem(model);
            }
            return(Json(result.ToResultView()));
        }
예제 #22
0
        public ActionResult Add(Epm_DataConfig model)
        {
            ResultView <int> view = new ResultView <int>();

            string fileDataJson = Request.Form["fileDataJson"];                                            //获取上传文件json字符串

            List <Base_Files> fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            //表单校验
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "资料名称不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Code))
            {
                view.Flag    = false;
                view.Message = "资料编号不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Description))
            {
                view.Flag    = false;
                view.Message = "资料说明不能为空";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddDataConfig(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
예제 #23
0
        /// <summary>
        /// 批复构成列表
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(string dickey = "", string workmain = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.WorkMain = workmain;
            ViewBag.Dickey   = dickey;

            ViewBag.pageIndex = pageIndex;
            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            if (!string.IsNullOrEmpty(dickey))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "DicKey";
                ce.ExpValue    = dickey;
                ce.ExpOperater = eConditionOperator.Equal;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            if (!string.IsNullOrEmpty(workmain))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "WorkMain";
                ce.ExpValue    = "%" + workmain + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);
            qc.SortList.Add(new SortExpression("DicKey", eSortType.Asc));
            qc.SortList.Add(new SortExpression("Sort", eSortType.Asc));

            Result <List <Epm_WorkMainPoints> > result = new Result <List <Epm_WorkMainPoints> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetWorkMainPointsList(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }

            GetWorkMainPoints(true);
            return(View(result.Data));
        }
예제 #24
0
        /// <summary>
        /// 修改服务商
        /// </summary>
        /// <returns></returns>
        public ActionResult Edit(long id)
        {
            Result <ConstituteCompanyView> result = new Result <ConstituteCompanyView>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetConstituteCompanyModel(id);
            }

            string constituteName = "";

            if (result.Data != null)
            {
                constituteName = result.Data.ConstituteCompany.ConstituteKey;
            }
            GetConstituteName(constituteName);

            return(View(result.Data));
        }
예제 #25
0
        public ActionResult GetMilestoneTree(long pId = 0, bool last = true, string chk = "")
        {
            Result <List <Epm_Milepost> > result = new Result <List <Epm_Milepost> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetMilepostList();
            }
            var list = result.Data;

            list = list.Where(t => t.ParentId == pId).ToList();

            var tree = createTree(pId, list);

            if (!last)
            {
                tree = createTreeNoLast(pId, list, chk);
            }
            return(Json(tree, JsonRequestBehavior.AllowGet));
        }
예제 #26
0
        public ActionResult Edit(long id)
        {
            Result <Epm_News> result = new Result <Epm_News>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetNewsById(id);
            }
            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                //根据字典类型集合获取字典数据
                List <DictionaryType> typeList = new List <DictionaryType>()
                {
                    DictionaryType.NewsCategory
                };
                var types = proxy.GetTypeListByTypes(typeList).Data;
                //返回新闻分类列表
                ViewBag.SelNewsTypeName = types[DictionaryType.NewsCategory].ToSelectList("Name", "Id", true);
            }

            return(View(result.Data));
        }
예제 #27
0
        public ActionResult Edit(long id)
        {
            Result <Epm_Milepost> result = new Result <Epm_Milepost>();
            string dataName = "";

            string dataConfigId = "";

            ViewBag.ParName      = "";
            ViewBag.DataName     = "";
            ViewBag.DataConfigId = "";
            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.GetMilepostById(id);

                if (result.Data.ParentId.Value == 0)
                {
                    ViewBag.ParName = "";
                }
                else
                {
                    //所属父级名称
                    ViewBag.ParName = proxy.GetMilepostById(result.Data.ParentId.Value).Data.Name;
                }
                var list = proxy.GetMilepostDataByMilepostId(result.Data.Id);
                if (list.Data.Count > 0)
                {
                    foreach (var item in list.Data)
                    {
                        dataName     += item.DataName + ',';
                        dataConfigId += item.DataConfigId.ToString() + ',';
                    }
                    ViewBag.DataConfigId = dataConfigId.Substring(0, dataConfigId.Length - 1);
                    ViewBag.DataName     = dataName.Substring(0, dataName.Length - 1);
                }
            }

            return(View(result.Data));
        }
예제 #28
0
        /// <summary>
        /// 查询有效项目
        /// </summary>
        /// <returns></returns>
        public ActionResult IndexProject(string name = "", string CreateUserName = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.name           = name;
            ViewBag.CreateUserName = CreateUserName;
            ViewBag.pageIndex      = pageIndex;
            QueryCondition qc = new QueryCondition();

            if (!string.IsNullOrEmpty(name))
            {
                ConditionExpression ce1 = new ConditionExpression();
                ce1.ExpName     = "Name";
                ce1.ExpValue    = "%" + name + "%";
                ce1.ExpOperater = eConditionOperator.Like;
                ce1.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce1);
            }

            if (!string.IsNullOrEmpty(CreateUserName))
            {
                ConditionExpression ce1 = new ConditionExpression();
                ce1.ExpName     = "CreateUserName";
                ce1.ExpValue    = "%" + CreateUserName + "%";
                ce1.ExpOperater = eConditionOperator.Like;
                ce1.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce1);
            }

            qc.PageInfo = GetPageInfo(pageIndex, pageSize);
            Result <List <Epm_Project> > result = new Result <List <Epm_Project> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetIndexProject(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }
            return(View(result.Data));
        }
예제 #29
0
        public ActionResult Add(Epm_AdPutRecord model)
        {
            ResultView <int> view = new ResultView <int>();

            string fileDataJson = Request.Form["fileDataJsonFile"];                                        //获取上传文件json字符串

            List <Base_Files> fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            //表单校验
            if (string.IsNullOrEmpty(model.AdName))
            {
                view.Flag    = false;
                view.Message = "广告名称不能为空";
                return(Json(view));
            }
            if (model.StartTime > model.EndTime)
            {
                view.Flag    = false;
                view.Message = "开始时间不能大于结束时间";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                model.EndTime = Convert.ToDateTime(model.EndTime.Value.ToString("yyyy-MM-dd") + " 23:59:59");
                result        = proxy.AddAdPutRecord(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
예제 #30
0
        // GET: ISP
        /// <summary>
        /// 工程服务商
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(string constituteName = "", string CompanyNames = "", int pageIndex = 1, int pageSize = 10)
        {
            ViewBag.ConstituteName = constituteName;
            ViewBag.CompanyNames   = CompanyNames;
            ViewBag.pageIndex      = pageIndex;
            QueryCondition      qc = new QueryCondition();
            ConditionExpression ce = null;

            if (!string.IsNullOrEmpty(constituteName))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "ConstituteName";
                ce.ExpValue    = "%" + constituteName + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            if (!string.IsNullOrEmpty(CompanyNames))
            {
                ce             = new ConditionExpression();
                ce.ExpName     = "CompanyNames";
                ce.ExpValue    = "%" + CompanyNames + "%";
                ce.ExpOperater = eConditionOperator.Like;
                ce.ExpLogical  = eLogicalOperator.And;
                qc.ConditionList.Add(ce);
            }
            qc.PageInfo = GetPageInfo(pageIndex, pageSize);

            Result <List <Epm_ConstituteCompany> > result = new Result <List <Epm_ConstituteCompany> >();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result            = proxy.GetConstituteCompanyList(qc);
                ViewBag.Total     = result.AllRowsCount;
                ViewBag.TotalPage = Math.Ceiling((decimal)result.AllRowsCount / pageSize);
            }
            return(View(result.Data));
        }