protected void QueryOne(string operate, string orderBy) { string whereEx = string.Empty; if (string.IsNullOrEmpty(_where)) { whereEx = " 1=1 "; } else { whereEx = _where; } if (_entity != null) { whereEx += " and code " + operate + _entity.code; } List <FishEntity.CallRecordsEntity> list = _bll.GetModelList(whereEx + _rolewhere + orderBy); if (list == null || list.Count < 1) { MessageBox.Show("已经没有记录了!"); return; } panel1.Enabled = true; _entity = list[0]; SetCallRecord(); _detail = _detailBll.GetModelList("callrecordid=" + _entity.id); dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = _detail; }
public override int Query() { string where = GetWhere(); List <FishEntity.CallRecordsEntity> list = _bll.GetModelList(where); dataGridView1.DataSource = list; return(1); }
public FormCallRecordOfCompnay(string companycode) { InitializeComponent(); ReadColumnConfig(dataGridView1, "Set_CallRecordOfCompnay"); dataGridView1.BackgroundColor = this.BackColor; dataGridView1.AutoGenerateColumns = false; string where = string.Format("customercode='{0}'", companycode); FishBll.Bll.CallRecordsBll bll = new FishBll.Bll.CallRecordsBll(); List <FishEntity.CallRecordsEntity> list = bll.GetModelList(where); dataGridView1.DataSource = list; }