private int GetWarehouseId(string warehouse)
        {
            WarehouseDto warehouses = WarehouseManager.GetWarehouseDto();

            if (warehouses.Warehouse != null)
            {
                DataRow[] drws        = null;
                int       warehouseId = 0;
                if (Int32.TryParse(warehouse, out warehouseId))
                {
                    drws = warehouses.Warehouse.Select(String.Format("WarehouseId = '{0}'", warehouseId));
                    if (drws.Length > 0)
                    {
                        return(warehouseId);
                    }
                }
                else
                {
                    drws = warehouses.Warehouse.Select(String.Format("Name LIKE '{0}'", warehouse.Replace("'", "''")));
                    if (drws.Length > 0)
                    {
                        return(((WarehouseDto.WarehouseRow)drws[0]).WarehouseId);
                    }
                }
            }
            return(0);
        }
Example #2
0
        /// <summary>
        /// Handles the SaveChanges event of the EditSaveControl control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void EditSaveControl_SaveChanges(object sender, SaveControl.SaveEventArgs e)
        {
            // Validate form
            if (!this.Page.IsValid)
            {
                e.RunScript = false;
                return;
            }

            WarehouseDto warehouse = (WarehouseDto)Session[_WarehouseDtoEditSessionKey];

            if (WarehouseId > 0 && warehouse == null)
            {
                warehouse = WarehouseManager.GetWarehouseByWarehouseId(WarehouseId);
            }
            else if (WarehouseId == 0)
            {
                warehouse = new WarehouseDto();
            }

            IDictionary context = new ListDictionary();

            context.Add(_WarehouseDtoString, warehouse);

            ViewControl.SaveChanges(context);

            if (warehouse.HasChanges())
            {
                WarehouseManager.SaveWarehouse(warehouse);
            }

            // we don't need to store Dto in session any more
            Session.Remove(_WarehouseDtoEditSessionKey);
        }
Example #3
0
        void BindGrid()
        {
            WarehouseCollection warehouseCollection = WarehouseManager.GetAllWarehouses();

            gvWarehouses.DataSource = warehouseCollection;
            gvWarehouses.DataBind();
        }
        private void BindData()
        {
            Warehouse warehouse = WarehouseManager.GetWarehouseByID(this.WarehouseID);

            if (warehouse != null)
            {
                this.txtName.Text          = warehouse.Name;
                this.txtPhoneNumber.Text   = warehouse.PhoneNumber;
                this.txtEmail.Text         = warehouse.Email;
                this.txtFaxNumber.Text     = warehouse.FaxNumber;
                this.txtAddress1.Text      = warehouse.Address1;
                this.txtAddress2.Text      = warehouse.Address2;
                this.txtCity.Text          = warehouse.City;
                this.txtStateProvince.Text = warehouse.StateProvince;
                this.txtZipPostalCode.Text = warehouse.ZipPostalCode;
                CommonHelper.SelectListItem(this.ddlCountry, warehouse.CountryID);
                this.pnlCreatedOn.Visible = true;
                this.pnlUpdatedOn.Visible = true;
                this.lblCreatedOn.Text    = DateTimeHelper.ConvertToUserTime(warehouse.CreatedOn).ToString();
                this.lblUpdatedOn.Text    = DateTimeHelper.ConvertToUserTime(warehouse.UpdatedOn).ToString();
            }
            else
            {
                this.pnlCreatedOn.Visible = false;
                this.pnlUpdatedOn.Visible = false;
            }
        }
        public HttpResponseMessage Createwarehouse(Warehouse warehouse_requests)
        {
            WarehouseManager     warehouseManager    = new WarehouseManager();
            cls_common_responses clsCommonResponses1 = new cls_common_responses();

            if (warehouse_requests == null)
            {
                clsCommonResponses1.ResponseCode    = 400;
                clsCommonResponses1.ResponseMessage = "";
                return(this.Request.CreateResponse <cls_common_responses>(HttpStatusCode.OK, clsCommonResponses1));
            }
            HttpResponseMessage response;

            try
            {
                warehouse_requests.CreatedBy   = new int?(1);
                warehouse_requests.CreatedDate = new DateTime?(DateTime.Now);
                warehouse_requests.UpdatedBy   = new int?(1);
                warehouse_requests.UpdatedDate = new DateTime?(DateTime.Now);
                cls_common_responses clsCommonResponses2 = warehouseManager.Createwarehouse("Proc_Warehouse_Save", warehouse_requests);
                int responseCode = clsCommonResponses2.ResponseCode;
                response = this.Request.CreateResponse <cls_common_responses>(HttpStatusCode.OK, clsCommonResponses2);
            }
            catch (Exception ex)
            {
                clsCommonResponses1.ResponseCode    = 400;
                clsCommonResponses1.ResponseMessage = "Something went wrong, please try again later.";
                response = this.Request.CreateResponse <cls_common_responses>(HttpStatusCode.OK, clsCommonResponses1);
            }
            return(response);
        }
