public List <GK_OA_OutFileRegiesterModel> GetGK_OA_OutFileRegiesterList(string SortColumns, int StartRecord, int MaxRecords, string FileCodeEqual, DateTime RegiesterDateEqualStart, DateTime RegiesterDateEqualEnd, string UnitCodeEqual, string UserCodeEqual) { List <GK_OA_OutFileRegiesterModel> models = new List <GK_OA_OutFileRegiesterModel>(); GK_OA_OutFileRegiesterQueryModel objQueryModel = new GK_OA_OutFileRegiesterQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.FileCodeEqual = FileCodeEqual; objQueryModel.RegiesterDateEqualStart = RegiesterDateEqualStart; objQueryModel.RegiesterDateEqualEnd = RegiesterDateEqualEnd; objQueryModel.UnitCodeEqual = UnitCodeEqual; objQueryModel.UserCodeEqual = UserCodeEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_OutFileRegiesterBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
private List <GK_OA_OutFileRegiesterModel> _Select(GK_OA_OutFileRegiesterQueryModel qmObj) { List <GK_OA_OutFileRegiesterModel> list = new List <GK_OA_OutFileRegiesterModel>(); StringBuilder builder = new StringBuilder(); builder.Append("select * from GK_OA_OutFileRegiester "); 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_OutFileRegiesterModel model = new GK_OA_OutFileRegiesterModel(); 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_OutFileRegiesterModel> GetGK_OA_OutFileRegiesterList(GK_OA_OutFileRegiesterQueryModel QueryModel) { List <GK_OA_OutFileRegiesterModel> models = new List <GK_OA_OutFileRegiesterModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_OutFileRegiesterQueryModel(); } models = new GK_OA_OutFileRegiesterBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List <GK_OA_OutFileRegiesterModel> GetModels(GK_OA_OutFileRegiesterQueryModel ObjQueryModel, SqlTransaction Transaction) { GK_OA_OutFileRegiesterDAL rdal = new GK_OA_OutFileRegiesterDAL(Transaction); return(rdal.Select(ObjQueryModel)); }
public List <GK_OA_OutFileRegiesterModel> Select(GK_OA_OutFileRegiesterQueryModel qmObj) { return(this._Select(qmObj)); }
public List <GK_OA_OutFileRegiesterModel> Select() { GK_OA_OutFileRegiesterQueryModel qmObj = new GK_OA_OutFileRegiesterQueryModel(); return(this._Select(qmObj)); }