Exemple #1
0
        private void btnGuardarHistorial_Click(object sender, EventArgs e)
        {
            try
            {
                string            aaa         = "";
                PericiaHistoriaWF periciaForm = new PericiaHistoriaWF(aaa);
                periciaForm.Enabled = false;

                Entidades.Pericias _pericia = CargarEntidad();
                bool Exito = PericiaNeg.GurdarHistorialPericia(_pericia);
                if (Exito == true)
                {
                    ProgressBar();
                    const string message2 = "Se registro el nuevo estadio exitosamente.";
                    const string caption2 = "Éxito";
                    var          result2  = MessageBox.Show(message2, caption2,
                                                            MessageBoxButtons.OK,
                                                            MessageBoxIcon.Asterisk);
                    LimpiarCampos();
                    ListaPericias            = PericiaNeg.BuscarHistorialPericia(idPericiaSeleccionada);
                    groupBox2.Visible        = false;
                    btnNuevaHistoria.Visible = true;
                    btnVolver.Visible        = true;
                    periciaForm.Enabled      = true;
                }
                else
                {
                }
            }
            catch (Exception ex)
            { }
        }
Exemple #2
0
        private void btnEnviarEmail_Click(object sender, EventArgs e)
        {
            bool Exito = false;

            Entidades.Pericias _pericia = CargarEntidad();
            if (!String.IsNullOrEmpty(txtCuentaEmail.Text) & !String.IsNullOrEmpty(txtAsunto.Text))
            {
                Exito = PericiaNeg.EnviarEmailConEscrito(txtTexto.Text, txtCuentaEmail.Text, _pericia.UsuarioLogin, cmbRespuestas.Text);
            }
            else
            {
                const string message = "Los campos Asuntos y cuenta de email son obligatorios.";
                const string caption = "Atención";
                var          result  = MessageBox.Show(message, caption,
                                                       MessageBoxButtons.OK,
                                                       MessageBoxIcon.Warning);
            }
            if (Exito == true)
            {
                const string message2 = "Se envio el email correctamente.";
                const string caption2 = "Éxito";
                var          result2  = MessageBox.Show(message2, caption2,
                                                        MessageBoxButtons.OK,
                                                        MessageBoxIcon.Asterisk);
            }
        }
Exemple #3
0
        private void CargarComboRespuestas()
        {
            List <string> Plantillas = new List <string>();

            Plantillas = PericiaNeg.CargarComboRespuestas();
            cmbRespuestas.Items.Clear();
            cmbRespuestas.Text = "Seleccione";
            cmbRespuestas.Items.Add("Seleccione");
            foreach (string item in Plantillas)
            {
                cmbRespuestas.Text = "Seleccione";
                cmbRespuestas.Items.Add(item);
            }
        }
Exemple #4
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try
     {
         if (chcPorTribunal.Checked == true)
         {
             var tribunal = cmbTribunalBuscar.Text;
             ListaPericias = PericiaNeg.BuscarPericiasPorTribunal(tribunal);
         }
         else
         {
             var Causa = txtCausaBuscar.Text;
             ListaPericias = PericiaNeg.BuscarPericiasPorCausa(Causa);
         }
     }
     catch (Exception ex)
     {
     }
 }
