public List <GK_OA_OfficialSealOutModel> GetGK_OA_OfficialSealOutList(string SortColumns, int StartRecord, int MaxRecords, DateTime RegiesterDateEqualStart, DateTime RegiesterDateEqualEnd, string UnitCodeEqual, string StatusEqual) { List <GK_OA_OfficialSealOutModel> models = new List <GK_OA_OfficialSealOutModel>(); GK_OA_OfficialSealOutQueryModel objQueryModel = new GK_OA_OfficialSealOutQueryModel(); 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_OfficialSealOutBLL().GetModels(objQueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }
public int Update(GK_OA_OfficialSealOutModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new GK_OA_OfficialSealOutBLL().Update(ObjModel, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public GK_OA_OfficialSealOutModel GetGK_OA_OfficialSealOut(int Code) { GK_OA_OfficialSealOutModel model = new GK_OA_OfficialSealOutModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new GK_OA_OfficialSealOutBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public List <GK_OA_OfficialSealOutModel> GetGK_OA_OfficialSealOutListOne(int Code) { List <GK_OA_OfficialSealOutModel> list = new List <GK_OA_OfficialSealOutModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); GK_OA_OfficialSealOutBLL tbll = new GK_OA_OfficialSealOutBLL(); list.Add(tbll.GetModel(Code, connection)); connection.Close(); } catch (SqlException exception) { throw exception; } } return(list); }
public List <GK_OA_OfficialSealOutModel> GetGK_OA_OfficialSealOutList(GK_OA_OfficialSealOutQueryModel QueryModel) { List <GK_OA_OfficialSealOutModel> models = new List <GK_OA_OfficialSealOutModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); if (QueryModel == null) { QueryModel = new GK_OA_OfficialSealOutQueryModel(); } models = new GK_OA_OfficialSealOutBLL().GetModels(QueryModel, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(models); }