Example #6
0
        private void init(string filePath)
        {
            LoadData     ld          = new LoadData();
            InitDataLoad initDataSet = ld.LoadInitData(filePath);

            CurrnetTime = initDataSet.InitParameters.startDate;

            dataManager = new DataManager(initDataSet.MetaData);
            dataManager.UpdateTime(CurrnetTime);

            clock       = new Clock(CurrnetTime);
            clock.Tick += ClockTick;

            WarehouseManager  = new WarehouseManager(initDataSet.InitParameters.InitWarehouseInventory, initDataSet.InitParameters.WarehouseMaxCapacity);
            financeManager    = new FinanceManager(initDataSet.InitParameters.InitBankStartBalance);
            DataSummary       = new DataSummaryClass(WarehouseManager, dataManager, financeManager, CurrnetTime, marketingManager, purchaseManager);
            productionManager = new ProductionManager(initDataSet.InitLists.InitToolsList, initDataSet.MetaData.ToolTypeMetaData);
            purchaseManager   = new PurchaseManager(initDataSet.InitLists.InitPurchaseOrders);
            marketingManager  = new MarketingManager(initDataSet.InitLists.InitCustomersOrderList, initDataSet.InitLists.InitFutureCustomersOrderList);


            foreach (ProductionOrder productionOrder in initDataSet.InitLists.InitProductionOrderList.GetProductionOrderList())
            {
                productionManager.AddProductionOrder(productionOrder);
            }

            productionManager.tempStartProduction();
        }
        private void FillDropDowns()
        {
            this.ddlTaxCategory.Items.Clear();
            ListItem itemTaxCategory = new ListItem("---", "0");

            this.ddlTaxCategory.Items.Add(itemTaxCategory);
            TaxCategoryCollection taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryID.ToString());
                this.ddlTaxCategory.Items.Add(item2);
            }

            this.ddlWarehouse.Items.Clear();
            ListItem itemWarehouse = new ListItem("---", "0");

            this.ddlWarehouse.Items.Add(itemWarehouse);
            WarehouseCollection warehouseCollection = WarehouseManager.GetAllWarehouses();

            foreach (Warehouse warehouse in warehouseCollection)
            {
                ListItem item2 = new ListItem(warehouse.Name, warehouse.WarehouseID.ToString());
                this.ddlWarehouse.Items.Add(item2);
            }

            CommonHelper.FillDropDownWithEnum(this.ddlLowStockActivity, typeof(LowStockActivityEnum));
        }
Example #8
0
        public DataSummaryClass(WarehouseManager warehouse, DataManager dataManager, FinanceManager bank, DateTime currnetTime, MarketingManager marketingManager, PurchaseManager purchaseManager)
        {
            Warehouse        = warehouse;
            this.dataManager = dataManager;

            CurrnetTime = currnetTime;
        }
        /// <summary>
        /// Get save commands
        /// </summary>
        /// <returns>Return the record command</returns>
        ICommand GetSaveObjectCommand()
        {
            if (string.IsNullOrWhiteSpace(IdentityValue))
            {
                return(null);
            }
            var dataPackage = WarehouseManager.GetDataPackage <TEntity>(IdentityValue);

            if (dataPackage == null || (!ActivationOptions.ForceExecute && dataPackage.Operate != WarehouseDataOperate.Save))
            {
                return(null);
            }
            var dataAccessService = ContainerManager.Resolve <TDataAccess>();

            if (dataPackage.LifeSource == DataLifeSource.New) //new add value
            {
                return(dataAccessService.Add(dataPackage.WarehouseData));
            }
            else if (dataPackage.HasValueChanged) // update value
            {
                var data = dataPackage.WarehouseData;
                return(dataAccessService.Modify(data, dataPackage.PersistentData));
            }
            return(null);
        }
Example #10
0
    // Use this for initialization
    void Start()
    {
        index           = 0;
        tutorialText    = new string[13];
        tutorialText[0] = "At the top right, you can see what day we are on, how many lives you have, and the button that allows you to go to the next day.";
        tutorialText[1] = "The warehouse operates on a day-by-day cycle: orders that you stage and supply that you buy all happen at the end of day. I will explain later what that means. ";
        tutorialText[2] = "Moving left, you can see how much money you have spent and earned the previous day.";
        tutorialText[3] = "At the very left of that, you can see how much of each vegetable you have, divided into Current and Tomorrow's Storage.";
        tutorialText[4] = "Notice that there is a spoilage rate and a limit - my storage racks aren't the best. You should invest in upgrading storage later down the road. ";
        tutorialText[5] = "To the left, there are orders that you need to fulfill. You can stage an order and prepare it for shipment by clicking on it. Try clicking on it now!";
        tutorialText[6] =
            "The order shows the buyer name, revenue made from completing it, how much you need of each vegetable, and when you need to fulfill the order by.";
        tutorialText[7] = "This is the buy menu for replenishing your stock. Staged orders and buying for your stock both happen at end of day, when you click on the Next Day button.";
        tutorialText[8] =
            "You can use this computer to communicate with your suppliers and buyers. Click on it to see what actions you can do. ";
        tutorialText[9] =
            "This book contains an inventory recap that shows how much of each vegetable you have gained or lost in the past day. Click on it to see.";
        tutorialText[10] = "I invested my life savings into this warehouse, so I have very high expectations. Miss 3 orders, and you're fired. I'll check up on you in 15 days, so you better impress me by then.";
        tutorialText[11] = "I will be heading out now. Press Next and then Start to get going.";


        _yesButton  = GameObject.Find("YesButton").GetComponent <Button>();
        _noButton   = GameObject.Find("NoButton").GetComponent <Button>();
        _nextButton = GameObject.Find("NextButton").GetComponent <Button>();

        _nextButton.gameObject.transform.localScale = new Vector3(0, 0, 0);

        _yesButton.onClick.AddListener(Stage1);
        _noButton.onClick.AddListener(PlayGame);
        _nextButton.onClick.AddListener(nextStage);
        wm = GameObject.FindObjectOfType <WarehouseManager>();
    }
Example #11
0
 /// <summary>
 /// Заполняем информацию, связанную с товаром
 /// </summary>
 /// <param name="warehouseManager"></param>
 /// <param name="good"></param>
 /// <param name="nodeIndexes">путь к узлу этого товара</param>
 /// <param name="goodIndex">индекс товара в узле</param>
 public void PutData(WarehouseManager warehouseManager, Good good, List <int> nodeIndexes, int goodIndex)
 {
     this.warehouseManager = warehouseManager;
     this.Good             = good;
     this.nodeIndexes      = nodeIndexes;
     this.goodIndex        = goodIndex;
 }
Example #12
0
        /// <summary>
        /// get save commands
        /// </summary>
        /// <returns></returns>
        ICommand GetSaveObjectCommand()
        {
            if (IdentityValue.IsNullOrEmpty())
            {
                return(null);
            }
            var dataPackage = WarehouseManager.GetDataPackage <ET>(IdentityValue);

            if (dataPackage == null || dataPackage.Operate != WarehouseDataOperate.Save)
            {
                return(null);
            }
            var dalService = ContainerManager.Resolve <DAI>();

            if (dataPackage.LifeSource == DataLifeSource.New) //new add value
            {
                return(dalService.Add((ET)dataPackage.WarehouseData));
            }
            else if (dataPackage.HasValueChanged) // update value
            {
                var data = (ET)dataPackage.WarehouseData;
                return(dalService.Modify(data, (ET)dataPackage.PersistentData));
            }
            return(null);
        }
Example #13
0
        public PageResult <InventoryResult> ProductStock(int pageSize, int pageIndex, InventoryRequest requestParams)
        {
            WarehouseManager warehouse = new WarehouseManager();
            var result = warehouse.CheckedInventory(requestParams.StoreId, requestParams.MachineSn, requestParams.CID, requestParams.DeviceSn, requestParams.CategorySns, requestParams.Keyword, requestParams.Price, pageSize, pageIndex);

            return(result);
        }
Example #14
0
        private void FillDropDowns()
        {
            CommonHelper.FillDropDownWithEnum(this.ddlGiftCardType, typeof(GiftCardTypeEnum));

            CommonHelper.FillDropDownWithEnum(this.ddlDownloadActivationType, typeof(DownloadActivationTypeEnum));

            CommonHelper.FillDropDownWithEnum(this.ddlCyclePeriod, typeof(RecurringProductCyclePeriodEnum));

            this.ddlTaxCategory.Items.Clear();
            ListItem itemTaxCategory = new ListItem("---", "0");

            this.ddlTaxCategory.Items.Add(itemTaxCategory);
            var taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryId.ToString());
                this.ddlTaxCategory.Items.Add(item2);
            }

            this.ddlWarehouse.Items.Clear();
            ListItem itemWarehouse = new ListItem("---", "0");

            this.ddlWarehouse.Items.Add(itemWarehouse);
            var warehouseCollection = WarehouseManager.GetAllWarehouses();

            foreach (Warehouse warehouse in warehouseCollection)
            {
                ListItem item2 = new ListItem(warehouse.Name, warehouse.WarehouseId.ToString());
                this.ddlWarehouse.Items.Add(item2);
            }

            CommonHelper.FillDropDownWithEnum(this.ddlLowStockActivity, typeof(LowStockActivityEnum));
        }
Example #15
0
        //Log 12-07-2560 เพิ่มการแสดง วันที่รับล่าสุด/จำนวนรับล่าสุด และ วันที่ขายล่าสุด/จำนวนที่ขายล่าสุด ในฟอร์ม SalesInfoForm.cs

        private void PrepareDropdown()
        {
            if ("0000".Equals(ddlBranch.SelectedValue))
            {
                return;
            }

            GlobalContext.BranchCode = ddlBranch.SelectedValue as string;
            //ddlWarehouse.DataSource = ServiceHelper.MobileServices.WareHouseGetAllByBranch(GlobalContext.BranchCode);
            var warehouse = WarehouseManager.GetAllByBranch(GlobalContext.BranchCode);

            warehouse.Insert(0, new Warehouse {
                Code = "0000", Name = "-- เลือก --"
            });
            ddlWarehouse.DataSource = warehouse;

            //switch (GlobalContext.BranchCode)
            //{
            //    case "1100":
            //        ddlWarehouse.SelectedValue = "1111";
            //        break;
            //    case "1200":
            //        ddlWarehouse.SelectedValue = "1211";
            //        break;
            //    case "1300":
            //        ddlWarehouse.SelectedValue = "1311";
            //        break;
            //    default:
            //        break;
            //}

            //Dictionary<string,UseInPlaces> useInPlaces=new Dictionary<string,UseInPlaces> ();
            //useInPlaces.Add("สโตร์",UseInPlaces.STORE);
            //useInPlaces.Add("คลังสินค้า",UseInPlaces.WAREHOUSE);
        }
