예제 #1
0
 public void llenarReservarViaje()
 {
     ControllerViaje _controllerViaje = new ControllerViaje();
     ControllerPropiedades _controllerPropiedad = new ControllerPropiedades();
     DropDownList_Viaje_Propiedades.DataSource = _controllerViaje.obtenerViajesUsuario();
     DropDownList_Viaje_Propiedades.DataBind();
     DropDownList_Viaje_Propiedades.Visible = true;
     DropDownList_Localidad_ListarPropiedad.DataSource = _controllerPropiedad.obtenerTipo("ObtenerLocalidad");
     DropDownList_Localidad_ListarPropiedad.DataBind();
     Label_Viaje.Visible = true;
 }
예제 #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_CrearReservar_CrearViaje_Click(object sender, EventArgs e)
        {
            ControllerViaje _viaje = new ControllerViaje();
            ControllerUsuario _usuario = new ControllerUsuario();

            String[] _datos = new String[5];
            _datos[0] = DropDownListFEAno_CV.SelectedValue + "/" + DropDownListDEMes_CV.SelectedIndex + "/" + DropDownListFEDia_CrearViaje.SelectedValue;
            _datos[1] = DropDownListFSAno_CV.SelectedValue + "/" + DropDownListFSMes_CV.SelectedIndex + "/" + DropDownListFSDia_CV.SelectedValue;
            _datos[2] = TextBox_Titulo_CrearViaje.Text;
            _datos[3] = null;
            _datos[4] = _usuario.getLogin();
            _viaje.setidViaje(_viaje.reservarViaje(_datos));
               // llenarReservarViaje();
            DropDownList_Viaje_Propiedades.Visible = false;
            Label_Viaje.Visible = false;
            MultiViewTabControl.ActiveViewIndex = 3;
        }
예제 #3
0
        protected void Button_Reservar_Propiedades_Click(object sender, EventArgs e)
        {
            ControllerViaje _viaje = new ControllerViaje();
            String[] pdatos = new String[2];
            int index;
            pdatos[0] = DropDownListFIAno_P.SelectedValue + "/" + DropDownListFIMes_P.SelectedIndex + "/" + DropDownListFIDia_Propiedades.SelectedValue;
            pdatos[1] = DropDownListFFAno_P.SelectedValue + "/" + DropDownListFFMes_P.SelectedIndex + "/" + DropDownListFFDia_P.SelectedValue;

            index = GridView_Propiedades.SelectedIndex;

            String retorno =_viaje.realizarReservacion(pdatos);

            ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "alert("+retorno+"');", true);
        }
예제 #4
0
 /// <summary>
 /// Dispara este método cuando se hace un index de cambio de viaje
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void CambioViaje(object sender, EventArgs e)
 {
     ControllerViaje _controllerViaje = new ControllerViaje();
     _controllerViaje.setidViajeIndex(DropDownList_Viaje_Propiedades.SelectedIndex);
 }
예제 #5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_CrearViaje_CrearViaje_Click(object sender, EventArgs e)
        {
            ControllerViaje _viaje = new ControllerViaje();
            ControllerUsuario _usuario = new ControllerUsuario();

            String[] _datos = new String[5];
            _datos[0] = DropDownListFEAno_CV.SelectedValue + "/" + DropDownListDEMes_CV.SelectedIndex + "/" + DropDownListFEDia_CrearViaje.SelectedValue;
            _datos[1] = DropDownListFSAno_CV.SelectedValue + "/" + DropDownListFSMes_CV.SelectedIndex + "/" + DropDownListFSDia_CV.SelectedValue;
            _datos[2] = TextBox_Titulo_CrearViaje.Text;
            _datos[3] = null;
            _datos[4] = _usuario.getLogin();

            if (string.IsNullOrEmpty(TextBox_Titulo_CrearViaje.Text))
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "alert(Debe darle un nombre a este viaje);", true);
            }
            else
            {
                string value = "Numero de viaje "+ _viaje.reservarViaje(_datos);
                ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "alert(" + value + ");", true);

            }
        }