public ContenedorPlato LlamarSPCrear(ContenedorPlato nPlato) { if (ValidarPerfilCUD(nPlato.Retorno.Token)) { var p_OUT_CODRET = new ObjectParameter("P_OUT_CODRET", typeof(decimal)); var p_OUT_GLSRET = new ObjectParameter("P_OUT_GLSRET", typeof(string)); var p_OUT_CODIGO = new ObjectParameter("P_OUT_CODIGO", typeof(decimal)); CapaDato.EntitiesBBDDHostel conex = new CapaDato.EntitiesBBDDHostel(); conex.SP_CREAR_PLATO (nPlato.Item.Nombre , nPlato.Item.Descripcion , nPlato.Item.Disponible , nPlato.Item.TipoServicio , p_OUT_CODRET , p_OUT_GLSRET , p_OUT_CODIGO ); try { nPlato.Item.Codigo = decimal.Parse(p_OUT_CODIGO.Value.ToString()); nPlato.Retorno.Codigo = decimal.Parse(p_OUT_CODRET.Value.ToString()); nPlato.Retorno.Glosa = p_OUT_GLSRET.Value.ToString(); } catch (Exception) { nPlato.Item.Codigo = 0; nPlato.Retorno.Codigo = 1011; nPlato.Retorno.Glosa = "Err codret ORACLE"; } } else { nPlato.Retorno.Codigo = 100; nPlato.Retorno.Glosa = "Err expiro sesion o perfil invalido"; } return(nPlato); }