Пример #1
0
        private void FormBrowseRetailBarterConsignBill_Load(object sender, EventArgs e)
        {
            formRetailBarterConsignBill = (FormRetailBarterConsignBill)this.Owner;
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.BindDataSource(this);
            useful.InitFormContros(this, null);
            dtpAppendDate.Checked  = false;
            dtpConsignDate.Checked = false;
        }
        private void FormRetailBarterConsignBill_Load(object sender, EventArgs e)
        {
            formRetailBarterConsignBill = (FormRetailBarterConsignBill)this.Owner;
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.BindDataSource(this);
            useful.InitFormContros(this, null);
            if (this.Tag.ToString() == "Add")
            {
                this.Text = "添加单据";
            }
            if (this.Tag.ToString() == "Edit")
            {
                this.Text            = "修改单据";
                m_BaterConsignBillId = Convert.ToInt32(formRetailBarterConsignBill.dgvBarterConsignBill.CurrentRow.Cells["Id"].Value);
                txtBarterBillNo.Text = formRetailBarterConsignBill.dgvBarterConsignBill.CurrentRow.Cells["BarterBillNo"].Value.ToString();
                RetrieveBarterBaseInfo(txtBarterBillNo.Text);
                GetBarterExchangeInfo(txtBarterBillNo.Text);
                GetBarterConsignInfo(txtBarterBillNo.Text);
                txtBarterBillNo.Enabled = false;
                btnBrowse.Enabled       = false;
            }
        }