private void FrmAPMCheckOutReport_ItemSearching(object sender, EventArgs e) { APMCheckOutRecordSearchCondition con = new APMCheckOutRecordSearchCondition(); con.RecordDateTimeRange = new DateTimeRange(ucDateTimeInterval1.StartDateTime, ucDateTimeInterval1.EndDateTime); con.MID = comAPM.Text; con.APMOperator = this.txtAPMOperator.Text.Trim(); GridView.Rows.Clear(); List <APMCheckOutRecord> items = (new APMChectOutRecordBll(AppSettings.CurrentSetting.ParkConnect)).GetItems(con).QueryObjects; foreach (APMCheckOutRecord item in items) { int row = this.GridView.Rows.Add(); ShowAPMCheckOutRecordOnRow(GridView.Rows[row], item); } }
protected override List <APMCheckOutRecord> GetingItems(ParkDataContext parking, SearchCondition search) { if (search is APMCheckOutRecordSearchCondition) { IQueryable <APMCheckOutRecord> result = parking.GetTable <APMCheckOutRecord>(); APMCheckOutRecordSearchCondition condition = search as APMCheckOutRecordSearchCondition; result = result.Where(item => item.CheckOutDateTime >= condition.RecordDateTimeRange.Begin && item.CheckOutDateTime <= condition.RecordDateTimeRange.End); if (!string.IsNullOrEmpty(condition.MID)) { result = result.Where(item => item.MID == condition.MID); } if (!string.IsNullOrEmpty(condition.APMOperator)) { result = result.Where(item => item.APMOperator == condition.APMOperator); } return(result.ToList()); } return(new List <APMCheckOutRecord>()); }
public QueryResultList <APMCheckOutRecord> GetItems(APMCheckOutRecordSearchCondition con) { return(_Provider.GetItems(con)); }