public PartialViewResult StoreGroupCombo(string name, T_STORE_GROUP Param, string selectedValue, string optionLabel, string htmlAttributes)
        {
            Param.STORE_CODE = Param.STORE_CODE == null ? -1 : Param.STORE_CODE;

            List <SelectListItem> combolist = new List <SelectListItem>();
            IList <T_STORE_GROUP> list      = new loggalServiceBiz.StoreService().GetStoreGroup(Param);

            if (list == null)
            {
                list = new List <T_STORE_GROUP>();
            }
            DROPDOWN_COND data = new DROPDOWN_COND
            {
                name = name
                ,
                selectList = list.Select(s => new SelectListItem {
                    Value = s.GROUP_CODE.ToString(), Text = s.GROUP_NAME, Selected = (selectedValue == s.GROUP_CODE.ToString()) ? true : false
                }).ToList()
                ,
                optionLabel = optionLabel
                ,
                htmlAttributes = JsonConvert.DeserializeAnonymousType(htmlAttributes, new { @class = "", @style = "", @placeholder = "", @readonly = "" })
            };

            return(PartialCombo(data));
        }
Esempio n. 2
0
        public List <T_STORE_GROUP> GetStoreGroup(T_STORE_GROUP Cond)
        {
            string sql = Global.DBAgent.LoadSQL(sqlBasePath + "Store\\T_STORE_GROUP.xml", "GetStoreGroup"
                                                , Cond.GROUP_CODE.ToString("")
                                                , Cond.STORE_CODE.ToString("")
                                                , Cond.GROUP_TYPE.ToString("")
                                                );

            return(db.ExecuteQuery <T_STORE_GROUP>(sql).ToList());
        }
 public PartialViewResult PV_StoreGroupList(T_STORE_GROUP Cond)
 {
     ViewBag.list = new loggalServiceBiz.StoreService().GetStoreGroup(Cond);
     return(PartialView2());
 }