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; } }
private void FormBrowseRetailBarterExchangeBill_Load(object sender, EventArgs e) { formRetailBarterExchangeBill = (FormRetailBarterExchangeBill)this.Owner; ControlBindDataSource cbds = new ControlBindDataSource(); cbds.BindDataSource(this); useful.InitFormContros(this, null); dtpAppendDate.Checked = false; dtpTradeDate.Checked = false; }
private void FormBrowseRetailUntreadRefundBill_Load(object sender, EventArgs e) { formRetailUntreadRefundBill = (FormRetailUntreadRefundBill)this.Owner; ControlBindDataSource cbds = new ControlBindDataSource(); cbds.BindDataSource(this); useful.InitFormContros(this, null); dtpAppendDate.Checked = false; dtpUntreadMoneyDate.Checked = false; }
private void FormRetailBarterExchangeBillInput_Load(object sender, EventArgs e) { formRetailBarterExchangeBill = (FormRetailBarterExchangeBill)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 = "修改单据"; txtBarterBillNo.Text = formRetailBarterExchangeBill.dgvBarterExchangeBill.CurrentRow.Cells["BarterBillNo"].Value.ToString(); RetrieveBarterBaseInfo(txtBarterBillNo.Text); GetBarterExchangeInfo(txtBarterBillNo.Text); txtBarterBillNo.Enabled = false; btnBrowse.Enabled = false; } }
private void FormBrowseRetailUntreadBaseBillOther_Load(object sender, EventArgs e) { if (this.Owner.GetType() == typeof(FormRetailUntreadGatherBillInput)) { formRetailUntreadGatherBillInput = (FormRetailUntreadGatherBillInput)this.Owner; chbIsGather.Visible = true; } if (this.Owner.GetType() == typeof(FormRetailUntreadRefundBillInput)) { formRetailUntreadRefundBillInput = (FormRetailUntreadRefundBillInput)this.Owner; chbIsRefund.Visible = true; } 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(EmployeeCode1, "EmployeeCode", "EmployeeName", "Select * From Employee", "Employee"); cbds.DataGridViewComboBoxColumnBindDataSource(OperatorCode, "OperatorCode", "OperatorName", "Select * From Operator", "Operator"); useful.InitFormContros(this, null); dtpUntreadBillDate.Checked = false; }
private void FormRetailUntreadGatherBillInput_Load(object sender, EventArgs e) { formRetailUntreadGatherBill = (FormRetailUntreadGatherBill)this.Owner; ControlBindDataSource cbds = new ControlBindDataSource(); cbds.BindDataSource(this); if (this.Tag.ToString() == "Add") { this.Text = "添加单据"; useful.InitFormContros(this, null); } if (this.Tag.ToString() == "Edit") { this.Text = "修改单据"; useful.SetControlsState(groupBox1, false); txtUntreadBillNo.Enabled = false; btnBrowse.Enabled = false; txtUntreadBillNo.Text = formRetailUntreadGatherBill.dgvUntreadGatherBill.CurrentRow.Cells["UntreadBillNo"].Value.ToString(); RetrieveUntreadBaseBillInfo(txtUntreadBillNo.Text.Trim()); GetUntreadGatherBillInfo(txtUntreadBillNo.Text.Trim()); } }
private void FormRetailBarterBaseBillInput_Load(object sender, EventArgs e) { ControlBindDataSource cbds = new ControlBindDataSource(); cbds.BindDataSource(this); useful.InitFormContros(groupBox1, null); formRetailBarterBaseBill = (FormRetailBarterBaseBill)this.Owner; if (this.Tag.ToString() == "Add") { btnCD.Enabled = false; this.Text = "添加单据"; txtBarterBillNo.Text = useful.BuildCode("BarterBaseBill", "Where OperatorCode = '" + GlobalProperty.OperatorCode + "'", "BarterBillNo", "HH" + GlobalProperty.DBTime.Year.ToString(), 7); } else { btnCD.Enabled = true; this.Text = "修改单据"; //chbIsAmendBillNo.Enabled = false; txtBarterBillNo.Text = formRetailBarterBaseBill.dgvBarterBaseBill.CurrentRow.Cells["BarterBillNo"].Value.ToString(); GetBarterBaseBillInfo(txtBarterBillNo.Text); } }
private void FormRetailSaleConsignBillInput_Load(object sender, EventArgs e) { formRetailSaleConsignBill = (FormRetailSaleConsignBill)this.Owner; ControlBindDataSource cbds = new ControlBindDataSource(); //cbds.BindDataSource(gbOrder); //cbds.BindDataSource(gbTrade); //cbds.BindDataSource(gbConsign); cbds.BindDataSource(this); useful.InitFormContros(this, null); //useful.InitFormContros(gbOrder); //useful.InitFormContros(gbTrade); //useful.InitFormContros(gbConsign); if (this.Tag.ToString() == "Add") { this.Text = "添加单据"; btnCD.Enabled = false; } if (this.Tag.ToString() == "Edit") { this.Text = "修改单据"; m_SaleConsignBillId = Convert.ToInt32(formRetailSaleConsignBill.dgvSaleConsignBill.CurrentRow.Cells["Id"].Value); btnCD.Enabled = true; txtSaleBillNo.Text = formRetailSaleConsignBill.dgvSaleConsignBill.CurrentRow.Cells["SaleBillNo"].Value.ToString(); txtSaleBillNo.ReadOnly = true; btnBrowse.Enabled = false; //检索并设置订货单信息 RetrieveOrderBillInfo(txtSaleBillNo.Text.Trim()); //检索并设置交易单信息 RetrieveTradeBillInfo(txtSaleBillNo.Text.Trim()); //设置发货单信息 DataTable dt = formRetailSaleConsignBill.bsSaleConsignBill.DataSource as DataTable; Int32 intId = Convert.ToInt32(formRetailSaleConsignBill.dgvSaleConsignBill.CurrentRow.Cells["Id"].Value); DataRow dr = dt.AsEnumerable().FirstOrDefault(itm => itm.Field <int>("Id") == intId); SetConsignBillInfo(dr); } }