void BotonEnviar_Click(object sender, EventArgs e) { BotonEnviar.Enabled = false; int[] ID_UsuariosConsultar = { idUsuarioSeleccionado }; if (!FindViewById <TextView>(Resource.Id.FechaInicial).Text.Equals("HOY")) { fechaInicial = Convert.ToDateTime(FindViewById <TextView>(Resource.Id.FechaInicial).Text + " " + horaInicial + ":" + minutoInicial); } else { fechaInicial = DateTime.Now; } if (!FindViewById <TextView>(Resource.Id.FechaFinal).Text.Equals("HOY")) { fechaFinal = Convert.ToDateTime(FindViewById <TextView>(Resource.Id.FechaFinal).Text + " " + horaFinal + ":" + minutoFinal); } else { fechaFinal = DateTime.Now; } progress = HelperMethods.setSpinnerDialog("Cargando Coordenadas...", this); Conexion_Web_Service._client.BajarCoordenadasEmpleadosAsync(HelperMethods.ConvertToUnixTimestamp(fechaInicial), HelperMethods.ConvertToUnixTimestamp(fechaFinal), ID_UsuariosConsultar); progress.Show(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Login); TextoUsuario = FindViewById <EditText>(Resource.Id.TextoUsuario); TextoContrasena = FindViewById <EditText>(Resource.Id.TextoContrasena); BotonAceptar = FindViewById <Button>(Resource.Id.BotonAceptar); progress = HelperMethods.setSpinnerDialog("Iniciando Sesion...", this); Conexion_Web_Service.InitializeServiceClient(); TextoUsuario.Text = "Ivan"; TextoContrasena.Text = "Ivan"; BotonAceptar.Click += BotonAceptar_Click; Conexion_Web_Service._client.ListaEmpleadosAsignadosCompleted += _client_ListaEmpleadosAsignadosCompleted; Conexion_Web_Service._client.VerificarLoginCompleted += _client_VerificarLoginCompleted; }
public void OnClick(View v) { Intent detailIntent = null; vista = v; vista.Enabled = false; empleado = empleadoModel[(int)v.Tag]; profileImageView = currentActivity.FindViewById(Resource.Id.profilePhotoImageView); switch (currentActivity.Intent.GetStringExtra(currentActivity.GetString(Resource.String.acquaintanceListIntentKey))) { case "PerfilContactosActivity": detailIntent = new Intent(currentActivity, typeof(InformacionPersonal)); // Add some identifying item data to the intent. In this case, the id of the empelado for which we're about to display the Informacion Personal screen. detailIntent.PutExtra(currentActivity.Resources.GetString(Resource.String.InformacionPersonalIntentKey), empleado.ID_Login); HelperMethods.startIntent(detailIntent, currentActivity, vista, profileImageView); vista.Enabled = true; Conexion_Web_Service._client.BajarCoordenadasEmpleadosCompleted -= _client_Lista_BajarCoordenadasEmpleadosCompleted; break; case "MapaActivity": int[] ID_UsuariosConsultar = { empleado.ID_Login }; if (progress == null) { progress = HelperMethods.setSpinnerDialog("Cargando Coordenadas...", currentActivity); } Conexion_Web_Service._client.BajarCoordenadasEmpleadosAsync(0, 0, ID_UsuariosConsultar); progress.Show(); break; case "ChatActivity": detailIntent = new Intent(currentActivity, typeof(ChatActivity)); detailIntent.PutExtra(currentActivity.Resources.GetString(Resource.String.idChat), empleado.ID_Login.ToString()); detailIntent.PutExtra(currentActivity.Resources.GetString(Resource.String.NombreDestinatarioChat), HelperMethods.DisplayName(empleado)); HelperMethods.startIntent(detailIntent, currentActivity, vista, profileImageView); vista.Enabled = true; break; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Layout = LayoutInflater.Inflate(Resource.Layout.InformacionPersonal, null); SetContentView(Layout); nombres = FindViewById <TextView>(Resource.Id.Nombre); apellidos = FindViewById <TextView>(Resource.Id.Apellido); nDocumento = FindViewById <TextView>(Resource.Id.NDocumento); fechaNacimiento = FindViewById <TextView>(Resource.Id.FechaNacimiento); telefonoMovil = FindViewById <TextView>(Resource.Id.TelefonoMovil); telefonoFijo = FindViewById <TextView>(Resource.Id.TelefonoFijo); direccion = FindViewById <TextView>(Resource.Id.Direccion); email = FindViewById <TextView>(Resource.Id.Email); fechaIngreso = FindViewById <TextView>(Resource.Id.FechaIngreso); departamento = FindViewById <TextView>(Resource.Id.Departamento); profilePhotoImageView = FindViewById <ImageView>(Resource.Id.ImagenPerfil); Tareas = FindViewById <Button>(Resource.Id.TareasPersonal); Ubicacion = FindViewById <Button>(Resource.Id.UbicacionPersonal); Mensajeria = FindViewById <Button>(Resource.Id.MensajeriaPersonal); progress = HelperMethods.setSpinnerDialog("Cargando Coordenadas...", this); var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); // set the activity title and action bar title Title = SupportActionBar.Title = "Informacion Personal"; HelperMethods.SetupAnimations(this); // extract the acquaintance id fomr the intent IdEmpleado = Intent.GetIntExtra(GetString(Resource.String.InformacionPersonalIntentKey), 0); if (IdEmpleado != 0) { empleadoConsulta = HelperMethods.getUserById(IdEmpleado); informacionPerfil(empleadoConsulta); } else { informacionPerfil(Perfil_Login.miPerfil); IdEmpleado = Perfil_Login.miPerfil.ID_Login; Tareas.Visibility = ViewStates.Invisible; Ubicacion.Visibility = ViewStates.Invisible; Mensajeria.Visibility = ViewStates.Invisible; } Conexion_Web_Service._client.BajarCoordenadasEmpleadosCompleted += _client_Lista_BajarCoordenadasEmpleadosCompletedPersonal; Ubicacion.Click += delegate { Layout.Enabled = false; long fechaFinal = HelperMethods.ConvertToUnixTimestamp(DateTime.Now); long fechaInicial = fechaFinal - 3600; int[] ID_UsuariosConsultar = { IdEmpleado }; Conexion_Web_Service._client.BajarCoordenadasEmpleadosAsync(fechaInicial, fechaFinal, ID_UsuariosConsultar); progress.Show(); }; }