public override int Query() { FormFinishedProListQuery form = new FormFinishedProListQuery(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 FormFinishedProList_Load(object sender, EventArgs e) { MenuCode = "M460"; ControlButtomRoles(); InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); InitDataUtil.BindComboBoxData(brand, FishEntity.Constant.Brand, true); _model = new FishEntity.FinishedProListEntity(); _bll = new FishBll.Bll.FinishedProListBll(); if (Megres.oddNum != null && Megres.oddNum != "") { _model = _bll.getModel(" code= '" + Megres.oddNum + "' "); if (_model == null) { MessageBox.Show("没有记录了"); } else { setValue(); } } }
public FormFinishedProList(string name) { InitializeComponent(); MenuCode = "M460"; ControlButtomRoles(); _model = new FishEntity.FinishedProListEntity(); _bll = new FishBll.Bll.FinishedProListBll(); getname1 = name; InitDataUtil.BindComboBoxData(country, FishEntity.Constant.CountryType, true); InitDataUtil.BindComboBoxData(brand, FishEntity.Constant.Brand, true); if (getname1 != "" && getname1 != null) { _model = new FishEntity.FinishedProListEntity(); _bll = new FishBll.Bll.FinishedProListBll(); _model = _bll.getModel(" plCode= '" + getname1 + "' "); if (_model == null) { // MessageBox.Show("没有记录了"); } else { setValue(); } } }