Esempio n. 1
0
 private void FormBarterConsignCDRecord_Load(object sender, EventArgs e)
 {
     formRetailBarterConsignBillInput    = (FormRetailBarterConsignBillInput)this.Owner;
     intBarterConsignBillId              = formRetailBarterConsignBillInput.BaterConsignBillId;
     bsBarterConsignCDRecord.DataSource  = bccdr.GetDataTable("BarterConsignCDRecord", " Where BarterConsignBillId = " + intBarterConsignBillId);
     dgvBarterConsignCDRecord.DataSource = bsBarterConsignCDRecord;
 }
        private void toolAdd_Click(object sender, EventArgs e)
        {
            FormRetailBarterConsignBillInput formRetailBarterConsignBillInput = new FormRetailBarterConsignBillInput();

            formRetailBarterConsignBillInput.Tag   = "Add";
            formRetailBarterConsignBillInput.Owner = this;
            formRetailBarterConsignBillInput.ShowDialog();
        }
 private void toolAmend_Click(object sender, EventArgs e)
 {
     if (dgvBarterConsignBill.RowCount > 0)
     {
         if (GlobalProperty.OperatorCode != dgvBarterConsignBill.CurrentRow.Cells["OperatorCode"].Value.ToString())
         {
             MessageBox.Show("非本记录的录入人员,不许允许修改!", "软件提示");
             return;
         }
         FormRetailBarterConsignBillInput formRetailBarterConsignBillInput = new FormRetailBarterConsignBillInput();
         formRetailBarterConsignBillInput.Tag   = "Edit";
         formRetailBarterConsignBillInput.Owner = this;
         formRetailBarterConsignBillInput.ShowDialog();
     }
 }
Esempio n. 4
0
        private void FormBrowseRetailBarterBaseBillOther_Load(object sender, EventArgs e)
        {
            ControlBindDataSource cbds = new ControlBindDataSource();

            cbds.BindDataSource(this);
            cbds.DataGridViewComboBoxColumnBindDataSource(GoodsTypeCode, "GoodsTypeCode", "GoodsTypeName", "Select * From GoodsType", "GoodsType");
            cbds.DataGridViewComboBoxColumnBindDataSource(GoodsSeriesCode, "GoodsSeriesCode", "GoodsSeriesName", "Select * From GoodsSeries", "GoodsSeries");
            cbds.DataGridViewComboBoxColumnBindDataSource(GoodsTypeCode1, "GoodsTypeCode", "GoodsTypeName", "Select * From GoodsType", "GoodsType");
            cbds.DataGridViewComboBoxColumnBindDataSource(GoodsSeriesCode1, "GoodsSeriesCode", "GoodsSeriesName", "Select * From GoodsSeries", "GoodsSeries");
            cbds.DataGridViewComboBoxColumnBindDataSource(EmployeeCode1, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee");
            cbds.DataGridViewComboBoxColumnBindDataSource(OperatorCode, "OperatorCode", "OperatorName", "Select * From Operator", "Operator");
            useful.InitFormContros(this, null);
            dtpBarterBillDate.Checked = false;
            if (this.Owner.GetType() == typeof(FormRetailBarterExchangeBillInput))  //调款单
            {
                formRetailBarterExchangeBillInput = (FormRetailBarterExchangeBillInput)this.Owner;
                chbIsExchange.Visible             = true;
            }
            if (this.Owner.GetType() == typeof(FormRetailBarterConsignBillInput))  //发货单
            {
                formRetailBarterConsignBillInput = (FormRetailBarterConsignBillInput)this.Owner;
                chbIsConsign.Visible             = true;
            }
        }