Example #1
0
 public ActionResult BrandEdit(int brandId = 0)
 {
     try
     {
         SupplierBrandModel model       = new SupplierBrandModel();
         SupplierBrandBLL   supplierBLL = new SupplierBrandBLL();
         if (brandId > 0)
         {
             ViewBag.Operation = "edit";
             model             = supplierBLL.GetBrandById(brandId);
         }
         else
         {
             ViewBag.Operation = "add";
         }
         ViewBag.FirstCategory = CategoryBLL.GetFristLevelCategories(LanguageEnum.TraditionalChinese);
         ViewBag.Country       = CommonBLL.GetDicsInfoByKey("CountryOfManufacture");
         ViewBag.Brand         = model;
         return(View(model));
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
     }
     return(View());
 }
Example #2
0
        // GET: /Brand/
        public ActionResult StoreList(int brandId = 0, int areaId = 0)
        {
            try
            {
                SupplierBrandBLL supplierBLL = new SupplierBrandBLL();

                var page = new PageDTO()
                {
                    PageIndex = PageNo, PageSize = DefaultPageSize
                };

                var result = supplierBLL.GetStoreListByBrandId(brandId, areaId, LanguageEnum.TraditionalChinese, page);

                ViewBag.Brand = supplierBLL.GetBrandById(brandId);

                ViewBag.ProvinceList = CountryBLL.GetProvinceList(852, LanguageEnum.TraditionalChinese);

                ViewBag.AreaId = areaId;

                return(View(result));
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            return(View());
        }
Example #3
0
        public ActionResult AddStore(int brandId = 0, int id = 0)
        {
            try
            {
                SupplierBrandBLL supplierBLL = new SupplierBrandBLL();

                StoreModel model = supplierBLL.GetStoreById(id);

                ViewBag.Brand = supplierBLL.GetBrandById(brandId);

                ViewBag.ProvinceList = CountryBLL.GetProvinceList(852, LanguageEnum.TraditionalChinese);

                ViewBag.Store = model;

                return(View());
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            return(View());
        }
Example #4
0
        public ActionResult BrandView(int brandId = 0)
        {
            try
            {
                SupplierBrandModel model       = new SupplierBrandModel();
                SupplierBrandBLL   supplierBLL = new SupplierBrandBLL();

                model = supplierBLL.GetBrandById(brandId);
                var page = new PageDTO()
                {
                    PageIndex = PageNo, PageSize = int.MaxValue
                };
                PageOf <StoreModel> storeList = supplierBLL.GetStoreListByBrandId(brandId, 0, LanguageEnum.TraditionalChinese, page);

                ViewBag.Brand     = model;
                ViewBag.StoreList = storeList;
                return(View());
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            return(View());
        }