public static void EliminarPersona(SolicitudPersona solper) { try { var command = new MySqlCommand() { CommandText = "eliminar_persona_seleccionada", CommandType = System.Data.CommandType.StoredProcedure }; command.Parameters.Add(new MySqlParameter() { ParameterName = "in_refSolicitud", Direction = System.Data.ParameterDirection.Input, Value = solper.RefSolicitud }); command.Parameters.Add(new MySqlParameter() { ParameterName = "in_refPersona", Direction = System.Data.ParameterDirection.Input, Value = solper.RefPersona }); //command.Parameters.Add(new MySqlParameter() { ParameterName = "out_id", Direction = System.Data.ParameterDirection.Output, Value = -1 }); var datos = ContexDb.ExecuteProcedure(command); //saber.Id = Convert.ToInt32(datos.Parameters["out_id"].Value); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public IActionResult EliminarPersona(String Run) { SolicitudPersona solper = new SolicitudPersona() { RefPersona = Run, RefSolicitud = _requestHandler.GetIdSolicitud() }; if (ModelState.IsValid) { ConsultaSolicitud.EliminarPersona(solper); return(IrPersona()); } return(View(solper)); }