public int Delete(TY_ReferendumReportModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new TY_ReferendumReportBLL().Delete(ObjModel.ReferendumReportCode, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public int ModifyPassAuditing(int Code, SqlTransaction Transaction) { TY_ReferendumReportModel objModel = this.GetModel(Code, Transaction); objModel.Audit = "3"; return(this.Update(objModel, Transaction)); }
public TY_ReferendumReportModel GetTY_ReferendumReport(int Code) { TY_ReferendumReportModel model = new TY_ReferendumReportModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); try { model = new TY_ReferendumReportBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public int Update(TY_ReferendumReportModel ObjModel, SqlTransaction Transaction) { TY_ReferendumReportDAL tdal = new TY_ReferendumReportDAL(Transaction); return(tdal.Update(ObjModel)); }