public static void RegistrarRolesXMenu(Rol_X_Menu _rol_x_menu) { try { using (SqlConnection con = DataBaseManager.OpenSqlDatabase(user, pass, servidor, baseDatos)) { using (SqlCommand command = con.CreateCommand()) { command.CommandText = "sp_roles_x_menu"; command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@IF_ROL", _rol_x_menu.Rol.Id_rol); command.Parameters.AddWithValue("@IF_PERMISO", _rol_x_menu.Menu.Id_menu); command.ExecuteNonQuery(); } } } catch (Exception ex) { throw ex; } }
public static void RegistrarRolesXMenu(Rol_X_Menu _rol_x_menu) { try { ConsultasAd.RegistrarRolesXMenu(_rol_x_menu); } catch (Exception ex) { throw ex; } }