public ContenedorHabitacion HabitacionEliminar(ContenedorHabitacion entrada) { CRUDHabitacion x = new CRUDHabitacion(); x.LlamarSPEliminar(entrada); return(entrada); }
public ContenedorHabitacion HabitacionActPrecioXCapacidad(ContenedorHabitacion entrada) { CRUDHabitacion x = new CRUDHabitacion(); x.LlamarSPActPrecioXCapacidad(entrada); return(entrada); }
public ContenedorHabitacion HabitacionActualizar(ContenedorHabitacion entrada) { CRUDHabitacion x = new CRUDHabitacion(); x.LlamarSPActualizar(entrada); return(entrada); }
public ContenedorHabitacion LlamarSPActPrecioXCapacidad(ContenedorHabitacion aHabitacion) { if (ValidarFecExp(aHabitacion.Retorno.Token)) { var p_OUT_CODRET = new ObjectParameter("P_OUT_CODRET", typeof(decimal)); var p_OUT_GLSRET = new ObjectParameter("P_OUT_GLSRET", typeof(string)); CapaDato.EntitiesBBDDHostel conex = new CapaDato.EntitiesBBDDHostel(); conex.SP_ACT_HAB_PRECIOXCAPACIDAD (aHabitacion.Item.Capacidad , aHabitacion.Item.Precio , p_OUT_CODRET , p_OUT_GLSRET ); try { aHabitacion.Retorno.Codigo = decimal.Parse(p_OUT_CODRET.Value.ToString()); aHabitacion.Retorno.Glosa = p_OUT_GLSRET.Value.ToString(); } catch (Exception) { aHabitacion.Retorno.Codigo = 1011; aHabitacion.Retorno.Glosa = "Err codret ORACLE"; } } else { aHabitacion.Retorno.Codigo = 100; aHabitacion.Retorno.Glosa = "Err expiro sesion o perfil invalido"; } return(aHabitacion); }
public ContenedorHabitacion LlamarSPEliminar(ContenedorHabitacion eHabitacion) { if (ValidarFecExp(eHabitacion.Retorno.Token)) { var p_OUT_CODRET = new ObjectParameter("P_OUT_CODRET", typeof(decimal)); var p_OUT_GLSRET = new ObjectParameter("P_OUT_GLSRET", typeof(string)); CapaDato.EntitiesBBDDHostel conex = new CapaDato.EntitiesBBDDHostel(); conex.SP_ELIMINAR_HABITACION (eHabitacion.Item.Codigo , p_OUT_CODRET , p_OUT_GLSRET ); try { eHabitacion.Retorno.Codigo = decimal.Parse(p_OUT_CODRET.Value.ToString()); eHabitacion.Retorno.Glosa = p_OUT_GLSRET.Value.ToString(); } catch (Exception) { eHabitacion.Retorno.Codigo = 1011; eHabitacion.Retorno.Glosa = "Err codret ORACLE"; } } else { eHabitacion.Retorno.Codigo = 100; eHabitacion.Retorno.Glosa = "Err expiro sesion o perfil invalido"; } return(eHabitacion); }
protected void btnModificar2_Click(object sender, EventArgs e) { if (validarText2()) { WSSoap.WSSHostelClient x = new WSSoap.WSSHostelClient(); ContenedorHabitacion xH = new ContenedorHabitacion(); xH.Item.Capacidad = int.Parse(ddlTipoHabitacion.SelectedValue); xH.Item.Precio = int.Parse(txtPrecio2.Text); // xH.Retorno.Token = Session["TokenUsuario"].ToString(); xH = x.HabitacionActPrecioXCapacidad(xH); if (xH.Retorno.Codigo == 0) { RescatarDatos(); } } }
public ContenedorHabitacion LlamarSPCrear(ContenedorHabitacion nHabitacion) { if (ValidarFecExp(nHabitacion.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_HABITACION (nHabitacion.Item.Estado , nHabitacion.Item.Capacidad , nHabitacion.Item.Descripcion , nHabitacion.Item.Precio , p_OUT_CODRET , p_OUT_GLSRET , p_OUT_CODIGO ); try { nHabitacion.Item.Codigo = int.Parse(p_OUT_CODIGO.Value.ToString()); nHabitacion.Retorno.Codigo = decimal.Parse(p_OUT_CODRET.Value.ToString()); nHabitacion.Retorno.Glosa = p_OUT_GLSRET.Value.ToString(); } catch (Exception) { nHabitacion.Item.Codigo = 0; nHabitacion.Retorno.Codigo = 1011; nHabitacion.Retorno.Glosa = "Err codret ORACLE"; } } else { nHabitacion.Retorno.Codigo = 100; nHabitacion.Retorno.Glosa = "Err expiro sesion o perfil invalido"; } return(nHabitacion); }