コード例 #1
0
        public ActionResult List()
        {
            var typeList = ParamWebHelper.GetParamDtsInfo(2).Select(x => new { Type = x.ParamValue, Name = x.ParamDtsName }).ToList();

            ViewBag.TypeList = new SelectList(typeList, "Type", "Name");
            return(View());
        }
コード例 #2
0
        public virtual ActionResult GetStatus()
        {
            int index = GetIndexOfStatus();
            List <ParamDtsInfoEntity> models = ParamWebHelper.GetParamDtsInfo(index);

            models.Insert(0, new ParamDtsInfoEntity {
                ParamDtsName = "全部状态", ParamValue = "0"
            });
            return(Json(models, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        protected override List <SideMenuInfoEntity> GetSideMenu(string[] args)
        {
            var db = CoreDBContext.GetContext();

            ParamWebHelper.GetParamDtsInfo(14);
            var parameters = ParamWebHelper.GetParamDtsInfo(14);

            List <SideMenuInfoEntity> list = new List <SideMenuInfoEntity>();

            foreach (var item in parameters)
            {
                list.Add(new SideMenuInfoEntity
                {
                    ID           = long.Parse(item.ParamValue),
                    MenuName     = item.ParamDtsName,
                    ParentMenuID = 0
                });

                string name  = args[0];
                var    query = from x in db.Set <AccountInfoEntity>()
                               where SqlFunctions.StringConvert((decimal)x.CategoryValue).Trim() == item.ParamValue &&
                               (from y in db.Set <UserInfoEntity>()
                                where y.UserName == name &&
                                y.ID == x.UserId
                                select y).Any()
                               select x;

                foreach (var account in query)
                {
                    list.Add(new SideMenuInfoEntity
                    {
                        ID           = account.ID,
                        MenuName     = account.AccountChnName,
                        ParentMenuID = int.Parse(item.ParamValue),
                        Controller   = "Baidu",
                        Action       = "Index",
                        Parameters   = account.ID + "/" + account.AccountName
                    });
                }
            }

            return(list);
        }
コード例 #4
0
        public override ActionResult Edit(long id)
        {
            var model = Repository.FindByID(id);

            //绑定DropdownList
            var typeList = ParamWebHelper.GetParamDtsInfo(2).Select(x => new { Type = x.ParamValue, Name = x.ParamDtsName }).ToList();

            ViewBag.TypeList = new SelectList(typeList, "Type", "Name");

            //解密
            model.Token      = CryptHelper.DESDecode(model.Token);
            model.AccountPwd = CryptHelper.DESDecode(model.AccountPwd);

            if (!string.IsNullOrEmpty(model.RegionTarget))
            {
                model.RegionTarget = GetAreaById(model.RegionTarget);
            }

            return(View(model));
        }
コード例 #5
0
        //获取Account下拉框类型
        public ActionResult LoadTypeData()
        {
            var temp = ParamWebHelper.GetParamDtsInfo(2);

            return(Json(temp, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        //获取ckb列表
        public JsonResult GetCkbData(int id)
        {
            var result = ParamWebHelper.GetParamDtsInfo(id);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }