public List <GK_OA_ChangeStationNoticeModel> GetGK_OA_ChangeStationNoticeList(string SortColumns, int StartRecord, int MaxRecords, string SystemCodeEqual, string FileCodeEqual, string UnitCodeEqual, string PersonNameEqual, DateTime InComDateEqualStart, DateTime InComDateEqualEnd, string OldStationEqual, string NewStationEqual, string StatusEqual) { List <GK_OA_ChangeStationNoticeModel> models = new List <GK_OA_ChangeStationNoticeModel>(); GK_OA_ChangeStationNoticeQueryModel objQueryModel = new GK_OA_ChangeStationNoticeQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.SystemCodeEqual = SystemCodeEqual; objQueryModel.FileCodeEqual = FileCodeEqual; objQueryModel.PersonNameEqual = PersonNameEqual; objQueryModel.NewUnitCodeEqual = UnitCodeEqual; objQueryModel.InComDateEqualStart = InComDateEqualStart; objQueryModel.InComDateEqualEnd = InComDateEqualEnd; objQueryModel.OldStationEqual = OldStationEqual; objQueryModel.NewStationEqual = NewStationEqual; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_ChangeStationNoticeBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public int Update(GK_OA_ChangeStationNoticeModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new GK_OA_ChangeStationNoticeBLL().Update(ObjModel, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public int ModifyNotPassAuditing(int Code) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new GK_OA_ChangeStationNoticeBLL().ModifyNotPassAuditing(Code, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public GK_OA_ChangeStationNoticeModel GetGK_OA_ChangeStationNotice(int Code) { GK_OA_ChangeStationNoticeModel model = new GK_OA_ChangeStationNoticeModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new GK_OA_ChangeStationNoticeBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public List <GK_OA_ChangeStationNoticeModel> GetGK_OA_ChangeStationNoticeListOne(int Code) { List <GK_OA_ChangeStationNoticeModel> list = new List <GK_OA_ChangeStationNoticeModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); GK_OA_ChangeStationNoticeBLL ebll = new GK_OA_ChangeStationNoticeBLL(); list.Add(ebll.GetModel(Code, connection)); connection.Close(); } catch (SqlException exception) { throw exception; } } return(list); }
public List <GK_OA_ChangeStationNoticeModel> GetGK_OA_ChangeStationNoticeList(GK_OA_ChangeStationNoticeQueryModel QueryModel) { List <GK_OA_ChangeStationNoticeModel> models = new List <GK_OA_ChangeStationNoticeModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_ChangeStationNoticeQueryModel(); } models = new GK_OA_ChangeStationNoticeBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }