private void FormRetailSaleTradeBillInput_Load(object sender, EventArgs e)
        {
            formRetailSaleTradeBill = (FormRetailSaleTradeBill)this.Owner;
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.ComboBoxBindDataSource(cbxBankCode, "BankCode", "BankName", "Select * From Bank", "Bank");
            cbds.ComboBoxBindDataSource(cbxEmployeeCode, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee");
            cbds.ComboBoxBindDataSource(cbxEmployeeCode1, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee");
            cbds.ComboBoxBindDataSource(cbxEmployeeCode2, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee");
            cbds.ComboBoxBindDataSource(cbxEmployeeCode3, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee");
            cbds.ComboBoxBindDataSource(cbxGoodsSeriesCode, "GoodsSeriesCode", "GoodsSeriesName", "Select * From GoodsSeries", "GoodsSeries");
            cbds.ComboBoxBindDataSource(cbxGoodsTypeCode, "GoodsTypeCode", "GoodsTypeName", "Select * From GoodsType", "GoodsType");
            cbds.ComboBoxBindDataSource(cbxPayTypeCode, "PayTypeCode", "PayTypeName", "Select * From PayType", "PayType");
            InitOrderBillControls();
            InitTradeBillControls();
            if (this.Tag.ToString() == "Add")
            {
                this.Text = "添加单据";
            }
            if (this.Tag.ToString() == "Edit")
            {
                this.Text              = "修改单据";
                txtSaleBillNo.Text     = formRetailSaleTradeBill.dgvSaleTradeBill.CurrentRow.Cells["SaleBillNo"].Value.ToString();
                txtSaleBillNo.ReadOnly = true;
                btnBrowse.Enabled      = false;
                SetOrderBillInfo(txtSaleBillNo.Text.Trim());
                SetTradeBillInfo(txtSaleBillNo.Text.Trim());  //是否可以取消检索交易单,直接赋值来提高速度
            }
        }
Example #2
0
        private void FormBrowseRetailSaleTradeBill_Load(object sender, EventArgs e)
        {
            formRetailSaleTradeBill = (FormRetailSaleTradeBill)this.Owner;
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.ComboBoxBindDataSource(cbxProvinceCode, "ProvinceCode", "ProvinceName", "Select * From Province", "Province");
            cbds.ComboBoxBindDataSource(cbxPayTypeCode, "PayTypeCode", "PayTypeName", "Select * From PayType", "PayType");
            cbds.ComboBoxBindDataSource(cbxBankCode, "BankCode", "BankName", "Select * From Bank", "Bank");
            cbxBankCode.SelectedIndex     = -1;
            cbxPayTypeCode.SelectedIndex  = -1;
            cbxProvinceCode.SelectedIndex = -1;
        }