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