public List <GK_OA_ArchivesCopyModel> GetGK_OA_ArchivesCopyList(string SortColumns, int StartRecord, int MaxRecords, string UnitCodeEqual, string FileNameEqual, string FileCodeEqual, DateTime ReturnDateEqualStart, DateTime ReturnDateEqualEnd, string StatusEqual) { List <GK_OA_ArchivesCopyModel> models = new List <GK_OA_ArchivesCopyModel>(); GK_OA_ArchivesCopyQueryModel objQueryModel = new GK_OA_ArchivesCopyQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.UnitCodeEqual = UnitCodeEqual; objQueryModel.FileNameEqual = FileNameEqual; objQueryModel.FileCodeEqual = FileCodeEqual; objQueryModel.ReturnDateEqualStart = ReturnDateEqualStart; objQueryModel.ReturnDateEqualEnd = ReturnDateEqualEnd; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_ArchivesCopyBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public int Update(GK_OA_ArchivesCopyModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new GK_OA_ArchivesCopyBLL().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_ArchivesCopyBLL().ModifyNotPassAuditing(Code, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public GK_OA_ArchivesCopyModel GetGK_OA_ArchivesCopy(int Code) { GK_OA_ArchivesCopyModel model = new GK_OA_ArchivesCopyModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new GK_OA_ArchivesCopyBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public List <GK_OA_ArchivesCopyModel> GetGK_OA_ArchivesCopyListOne(int Code) { List <GK_OA_ArchivesCopyModel> list = new List <GK_OA_ArchivesCopyModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); GK_OA_ArchivesCopyBLL ybll = new GK_OA_ArchivesCopyBLL(); list.Add(ybll.GetModel(Code, connection)); connection.Close(); } catch (SqlException exception) { throw exception; } } return(list); }
public List <GK_OA_ArchivesCopyModel> GetGK_OA_ArchivesCopyList(GK_OA_ArchivesCopyQueryModel QueryModel) { List <GK_OA_ArchivesCopyModel> models = new List <GK_OA_ArchivesCopyModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_ArchivesCopyQueryModel(); } models = new GK_OA_ArchivesCopyBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }