public List <GK_OA_OfficialSealRegiesterModel> GetGK_OA_OfficialSealRegiesterList(string SortColumns, int StartRecord, int MaxRecords, DateTime RegiesterDateEqualStart, DateTime RegiesterDateEqualEnd, string UnitCodeEqual, string StatusEqual) { List <GK_OA_OfficialSealRegiesterModel> models = new List <GK_OA_OfficialSealRegiesterModel>(); GK_OA_OfficialSealRegiesterQueryModel objQueryModel = new GK_OA_OfficialSealRegiesterQueryModel(); objQueryModel.StartRecord = StartRecord; objQueryModel.MaxRecords = MaxRecords; objQueryModel.SortColumns = SortColumns; objQueryModel.RegiesterDateEqualStart = RegiesterDateEqualStart; objQueryModel.RegiesterDateEqualEnd = RegiesterDateEqualEnd; objQueryModel.UnitCodeEqual = UnitCodeEqual; objQueryModel.StatusEqual = StatusEqual; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); models = new GK_OA_OfficialSealRegiesterBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public int Update(GK_OA_OfficialSealRegiesterModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new GK_OA_OfficialSealRegiesterBLL().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_OfficialSealRegiesterBLL().ModifyNotPassAuditing(Code, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public GK_OA_OfficialSealRegiesterModel GetGK_OA_OfficialSealRegiester(int Code) { GK_OA_OfficialSealRegiesterModel model = new GK_OA_OfficialSealRegiesterModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new GK_OA_OfficialSealRegiesterBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public List <GK_OA_OfficialSealRegiesterModel> GetGK_OA_OfficialSealRegiesterListOne(int Code) { List <GK_OA_OfficialSealRegiesterModel> list = new List <GK_OA_OfficialSealRegiesterModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); GK_OA_OfficialSealRegiesterBLL rbll = new GK_OA_OfficialSealRegiesterBLL(); list.Add(rbll.GetModel(Code, connection)); connection.Close(); } catch (SqlException exception) { throw exception; } } return(list); }
public List <GK_OA_OfficialSealRegiesterModel> GetGK_OA_OfficialSealRegiesterList(GK_OA_OfficialSealRegiesterQueryModel QueryModel) { List <GK_OA_OfficialSealRegiesterModel> models = new List <GK_OA_OfficialSealRegiesterModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_OfficialSealRegiesterQueryModel(); } models = new GK_OA_OfficialSealRegiesterBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }