示例#1
0
        public async void GetAllWarehouse(string store_id)
        {
            try
            {
                gridWarehouse.DataBindings.Clear();
                PRO_tblWarehouseDRO warehouses = await PRO_tblWarehouseBUS.GetAllWarehouses(CommonEngine.userInfo.UserID, ConfigEngine.Language, false, store_id, "", "", new SYS_tblActionLogDTO
                {
                    Activity      = BaseConstant.COMMAND_INSERT_EN,
                    UserID        = CommonEngine.userInfo.UserID,
                    LanguageID    = ConfigEngine.Language,
                    ActionEN      = BaseConstant.COMMAND_LOAD_ALL_DATA_EN,
                    ActionVN      = BaseConstant.COMMAND_LOAD_ALL_DATA_VI,
                    FunctionID    = "18",
                    DescriptionVN = string.Format("Tài khoản '{0}' vừa tải thành công dữ liệu kho hàng.", CommonEngine.userInfo.UserID),
                    DescriptionEN = string.Format("Account '{0}' downloaded successfully data of warehouses.", CommonEngine.userInfo.UserID)
                });

                if (!CommonEngine.CheckValidResponseItem(warehouses.ResponseItem))
                {
                    return;
                }
                gridWarehouse.DataSource = warehouses.WarehouseList != null ? warehouses.WarehouseList : null;
                barFooter.Visible        = (warehouses.WarehouseList != null && warehouses.WarehouseList.Count > 0) ? true : false;
                CommonEngine.LoadUserPermission("18", btnDelete, btnPrint, btnImport, btnExport);
            }
            catch (Exception ex)
            {
                CommonEngine.ShowExceptionMessage(ex);
            }
        }
示例#2
0
        private async void LoadWarehouseByStoreID(string store_id)
        {
            gluWarehouse.DataBindings.Clear();
            PRO_tblWarehouseDRO warehouses = await PRO_tblWarehouseBUS.GetAllWarehouses(CommonEngine.userInfo.UserID, ConfigEngine.Language, true, store_id, "", "", null);

            if (warehouses.ResponseItem.IsError)
            {
                CommonEngine.ShowHTTPErrorMessage(warehouses.ResponseItem);
                gluWarehouse.Properties.DataSource = null;
                return;
            }
            gluWarehouse.Properties.DataSource    = warehouses.WarehouseList;
            gluWarehouse.Properties.ValueMember   = "WarehouseID";
            gluWarehouse.Properties.DisplayMember = "FullWarehouseName";
        }