예제 #1
0
        public async void GetAllStore()
        {
            try
            {
                gridStore.DataBindings.Clear();
                PRO_tblStoreDRO stores = await PRO_tblStoreBUS.GetAllStores(CommonEngine.userInfo.UserID, ConfigEngine.Language, false, 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    = "13",
                    DescriptionVN = string.Format("Tài khoản '{0}' vừa tải thành công dữ liệu cửa hàng.", CommonEngine.userInfo.UserID),
                    DescriptionEN = string.Format("Account '{0}' downloaded successfully data of stores.", CommonEngine.userInfo.UserID)
                });

                if (!CommonEngine.CheckValidResponseItem(stores.ResponseItem))
                {
                    return;
                }
                gridStore.DataSource = stores.StoreList != null ? stores.StoreList : null;
                barFooter.Visible    = (stores.StoreList != null && stores.StoreList.Count > 0) ? true : false;
                CommonEngine.LoadUserPermission("13", btnDelete, btnPrint, btnImport, btnExport);
            }
            catch (Exception ex)
            {
                CommonEngine.ShowExceptionMessage(ex);
            }
        }
예제 #2
0
        private async void LoadStore()
        {
            gluStore.DataBindings.Clear();
            PRO_tblStoreDRO stores = await PRO_tblStoreBUS.GetAllStores(CommonEngine.userInfo.UserID, ConfigEngine.Language, true, null);

            if (stores.ResponseItem.IsError)
            {
                CommonEngine.ShowHTTPErrorMessage(stores.ResponseItem);
                gluStore.Properties.DataSource = null;
                return;
            }
            gluStore.Properties.DataSource    = stores.StoreList;
            gluStore.Properties.ValueMember   = "StoreID";
            gluStore.Properties.DisplayMember = "FullStoreName";
        }