예제 #1
0
        public ActionResult Search(ZonesModelsView model)
        {
            try
            {
                var datas = _factory.GetListZone(model.StoreID, null, CurrentUser.ListOrganizationId);
                datas            = datas.Where(o => o.StoreID == model.StoreID).ToList();
                model.List_Zones = datas;
            }
            catch (Exception ex)
            {
                _logger.Error("Zone_Search: " + ex);
                return(new HttpStatusCodeResult(400, ex.Message));
            }

            return(PartialView("_ListData", model));
        }
예제 #2
0
        /*Printer*/
        public List <SelectListItem> GetSelectListZone(string StoreID)
        {
            List <ZoneModels>     lstData = _Zonefactory.GetListZone(StoreID, null, CurrentUser.ListOrganizationId);
            List <SelectListItem> slcZone = new List <SelectListItem>();

            if (lstData != null)
            {
                foreach (ZoneModels item in lstData)
                {
                    slcZone.Add(new SelectListItem
                    {
                        Text  = item.Name + " [" + item.StoreName + "]",
                        Value = item.ID
                    });
                }
            }
            return(slcZone);
        }