Beispiel #1
0
        private void GetListQueryData()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                bsMain.EndEdit();

                bool   bResult  = false;
                string strError = string.Empty;
                GetQueryMain();

                ChensControl.DividPage clientPage = pageList.dDividPage;
                Common.Common_Func.GetServerPageFromClientPage(ref _serverMainPage, clientPage);
                bResult = Print_Func.GetOutBarcodeListByPage(ref lstMain, queryMain, ref _serverMainPage, ref strError);
                Common.Common_Func.GetClientPageFromServerPage(_serverMainPage, ref clientPage);
                pageList.ShowPage();
                dgvList.DataSource = lstMain;

                if (!bResult || !string.IsNullOrEmpty(strError))
                {
                    Common.Common_Func.ErrorMessage(strError, "查询失败");
                }

                if (dgvList.DataSource == null || dgvList.Rows.Count <= 0)
                {
                }
                else
                {
                    dgvList.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2;
                }
            }
            catch (Exception ex)
            {
                Common.Common_Func.ErrorMessage(ex.Message, "查询失败");
            }
            finally
            {
                this.Cursor          = Cursors.Default;
                cbxSelectAll.Checked = false;
                txtVoucherNo.Focus();
            }
        }
        private void GetListQueryData()
        {
            bsMain.EndEdit();

            bool   bResult  = false;
            string strError = string.Empty;

            GetQueryMain();

            ChensControl.DividPage clientPage = pageList.dDividPage;
            Common.Common_Func.GetServerPageFromClientPage(ref _serverMainPage, clientPage);
            bResult = Print_Func.GetOutBarcodeListByPage(ref lstMain, queryMain, ref _serverMainPage, ref strError);
            Common.Common_Func.GetClientPageFromServerPage(_serverMainPage, ref clientPage);
            pageList.ShowPage();
            dgvList.DataSource = lstMain;

            if (!bResult || !string.IsNullOrEmpty(strError))
            {
                Common.Common_Func.ErrorMessage(strError, "查询失败");
            }

            txtVoucherNo.Focus();
        }