Exemple #1
0
        private void FrmPdBillSend_Load(object sender, EventArgs e)
        {
            ShowWait("正在读取盘点明细...\r\n 请稍候...");
            string msg;

            if (!PdDataDAL.GetPdDataInfo(out PubGlobal.PdDataInfo, out msg))
            {
                MessageBox.Show("读取盘点单数据失败:" + msg);
                this.DialogResult = DialogResult.Cancel;
                HideWait();
                return;
            }
            if (!PdDataDAL.ListPdData(out pdDatas, out msg))
            {
                MessageBox.Show("查询盘点单明细失败:" + msg);
                this.DialogResult = DialogResult.Cancel;
                HideWait();
                return;
            }
            else
            {
                tbPdDate.Text = PubGlobal.PdDataInfo.PdDate.ToString("yyyy-MM-dd");
                tbCkCode.Text = PubGlobal.PdDataInfo.CkCode;
                dBPdDataBindingSource.DataSource = pdDatas;
            }
            HideWait();
        }
Exemple #2
0
        private void FrmPdBillInit_Load(object sender, EventArgs e)
        {
            string str;

            this.ReadPdDataSuccess = PdDataDAL.GetPdDataInfo(out PubGlobal.PdDataInfo, out str);
            this.dpPdDate.Enabled  = !this.ReadPdDataSuccess;
            this.tbCkCode.Enabled  = !this.ReadPdDataSuccess;
            if (this.ReadPdDataSuccess)
            {
                this.dpPdDate.Value = PubGlobal.PdDataInfo.PdDate;
                this.tbCkCode.Text  = PubGlobal.PdDataInfo.CkCode;
                base.button_3.Focus();
            }
            else
            {
                this.dpPdDate.Value = DateTime.Today;
                this.tbCkCode.Text  = string.Empty;
                this.tbCkCode.Focus();
                this.tbCkCode.SelectAll();
            }
        }