public FormQuotationPriceList(string code) { InitializeComponent(); _model = new FishEntity.QuotationPriceListEntity(); _bll = new FishBll.Bll.QuotationPriceListBll(); InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); InitDataUtil.BindComboBoxData(brand, FishEntity.Constant.Brand, true); InitDataUtil.BindComboBoxData(qualitySpe, FishEntity.Constant.Specification, true); country.SelectedValueChanged -= country_SelectedValueChanged; InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); country.SelectedValueChanged += country_SelectedValueChanged; txtdataForm.Items.Add("报盘"); txtdataForm.Items.Add("确盘"); txtdataForm.Items.Add("现货"); txtdataForm.Items.Add("自营仓库"); txtdataForm.Items.Add("自制仓库"); if (code != "") { _model = _bll.getModel(" code='" + code + "' "); if (_model == null) { MessageBox.Show("已经没有记录了"); return; } setValue(); } }
public FormQuotationPriceList( ) { InitializeComponent( ); _model = new FishEntity.QuotationPriceListEntity( ); _bll = new FishBll.Bll.QuotationPriceListBll( ); InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); InitDataUtil.BindComboBoxData(brand, FishEntity.Constant.Brand, true); InitDataUtil.BindComboBoxData(qualitySpe, FishEntity.Constant.Specification, true); country.SelectedValueChanged -= country_SelectedValueChanged; InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); country.SelectedValueChanged += country_SelectedValueChanged; txtdataForm.Items.Add("报盘"); txtdataForm.Items.Add("确盘"); txtdataForm.Items.Add("现货"); txtdataForm.Items.Add("自营仓库"); txtdataForm.Items.Add("自制仓库"); }
public FormPricingAssociation(string CodeNum) { InitializeComponent(); ReadColumnConfig(dataGridView1, "Set_124"); tmiQuery.Visible = false; tmiSave.Visible = false; tmiReview.Visible = false; tmiprint.Visible = false; tmiPrevious.Visible = false; tmiNext.Visible = false; tmiModify.Visible = false; tmiExport.Visible = false; tmiDelete.Visible = false; tmiClose.Visible = false; tmiCancel.Visible = false; tmiAdd.Visible = true; _bll = new FishBll.Bll.QuotationPriceListBll(); name = CodeNum; Query(); }
public override int Query() { _bll = new FishBll.Bll.QuotationPriceListBll(); strWhere = " 1=1 "; DataTable table = _bll.getTable(strWhere); strWhere = string.Empty; if (table != null && table.Rows.Count > 0) { dataGridView1.Rows.Clear(); for (int i = 0; i < table.Rows.Count; i++) { int idx = dataGridView1.Rows.Add(); DataGridViewRow row = dataGridView1.Rows[idx]; row.Cells["id"].Value = table.Rows[i]["id"].ToString(); row.Cells["CODE"].Value = table.Rows[i]["CODE"].ToString(); row.Cells["fishId"].Value = table.Rows[i]["fishId"].ToString(); row.Cells["priceMY"].Value = table.Rows[i]["priceMY"].ToString(); row.Cells["price"].Value = table.Rows[i]["price"].ToString(); row.Cells["country"].Value = table.Rows[i]["country"].ToString(); row.Cells["brand"].Value = table.Rows[i]["brand"].ToString(); row.Cells["qualitySpe"].Value = table.Rows[i]["qualitySpe"].ToString(); row.Cells["weight"].Value = table.Rows[i]["weight"].ToString(); row.Cells["tvn"].Value = table.Rows[i]["tvn"].ToString(); row.Cells["acid"].Value = table.Rows[i]["acid"].ToString(); row.Cells["protein"].Value = table.Rows[i]["protein"].ToString(); row.Cells["ash"].Value = table.Rows[i]["ash"].ToString(); row.Cells["histamine"].Value = table.Rows[i]["histamine"].ToString(); row.Cells["las"].Value = table.Rows[i]["las"].ToString(); row.Cells["das"].Value = table.Rows[i]["das"].ToString(); row.Cells["salt"].Value = table.Rows[i]["salt"].ToString(); row.Cells["ffa"].Value = table.Rows[i]["ffa"].ToString(); row.Cells["XNfishId"].Value = table.Rows[i]["XNfishId"].ToString(); } } else { MessageBox.Show("查无数据!"); } return(base.Query()); }
private void FormQuotationPriceList_Load(object sender, EventArgs e) { MenuCode = "M452"; ControlButtomRoles(); if (Megres.oddNum != null && Megres.oddNum != "") { _model = new FishEntity.QuotationPriceListEntity(); _bll = new FishBll.Bll.QuotationPriceListBll(); InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); InitDataUtil.BindComboBoxData(brand, FishEntity.Constant.Brand, true); InitDataUtil.BindComboBoxData(qualitySpe, FishEntity.Constant.Specification, true); txtdataForm.Items.Add("自营仓库"); txtdataForm.Items.Add("入库申请单"); _model = _bll.getModel(" code = '" + Megres.oddNum + "' "); if (_model == null) { MessageBox.Show("已经没有记录了"); } else { setValue(); } } }
private void FormQuotationPriceListQuery_Load(object sender, EventArgs e) { FishBll.Bll.QuotationPriceListBll _bll = new FishBll.Bll.QuotationPriceListBll( ); comboBox1.DataSource = _bll.getCodeT( ); comboBox1.DisplayMember = "code"; }