Esempio n. 1
0
 public ActionResult Add()
 {
     ViewBag.Data_FormatCode = Utilities.GetSelectListData(FormatCateService.GetALL(), x => x.ID, x => x.CateName, true);
     ViewBag.Data_PeriodCode = Utilities.GetSelectListData(PeriodCateService.GetALL(), x => x.ID, x => x.CateName, true);
     //ViewBag.Data_OwnerCode = Utilities.GetSelectListData(OwnerCateService.GetALL(), x => x.ID, x => x.CateName, false);
     return(View(new OutDoorAdminViewModel()));
 }
Esempio n. 2
0
        public ActionResult GetMediaPeriodCode(int id)
        {
            var renderRadioList = PeriodCateService.GetALL().Where(x => x.ID >= 3);

            return(Json(Utilities.GetSelectListData(renderRadioList,
                                                    x => x.OrderIndex,
                                                    x => x.CateName, false), JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        public ActionResult Add()
        {
            ViewBag.MenuItem = "media-publish";
            if (!CheckMemberStatus())
            {
                return(Redirect(Url.Action("openbiz", "reg")));
            }

            //ViewBag.Data_CrowdCate = Utilities.GetSelectListData(CrowdCateService.GetALL(), x => x.ID, x => x.CateName, false);
            //ViewBag.Data_IndustryCate = Utilities.GetSelectListData(IndustryCateService.GetALL(), x => x.ID, x => x.CateName, false);
            //ViewBag.Data_PurposeCate = Utilities.GetSelectListData(PurposeCateService.GetALL(), x => x.ID, x => x.CateName, false);
            //ViewBag.Data_AreaCate = Utilities.GetSelectListData(AreaCateService.GetALL(), x => x.ID, x => x.CateName, false);
            ViewBag.Data_FormatCode = Utilities.GetSelectListData(FormatCateService.GetALL(), x => x.ID, x => x.CateName, true);
            ViewBag.Data_PeriodCode = Utilities.GetSelectListData(PeriodCateService.GetALL(), x => x.ID, x => x.CateName, true);
            //ViewBag.Data_OwnerCode = Utilities.GetSelectListData(OwnerCateService.GetALL(), x => x.ID, x => x.CateName, false);
            return(View(new OutDoorViewModel()));
        }
Esempio n. 4
0
        private List <SelectListItem> GetSelectList(int value = 0)
        {
            var list = Utilities.GetSelectListData(
                PeriodCateService.GetALL().ToList()
                , item => item.ID
                , item => item.CateName, true).ToList();

            if (value != 0)
            {
                list.Single(x => x.Value == value.ToString()).Selected = true;
            }

            return(list);
        }