Exemple #5
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            try
            {
                if (PesoTotalArchivos > 23.84186)
                {
                    const string message = "Atención el peso de los archivos supera el maximo permitido.";
                    const string caption = "Error";
                    var          result  = MessageBox.Show(message, caption,
                                                           MessageBoxButtons.OK,
                                                           MessageBoxIcon.Exclamation);
                    throw new Exception();
                }

                Entidades.Pericias _pericia = CargarEntidad();
                groupBox1.Enabled = false;
                groupBox2.Enabled = false;
                groupBox3.Enabled = false;
                //UploadFile();
                bool Exito = PericiaNeg.GurdarPericia(_pericia);
                if (Exito == true)
                {
                    ProgressBar();
                    const string message2 = "Se registro la pericia exitosamente.";
                    const string caption2 = "Éxito";
                    var          result2  = MessageBox.Show(message2, caption2,
                                                            MessageBoxButtons.OK,
                                                            MessageBoxIcon.Asterisk);
                    groupBox1.Enabled = true;
                    groupBox2.Enabled = true;
                    groupBox3.Enabled = true;
                    LimpiarCampos();
                }
                else
                {
                    groupBox1.Enabled = true;
                    groupBox2.Enabled = true;
                    groupBox3.Enabled = true;
                    LimpiarCampos();
                }
            }
            catch (Exception ex) { }
        }
Exemple #6
0
 private void cmbRespuestas_Click(object sender, EventArgs e)
 {
     try
     {
         string var = cmbRespuestas.Text;
         if (var != "Seleccione")
         {
             List <string> Texto = new List <string>();
             Texto = PericiaNeg.CargarComboRespuestasPorTituloSeleccionado(var);
             if (Texto.Count > 0)
             {
                 CargarTextoEnPantalla(Texto);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #7
0
        private void PericiaHistoriaWF_Load(object sender, EventArgs e)
        {
            List <Pericias> objListOrder = new List <Pericias>();

            objListOrder = PericiaNeg.BuscarHistorialPericia(idPericiaSeleccionada);
            List <Pericias> SortedList = objListOrder.OrderByDescending(o => o.Fecha).ToList();

            ListaPericias = SortedList;
            var lista = SortedList.First();

            cmbEstado.Text = lista.Estado;
            List <string> listaArchivos = new List <string>();

            listaArchivos = Dao.PericiaDao.CargarArchivos(idPericiaSeleccionada);
            int contador = 0;

            if (listaArchivos.Count > 0)
            {
                if (listaArchivos.Count > contador)
                {
                    txtAdjunto1.Text    = listaArchivos[0].ToString();
                    txtAdjunto1.Visible = true; btnAbrir1.Visible = true; lblAdjunto1.Visible = true; contador = 1;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto2.Text    = listaArchivos[1].ToString();
                    txtAdjunto2.Visible = true; btnAbrir2.Visible = true; lblAdjunto2.Visible = true; contador = 2;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto3.Text    = listaArchivos[2].ToString();
                    txtAdjunto3.Visible = true; btnAbrir3.Visible = true; lblAdjunto3.Visible = true; contador = 3;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto4.Text    = listaArchivos[3].ToString();
                    txtAdjunto4.Visible = true; btnAbrir4.Visible = true; lblAdjunto4.Visible = true; contador = 4;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto5.Text    = listaArchivos[4].ToString();
                    txtAdjunto5.Visible = true; btnAbrir5.Visible = true; lblAdjunto5.Visible = true; contador = 5;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto6.Text    = listaArchivos[5].ToString();
                    txtAdjunto6.Visible = true; btnAbrir6.Visible = true; lblAdjunto6.Visible = true; contador = 6;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto7.Text    = listaArchivos[6].ToString();
                    txtAdjunto7.Visible = true; btnAbrir7.Visible = true; lblAdjunto7.Visible = true; contador = 7;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto8.Text    = listaArchivos[7].ToString();
                    txtAdjunto8.Visible = true; btnAbrir8.Visible = true; lblAdjunto8.Visible = true; contador = 8;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto9.Text    = listaArchivos[8].ToString();
                    txtAdjunto9.Visible = true; btnAbrir9.Visible = true; lblAdjunto9.Visible = true; contador = 9;
                }

                if (listaArchivos.Count > contador)
                {
                    txtAdjunto10.Text    = listaArchivos[9].ToString();
                    txtAdjunto10.Visible = true; btnAbrir10.Visible = true; lblAdjunto10.Visible = true; contador = 10;
                }

                groupBox3.Visible = true;
            }
        }