public List <GK_OA_OutFileSignModel> GetGK_OA_OutFileSignList(string SortColumns, int StartRecord, int MaxRecords, string FileTitleEqual, string FileCodeEqual, string OutFileCodeEqual, string UnitCodeEqual, DateTime RegisterDateEqualStart, DateTime RegisterDateEqualEnd, string StatusEqual) { List <GK_OA_OutFileSignModel> models = new List <GK_OA_OutFileSignModel>(); GK_OA_OutFileSignQueryModel objQueryModel = new GK_OA_OutFileSignQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.FileTitleEqual = FileTitleEqual; objQueryModel.FileCodeEqual = FileCodeEqual; objQueryModel.OutFileCodeEqual = OutFileCodeEqual; objQueryModel.RegisterDateEqualStart = RegisterDateEqualStart; objQueryModel.RegisterDateEqualEnd = RegisterDateEqualEnd; objQueryModel.NB_UnitCodeEqual = UnitCodeEqual; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_OutFileSignBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
private List <GK_OA_OutFileSignModel> _Select(GK_OA_OutFileSignQueryModel qmObj) { List <GK_OA_OutFileSignModel> list = new List <GK_OA_OutFileSignModel>(); StringBuilder builder = new StringBuilder(); builder.Append("select * from GK_OA_OutFileSign "); 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_OutFileSignModel model = new GK_OA_OutFileSignModel(); 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_OutFileSignModel> GetGK_OA_OutFileSignList(GK_OA_OutFileSignQueryModel QueryModel) { List <GK_OA_OutFileSignModel> models = new List <GK_OA_OutFileSignModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_OutFileSignQueryModel(); } models = new GK_OA_OutFileSignBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List <GK_OA_OutFileSignModel> GetModels(GK_OA_OutFileSignQueryModel ObjQueryModel, SqlTransaction Transaction) { GK_OA_OutFileSignDAL ndal = new GK_OA_OutFileSignDAL(Transaction); return(ndal.Select(ObjQueryModel)); }
public List <GK_OA_OutFileSignModel> Select(GK_OA_OutFileSignQueryModel qmObj) { return(this._Select(qmObj)); }
public List <GK_OA_OutFileSignModel> Select() { GK_OA_OutFileSignQueryModel qmObj = new GK_OA_OutFileSignQueryModel(); return(this._Select(qmObj)); }