public List <TY_ReferendumReportModel> GetTY_ReferendumReportList(string SortColumns, int StartRecord, int MaxRecords, int ReferendumReportCodeEqual, string NumberEqual, DateTime StartDateEqual, string StartPersonEqual, string TextTitleEqual, string TextContentEqual, string AuditEqual, string Field1Equal) { List <TY_ReferendumReportModel> models = new List <TY_ReferendumReportModel>(); TY_ReferendumReportQueryModel objQueryModel = new TY_ReferendumReportQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.ReferendumReportCodeEqual = ReferendumReportCodeEqual; objQueryModel.NumberEqual = NumberEqual; objQueryModel.StartDateEqual = StartDateEqual; objQueryModel.StartPersonEqual = StartPersonEqual; objQueryModel.TextTitleEqual = TextTitleEqual; objQueryModel.TextContentEqual = TextContentEqual; objQueryModel.AuditEqual = AuditEqual; objQueryModel.Field1Equal = Field1Equal; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); try { models = new TY_ReferendumReportBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List <TY_ReferendumReportModel> GetTY_ReferendumReportList(TY_ReferendumReportQueryModel QueryModel) { List <TY_ReferendumReportModel> models = new List <TY_ReferendumReportModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); try { if (QueryModel == null) { QueryModel = new TY_ReferendumReportQueryModel(); } models = new TY_ReferendumReportBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public List <TY_ReferendumReportModel> GetModels(TY_ReferendumReportQueryModel ObjQueryModel, SqlTransaction Transaction) { TY_ReferendumReportDAL tdal = new TY_ReferendumReportDAL(Transaction); return(tdal.Select(ObjQueryModel)); }