Example #1
0
        private void BtnHistorial_Click(object sender, RoutedEventArgs e)
        {
            historialPro hist = new historialPro();

            hist.Show();
            this.Close();
        }
Example #2
0
        private async void BtnAgregar_Click(object sender, RoutedEventArgs e)
        {
            NaturalWSClient cliente = new NaturalWSClient();
            historial       his     = new historial();

            try
            {
                if (txtRut.Text.Equals(""))
                {
                    await this.ShowMessageAsync("Advertencia", "Porfavor Ingrese Rut del Cliente");
                }
                else if (cboProyecto.Text.Equals(""))
                {
                    await this.ShowMessageAsync("Advertencia", "Porfavor Seleccione un Proyecto");
                }
                else if (txtFase.Text.Equals(""))
                {
                    await this.ShowMessageAsync("Advertencia", "Porfavor Ingrese la Fase del Proyecto");
                }
                else if (txtFecha.Text.Equals(""))
                {
                    await this.ShowMessageAsync("Advertencia", "Porfavor Ingrese la Fecha del Requerimiento");
                }
                else if (txtDescripcion.Text.Equals(""))
                {
                    await this.ShowMessageAsync("Advertencia", "Porfavor Ingrese una Descripción para el Requerimiento");
                }
                else
                {
                    his.fase            = int.Parse(txtFase.Text);
                    his.fecha           = txtFecha.Text.ToUpper();
                    his.descripcion     = txtDescripcion.Text.ToUpper();
                    his.estado          = txtEstado.Text.ToUpper();
                    his.nombre_Proyecto = cboProyecto.Text.ToUpper();

                    if (cliente.agregarHistorial(his))
                    {
                        await this.ShowMessageAsync("Exito", "Requerimiento ingresado Correctamente");

                        historialPro historial = new historialPro();
                        historial.Show();
                        this.Close();
                    }
                    else
                    {
                        await this.ShowMessageAsync("Error", "No se pudo Ingresar actual Requerimiento");
                    }
                }
            }
            catch
            {
                await this.ShowMessageAsync("Error", "Tenemos problemas para Ingresar un Requerimiento");
            }
        }