private void ListaUbicacion() { DropDownListUbicacion.DataValueField = "GeoID"; DropDownListUbicacion.DataTextField = "DescripcionGeo"; DropDownListUbicacion.DataSource = lg.CargarUbicacion(); DropDownListUbicacion.DataBind(); }
protected void B_Solicitud_Click(object sender, EventArgs e) { try { Notificacion notificacion = new Notificacion(); notificacion.IdDestino = int.Parse(DropDownListDestino.SelectedValue); notificacion.IdUbicacion = int.Parse(DropDownListUbicacion.SelectedValue); notificacion.IdCliente = ((Cliente)Session["user"]).IdCliente; notificacion.Tarifa = double.Parse(TextBoxTarifa.Text); notificacion.DescripcionServicio = TextBoxDescripcion.Text; notificacion.Pago = int.Parse(DropDownListPago.SelectedValue); notificacion.FechaCarrera = DateTime.Now.Date; notificacion.Kilometro = double.Parse(TextBoxKilometros.Text); notificacion.Estado = "Pendiente"; new DaoCliente().inserServicio(notificacion); DropDownListDestino.ClearSelection(); DropDownListUbicacion.ClearSelection(); DropDownListPago.ClearSelection(); TextBoxTarifa.Text = ""; TextBoxDescripcion.Text = ""; TextBoxKilometros.Text = ""; L_Pedido.Text = "Por favor espera a que uno de nuestros conductores acepte tu solictud, Recibirá un correo notificando su servicio"; LT_Servicio.Visible = true; L_Destino.Visible = true; L_Ubicacion.Visible = true; DropDownListDestino.Visible = true; DropDownListUbicacion.Visible = true; DropDownListPago.Visible = true; L_Pago.Visible = true; B_Solicitud.Visible = true; B_Calcular.Visible = true; L_tarifa.Visible = true; TextBoxTarifa.Visible = true; TextBoxDescripcion.Visible = true; L_Descripcion.Visible = true; L_Pedido.Visible = true; B_Recibo.Visible = true; GV_Disponibles.Visible = true; Tabla_Rutas.Visible = true; CRV_Factura.Visible = false; } catch (Exception ex) { } }