Example #16
0
        /// <summary>
        /// Binds the lists.
        /// </summary>
        private void BindLists()
        {
            // bind shipment packages
            if (PackageList.Items.Count <= 1)
            {
                ShippingMethodDto shippingDto = ShippingManager.GetShippingPackages();
                if (shippingDto.Package != null)
                {
                    foreach (ShippingMethodDto.PackageRow row in shippingDto.Package.Rows)
                    {
                        PackageList.Items.Add(new ListItem(row.Name, row.PackageId.ToString()));
                    }
                }
                PackageList.DataBind();
            }

            // bind warehouses
            if (WarehouseList.Items.Count <= 1)
            {
                WarehouseDto dto = WarehouseManager.GetWarehouseDto();
                if (dto.Warehouse != null)
                {
                    foreach (WarehouseDto.WarehouseRow row in dto.Warehouse.Rows)
                    {
                        WarehouseList.Items.Add(new ListItem(row.Name, row.WarehouseId.ToString()));
                    }
                }

                WarehouseList.DataBind();
            }

            // bind merchants
            if (MerchantList.Items.Count <= 1)
            {
                CatalogEntryDto merchants = CatalogContext.Current.GetMerchantsDto();
                if (merchants.Merchant != null)
                {
                    foreach (CatalogEntryDto.MerchantRow row in merchants.Merchant.Rows)
                    {
                        MerchantList.Items.Add(new ListItem(row.Name, row.MerchantId.ToString()));
                    }
                }
                MerchantList.DataBind();
            }

            // bind tax categories
            if (TaxList.Items.Count <= 1)
            {
                CatalogTaxDto taxes = CatalogTaxManager.GetTaxCategories();
                if (taxes.TaxCategory != null)
                {
                    foreach (CatalogTaxDto.TaxCategoryRow row in taxes.TaxCategory.Rows)
                    {
                        TaxList.Items.Add(new ListItem(row.Name, row.TaxCategoryId.ToString()));
                    }
                }
                TaxList.DataBind();
            }
        }
Example #17
0
        public MainViewVM()
        {
            warehouseManager = new WarehouseManager();
            Nodes            = CreateNodesCopy(warehouseManager.Nodes, null);
            SubscribeAllNodesOnChangeCollection(warehouseManager.Nodes, Nodes, null);

            MenuVM = new MenuVM(warehouseManager);
        }
Example #18
0
    private void Start()
    {
        elevatorManager  = FindObjectOfType <ElevatorBuildingManager>();
        warehouseManager = FindObjectOfType <WarehouseManager>();

        resourceCounter         = resourceCounterObject.GetComponent <RectTransform>();
        resourceCounterTextMesh = resourceCounterObject.GetComponent <TextMesh>();
    }
Example #19
0
        /// <summary>
        /// Loads the fresh.
        /// </summary>
        /// <returns></returns>
        private WarehouseDto LoadFresh()
        {
            WarehouseDto warehouse = WarehouseManager.GetWarehouseByWarehouseId(WarehouseId);

            // persist in session
            Session[_WarehouseDtoEditSessionKey] = warehouse;

            return(warehouse);
        }
 // Use this for initialization
 void Start()
 {
     _warehouseManager = GameObject.Find("Main Camera").GetComponent <WarehouseManager>();
     _totalOrder       = new Dictionary <string, int>();
     foreach (string product in GameObject.FindObjectOfType <WarehouseManager>().SupportedProducts)
     {
         _totalOrder[product] = 0;
     }
 }
Example #21
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="warehouseManager"></param>
 /// <param name="mapper"></param>
 /// <param name="warehouseRepo"></param>
 /// <param name="productRepo"></param>
 public WarehouseAppService(WarehouseManager warehouseManager
                            , IMapper mapper
                            , IEfBasicRepository <Warehouse> warehouseRepo
                            , IEfBasicRepository <Product> productRepo)
 {
     _warehouseManager = warehouseManager;
     _warehouseRepo    = warehouseRepo;
     _productRepo      = productRepo;
     _mapper           = mapper;
 }
 // Start is called before the first frame update
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #23
0
        /// <summary>
        /// Checks if entered varehouse code is unique.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="System.Web.UI.WebControls.ServerValidateEventArgs"/> instance containing the event data.</param>
        public void WarehouseCodeCheck(object sender, ServerValidateEventArgs args)
        {
            // check if warehouse with specified code is exsist
            int warehouseId = WarehouseManager.GetWarehouseIdByCode(args.Value);

            if (warehouseId > 0 && warehouseId != WarehouseId)
            {
                args.IsValid = false;
                return;
            }

            args.IsValid = true;
        }
        /// <summary>
        /// 根据登录人获取授权仓库
        /// </summary>
        /// <returns></returns>
        public Dictionary <Guid, string> GetWorehouseList()
        {
            var dic = new Dictionary <Guid, string> {
                { Guid.Empty, "请选择" }
            };
            var personnerInfo = CurrentSession.Personnel.Get();
            var warehouseList = WarehouseManager.GetWarehouseIsPermission(personnerInfo.PersonnelId);

            foreach (var info in warehouseList)
            {
                dic.Add(info.WarehouseId, info.WarehouseName);
            }
            return(dic);
        }
