public List <GK_OA_EvectionApplyModel> GetGK_OA_EvectionApplyList(string SortColumns, int StartRecord, int MaxRecords, string DeptEqual, string LiveLevelEqual, string ApplyerEqual, DateTime ApplyStartDate, DateTime ApplyEndDate, string StatusEqual) { List <GK_OA_EvectionApplyModel> models = new List <GK_OA_EvectionApplyModel>(); GK_OA_EvectionApplyQueryModel objQueryModel = new GK_OA_EvectionApplyQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.DeptEqual = DeptEqual; objQueryModel.LiveLevelEqual = LiveLevelEqual; objQueryModel.ApplyerEqual = ApplyerEqual; objQueryModel.ApplyStartDateEqual = ApplyStartDate; objQueryModel.ApplyEndDateEqual = ApplyEndDate; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_EvectionApplyBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
private List <GK_OA_EvectionApplyModel> _Select(GK_OA_EvectionApplyQueryModel qmObj) { List <GK_OA_EvectionApplyModel> list = new List <GK_OA_EvectionApplyModel>(); StringBuilder builder = new StringBuilder(); builder.Append("select * from GK_OA_EvectionApply "); builder.Append(qmObj.QueryConditionStr); if (qmObj.SortColumns.Length == 0) { builder.Append(" ORDER BY Code desc"); } else { builder.Append(" ORDER BY " + qmObj.SortColumns); } this._DataProcess.CommandText = builder.ToString(); this._DataProcess.SqlParameters = qmObj.Parameters; SqlDataReader sqlDataReader = null; int num = 0; try { try { sqlDataReader = this._DataProcess.GetSqlDataReader(); while (sqlDataReader.Read()) { if ((num >= qmObj.StartRecord) && ((list.Count < qmObj.MaxRecords) || (qmObj.MaxRecords == -1))) { GK_OA_EvectionApplyModel model = new GK_OA_EvectionApplyModel(); this.Initialize(sqlDataReader, model); list.Add(model); } num++; } } catch (SqlException exception) { throw exception; } } finally { if (sqlDataReader != null) { sqlDataReader.Close(); } } return(list); }
public List <GK_OA_EvectionApplyModel> GetGK_OA_EvectionApplyList(GK_OA_EvectionApplyQueryModel QueryModel) { List <GK_OA_EvectionApplyModel> models = new List <GK_OA_EvectionApplyModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_EvectionApplyQueryModel(); } models = new GK_OA_EvectionApplyBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List <GK_OA_EvectionApplyModel> GetModels(GK_OA_EvectionApplyQueryModel ObjQueryModel, SqlTransaction Transaction) { GK_OA_EvectionApplyDAL ydal = new GK_OA_EvectionApplyDAL(Transaction); return(ydal.Select(ObjQueryModel)); }
public List <GK_OA_EvectionApplyModel> Select(GK_OA_EvectionApplyQueryModel qmObj) { return(this._Select(qmObj)); }
public List <GK_OA_EvectionApplyModel> Select() { GK_OA_EvectionApplyQueryModel qmObj = new GK_OA_EvectionApplyQueryModel(); return(this._Select(qmObj)); }