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 override int Query( ) { FormQuotationPriceListQuery form = new FormQuotationPriceListQuery(this.Text + "查询"); if (form.ShowDialog( ) == DialogResult.OK) { strWhere = form.getWhere; _model = _bll.getModel(strWhere); if (_model == null) { MessageBox.Show("已经没有记录了"); return(0); } setValue( ); } 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(); } } }