Example #1
0
        private void SearchOrders(SpecificationManageViewModel model)
        {
            try
            {
                using (UnitOfWorkManager.NewUnitOfWork())
                {
                    var searchModel = new SpecificationSearchModel
                    {
                        PageIndex     = model.PageIndex,
                        STime         = model.STime,
                        ETime         = model.ETime,
                        Product_Name  = model.Product_Name,
                        CN_Name       = model.CN_Name,
                        Supplier_Name = model.Supplier_Name,
                        HS_CASCode    = model.HS_CASCode,
                        Product_UN    = model.Product_UN,
                        CASCode       = model.CASCode,
                        PageSize      = model.PageSize,
                        SortCol       = model.SortCol ?? "Product_Name",
                        SortType      = model.SortType,
                        Company_Id    = WorkContext.CurrentMembershipUser.Company.Id,
                        CheckStatus   = 2
                    };
                    model.ViewList = _specificationService.Search(searchModel);
                }

                model.Company_Name = WorkContext.CurrentMembershipUser.Company.CompanyName;
            }
            catch (Exception ex)
            {
                ErrorNotification(ex);
            }
        }
Example #2
0
 // GET: Tag
 public ActionResult Index()
 {
     try
     {
         var model = new SpecificationManageViewModel();
         SearchOrders(model);
         return(View(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #3
0
 public ActionResult Index(SpecificationManageViewModel searchModel)
 {
     try
     {
         SearchOrders(searchModel);
         return(View(searchModel));
     }
     catch (Exception ex)
     {
         var model = new SpecificationManageViewModel();
         SearchOrders(model);
         ErrorNotification(ex);
         return(View(model));
     }
 }