protected void QueryByWhere( ) { _bll = new FishBll.Bll.PresaleRequisitionBll( ); List <FishEntity.PresaleRequisitionHeadEntity> list = _bll.GetModelList(_where + _rolewhere + _orderBy); if (list == null || list.Count < 1) { MessageBox.Show("查无记录。"); } else { _model = list [0]; dataGridView1.Rows.Clear( ); dataGridView2.Rows.Clear( ); dataGridView3.Rows.Clear( ); dataGridView4.Rows.Clear( ); Clear( ); SetPresaleRequisition( ); Sethappening( ); Setsgsindicators( ); SetIndex( ); Ship( ); tmiModify.Visible = true; tmiDelete.Visible = true; tmiNext.Visible = true; tmiPrevious.Visible = true; tmiReview.Visible = true; } panel1.Enabled = true; }
protected void QueryOne(string operate, string orderBy) { panel1.Enabled = true; _rolewhere = string.Empty; if (string.IsNullOrEmpty(_where)) { _rolewhere = "1=1"; } else { _rolewhere = _where; } if (_model != null) { _rolewhere += " AND code " + operate + "'" + _model.code + "'"; } List <FishEntity.PresaleRequisitionHeadEntity> list = _bll.GetModelList(_rolewhere + _orderBy); if (list == null || list.Count < 1) { //_Pres = null; MessageBox.Show("查无记录。"); } else { _model = list [0]; dataGridView1.Rows.Clear( ); dataGridView2.Rows.Clear( ); dataGridView3.Rows.Clear( ); dataGridView4.Rows.Clear( ); Clear( ); SetPresaleRequisition( ); Sethappening( ); Setsgsindicators( ); SetIndex( ); Ship( ); tmiSave.Visible = false; tmiCancel.Visible = false; tmiAdd.Visible = true; tmiModify.Visible = true; tmiQuery.Visible = true; tmiDelete.Visible = true; tmiClose.Visible = true; tmiNext.Visible = true; tmiPrevious.Visible = true; tmiExport.Visible = true; } }