public List <GK_OA_OfficialSealRegiesterModel> GetGK_OA_OfficialSealRegiesterList(string SortColumns, int StartRecord, int MaxRecords, DateTime RegiesterDateEqualStart, DateTime RegiesterDateEqualEnd, string UnitCodeEqual, string StatusEqual) { List <GK_OA_OfficialSealRegiesterModel> models = new List <GK_OA_OfficialSealRegiesterModel>(); GK_OA_OfficialSealRegiesterQueryModel objQueryModel = new GK_OA_OfficialSealRegiesterQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.RegiesterDateEqualStart = RegiesterDateEqualStart; objQueryModel.RegiesterDateEqualEnd = RegiesterDateEqualEnd; objQueryModel.UnitCodeEqual = UnitCodeEqual; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_OfficialSealRegiesterBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
private List <GK_OA_OfficialSealRegiesterModel> _Select(GK_OA_OfficialSealRegiesterQueryModel qmObj) { List <GK_OA_OfficialSealRegiesterModel> list = new List <GK_OA_OfficialSealRegiesterModel>(); StringBuilder builder = new StringBuilder(); builder.Append("select * from GK_OA_OfficialSealRegiester "); 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_OfficialSealRegiesterModel model = new GK_OA_OfficialSealRegiesterModel(); 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_OfficialSealRegiesterModel> GetGK_OA_OfficialSealRegiesterList(GK_OA_OfficialSealRegiesterQueryModel QueryModel) { List <GK_OA_OfficialSealRegiesterModel> models = new List <GK_OA_OfficialSealRegiesterModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_OfficialSealRegiesterQueryModel(); } models = new GK_OA_OfficialSealRegiesterBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List<GK_OA_OfficialSealRegiesterModel> Select(GK_OA_OfficialSealRegiesterQueryModel qmObj) { return this._Select(qmObj); }
public List<GK_OA_OfficialSealRegiesterModel> Select() { GK_OA_OfficialSealRegiesterQueryModel qmObj = new GK_OA_OfficialSealRegiesterQueryModel(); return this._Select(qmObj); }
public List <GK_OA_OfficialSealRegiesterModel> GetModels(GK_OA_OfficialSealRegiesterQueryModel ObjQueryModel, SqlTransaction Transaction) { GK_OA_OfficialSealRegiesterDAL rdal = new GK_OA_OfficialSealRegiesterDAL(Transaction); return(rdal.Select(ObjQueryModel)); }