public int Delete(TC_OA_WorkConcertModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new TC_OA_WorkConcertBLL().Delete(ObjModel.Code, 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) { TC_OA_WorkConcertModel objModel = this.GetModel(Code, Transaction); objModel.Auditing = 3; return(this.Update(objModel, Transaction)); }
public TC_OA_WorkConcertModel GetTC_OA_WorkConcert(int Code) { TC_OA_WorkConcertModel model = new TC_OA_WorkConcertModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new TC_OA_WorkConcertBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public int Update(TC_OA_WorkConcertModel ObjModel, SqlTransaction Transaction) { TC_OA_WorkConcertDAL tdal = new TC_OA_WorkConcertDAL(Transaction); return(tdal.Update(ObjModel)); }