private void FormRetailUntreadBaseBillInput_Load(object sender, EventArgs e)
        {
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.BindDataSource(this);
            useful.InitFormContros(groupBox1, null);
            formRetailUntreadBaseBill = (FormRetailUntreadBaseBill)this.Owner;
            if (this.Tag.ToString() == "Add")
            {
                this.Text             = "添加单据";
                btnCD.Enabled         = false;
                txtUntreadBillNo.Text = useful.BuildCode("UntreadBaseBill", "Where OperatorCode = '" + GlobalProperty.OperatorCode + "'", "UntreadBillNo", "TH" + GlobalProperty.DBTime.Year.ToString(), 7);
            }
            if (this.Tag.ToString() == "Edit")
            {
                this.Text     = "修改单据";
                btnCD.Enabled = true;
                //chbIsAmendBillNo.Enabled = false;
                txtSaleBillNo.Text    = formRetailUntreadBaseBill.dgvUntreadBaseBill.CurrentRow.Cells["SaleBillNo"].Value.ToString();
                txtUntreadBillNo.Text = formRetailUntreadBaseBill.dgvUntreadBaseBill.CurrentRow.Cells["UntreadBillNo"].Value.ToString();
                RetrieveOrderBillInfo(txtSaleBillNo.Text.Trim());
                GetUntreadBillInfo(txtSaleBillNo.Text.Trim());
                txtSaleBillNo.ReadOnly = true;
                txtSaleBillNo.Enabled  = false;
                btnBrowse.Enabled      = false;
            }
        }
Beispiel #2
0
        private void FormBrowseRetailUntreadBaseBill_Load(object sender, EventArgs e)
        {
            formRetailUntreadBaseBill = (FormRetailUntreadBaseBill)this.Owner;
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.BindDataSource(this);
            useful.InitFormContros(this, null);
            dtpAppendDate.Checked      = false;
            dtpUntreadBillDate.Checked = false;
        }