Example #25
0
        /// <summary>
        /// Loads the data and data bind.
        /// </summary>
        /// <param name="sortExpression">The sort expression.</param>
        private void LoadDataAndDataBind(string sortExpression)
        {
            WarehouseDto dto = WarehouseManager.GetWarehouseDto();

            if (dto.Warehouse != null)
            {
                DataView view = dto.Warehouse.DefaultView;
                view.Sort             = sortExpression;
                MyListView.DataSource = view;
            }

            MyListView.CurrentListView.PrimaryKeyId = EcfListView.MakePrimaryKeyIdString("WarehouseId");
            MyListView.DataBind();
        }
Example #26
0
        public DayReportResult DayReport([FromBody] DayReportRequest requestParams)
        {
            DateTime date    = requestParams.Date;
            DateTime endDate = requestParams.EndDate;

            if (requestParams.Mode == Mode.Month)
            {
                date    = new DateTime(requestParams.Date.Year, requestParams.Date.Month, 1);
                endDate = date.AddMonths(1);
            }
            WarehouseManager manager = new WarehouseManager();

            return(manager.DayMonthReport(requestParams.StoreId, requestParams.MachineSn, requestParams.CID, date, endDate, requestParams.Range, requestParams.DeviceSn));
        }
Example #27
0
    // Start is called before the first frame update
    void Start()
    {
        inventoryRecipe = GetComponent <InventoryRecipe>();
        ContactFilter2D filter;

        filter              = new ContactFilter2D();
        filter.layerMask    = mask;
        filter.useTriggers  = true;
        filter.useLayerMask = true;
        Collider2D[] collider = new Collider2D[1];
        if (Physics2D.OverlapBox(transform.position, GetComponent <BoxCollider2D>().size, 0, filter, collider) == 1)
        {
            warehouse = collider[0].gameObject.transform.parent.GetComponent <WarehouseManager>();
        }
    }
Example #28
0
        private void CustomerOrderDelivery(string orderID)
        {
            Order order       = marketingManager.GetCustomerOrder(orderID);
            bool  canGetOrder = WarehouseManager.CanGetProducts(order);

            if (!canGetOrder)
            {
                cantDeliverOrder();
            }
            else
            {
                WarehouseManager.GetProducts(order);
                marketingManager.RemoveCustomerOrder(order);
                Event_CustomerOrdersListUpdate(this, null);
            }
        }
        public HttpResponseMessage GetWarehouses()
        {
            WarehouseManager    warehouseManager = new WarehouseManager();
            cls_user_responses  clsUserResponses = new cls_user_responses();
            HttpResponseMessage response;

            try
            {
                response = this.Request.CreateResponse <List <Warehouse> >(HttpStatusCode.OK, warehouseManager.GetWarehouses());
            }
            catch (Exception ex)
            {
                response = this.Request.CreateResponse <cls_user_responses>(HttpStatusCode.OK, clsUserResponses);
            }
            return(response);
        }
 public void GetWarehouseListByOrderState()
 {
     try
     {
         var wIdlist = WarehouseManager.GetList().Where(w => w.State == (int)WarehouseState.Enable).Select(w => w.WarehouseId).ToList();
         //获取授权仓库列表
         var          warehouseList   = _warehouse.GetWarehouseIsPermission(new Guid("7ae62af0-eb1f-49c6-8fd1-128d77c84698"), new Guid("c365d6e2-22ea-4295-9333-b2476351648a"), new Guid("176a425e-1dc2-4068-84ad-d5e37f1efce3")).ToList();
         var          idList          = warehouseList.Where(w => wIdlist.Contains(w.WarehouseId) && (w.WarehouseType == (int)WarehouseType.MainStock || w.WarehouseType == (int)WarehouseType.AfterSaleStock)).Select(w => w.WarehouseId).ToList();
         OrderState[] orderStateArray = { OrderState.StockUp, OrderState.Redeploy };
         _warehouse.GetWarehouseListByOrderState(orderStateArray, idList);
     }
     catch (Exception ex)
     {
         Assert.IsTrue(!string.IsNullOrEmpty(ex.Message));
     }
 }