コード例 #1
0
 public List <EEvaluaciones> ListaEvaluaciones()
 {
     try
     {
         comando             = new SqlCommand("select EvaluacionId,Mes,Pacial,Observaciones,E.CicloEscolarId,ciclo,E.Activo from Evaluaciones E inner join CicloEscolar C ON E.CicloEscolarId = C.CicloEscolarId");
         comando.CommandType = CommandType.Text;
         comando.Connection  = conexion;
         conexion.Open();
         List <EEvaluaciones> Lista = new List <EEvaluaciones>();
         SqlDataReader        leer  = comando.ExecuteReader();
         while (leer.Read())
         {
             EEvaluaciones E = new EEvaluaciones();
             E.EvaluacionId  = (int)leer[0];
             E.Mes           = leer[1].ToString();
             E.Pacial        = leer[2].ToString();
             E.Observaciones = leer[3].ToString();
             E.CicloEscolar.CicloEscolarId = (int)leer[4];
             E.CicloEscolar.ciclo          = (int)leer[5];
             E.Activo = (bool)leer[6];
             Lista.Add(E);
         }
         leer.Close();
         conexion.Close();
         conexion.Dispose();
         return(Lista);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
ファイル: Evaluaciones.cs プロジェクト: fredreyes/SGA
 private void btningresar_Click(object sender, EventArgs e)
 {
     try
     {
         if (Bandera == 0)
         {
             foreach (DataGridViewRow datos in dataGridView1.Rows)
             {
                 EEvaluaciones _Evaluaciones = new EEvaluaciones();
                 _Evaluaciones.Mes           = Convert.ToString(datos.Cells[0].Value);
                 _Evaluaciones.Pacial        = Convert.ToString(datos.Cells[1].Value);
                 _Evaluaciones.Observaciones = Convert.ToString(datos.Cells[2].Value);
                 _Evaluaciones.CicloEscolar.CicloEscolarId = Convert.ToInt32(datos.Cells[4].Value);
                 NEvaluacion n = new NEvaluacion();
                 n.IngresarEvaluaciones(_Evaluaciones);
             }
             CargarEvaluaciones();
             MessageBox.Show("Evaluaciones Guardadas Correctamente", "SGA", MessageBoxButtons.OK, MessageBoxIcon.Information);
             Limpiar();
         }
         if (Bandera == 1)
         {
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "SGA", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #3
0
ファイル: NEvaluacion.cs プロジェクト: fredreyes/SGA
 public void EliminarEvaluaciones(EEvaluaciones e)
 {
     try
     {
         DEvaluaciones d = new DEvaluaciones();
         d.EliminarEvaluaciones(e);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
ファイル: NEvaluacion.cs プロジェクト: fredreyes/SGA
 public void IngresarEvaluaciones(EEvaluaciones e)
 {
     try
     {
         DEvaluaciones d = new DEvaluaciones();
         d.IngresarEvaluaciones(e);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
        /*Función para obtener la lista de evaluaciones registradad*/
        public List <EEvaluaciones> listaEvaluaciones()
        {
            DBCAJDataContext ADB = new DBCAJDataContext(LogicaCC.ConnectionString.DbMPYSJDB);
            var vListEvalu       = ADB.ADMSPS_LISTA_EVALUACIONES();

            foreach (var e in vListEvalu)
            {
                EEvaluaciones lista = new EEvaluaciones();
                lista.sIdEvaluacion = e.idTipoEvaluacion.ToString();
                lista.sEvaluacion   = e.Evaluacion.ToString();

                LEvaluaciones.Add(lista);
            }
            return(LEvaluaciones);
        }
コード例 #6
0
 public void EliminarEvaluaciones(EEvaluaciones e)
 {
     try
     {
         comando             = new SqlCommand("EliminarEvaluaciones");
         comando.CommandType = CommandType.StoredProcedure;
         comando.Parameters.AddWithValue("@EvaluacionId", e.EvaluacionId);
         comando.Connection = conexion;
         conexion.Open();
         comando.ExecuteNonQuery();
         conexion.Close();
         conexion.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #7
0
 public void IngresarEvaluaciones(EEvaluaciones e)
 {
     try
     {
         comando             = new SqlCommand("InsertarEvaluaciones");
         comando.CommandType = CommandType.StoredProcedure;
         comando.Parameters.AddWithValue("@Mes", e.Mes);
         comando.Parameters.AddWithValue("@Pacial", e.Pacial);
         comando.Parameters.AddWithValue("@Observaciones", e.Observaciones);
         comando.Parameters.AddWithValue("@CicloEscolarId", e.CicloEscolar.CicloEscolarId);
         comando.Connection = conexion;
         conexion.Open();
         comando.ExecuteNonQuery();
         conexion.Close();
         conexion.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #8
0
ファイル: Evaluaciones.cs プロジェクト: fredreyes/SGA
 private void eliminarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         EEvaluaciones evaluaciones = new EEvaluaciones();
         NEvaluacion   n            = new NEvaluacion();
         var           mes          = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Mes").ToString();
         var           Año          = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ciclo").ToString();
         evaluaciones.EvaluacionId = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "EvaluacionId").ToString());
         DialogResult mensaje = MessageBox.Show("¿Estas seguro de elimar la evaluacion correspondiente al mes de " + mes + " del año " + Año + " ?", "SGA", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
         if (mensaje == DialogResult.OK)
         {
             n.EliminarEvaluaciones(evaluaciones);
             MessageBox.Show("Evaluación eliminada con exito", "SGA", MessageBoxButtons.OK, MessageBoxIcon.Information);
             CargarCiclo();
             CargarEvaluaciones();
             Limpiar();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #9
0
        /*Evento click boton registrar evaluacion realizada*/
        private void btnRegistrar_Click(object sender, EventArgs e)
        {
            int    p1;
            int    p2;
            int    p3;
            int    p4;
            int    p5;
            int    p6;
            string p7;

            if (rbSI.Checked == true)
            {
                if (cmbP1.Text != string.Empty && cmbP2.Text != string.Empty && cmbP3.Text != string.Empty && cmbP4.Text != string.Empty && cmbP5.Text != string.Empty && cmbP6.Text != string.Empty)
                {
                    eEvaluaciones = (EEvaluaciones)cmbP1.SelectedItem;
                    p1            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    eEvaluaciones = (EEvaluaciones)cmbP2.SelectedItem;
                    p2            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    eEvaluaciones = (EEvaluaciones)cmbP3.SelectedItem;
                    p3            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    eEvaluaciones = (EEvaluaciones)cmbP4.SelectedItem;
                    p4            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    eEvaluaciones = (EEvaluaciones)cmbP5.SelectedItem;
                    p5            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    eEvaluaciones = (EEvaluaciones)cmbP6.SelectedItem;
                    p6            = int.Parse(eEvaluaciones.sIdEvaluacion);

                    if (txtComentario.Text != string.Empty)
                    {
                        p7 = txtComentario.Text;
                    }
                    else
                    {
                        p7 = " ";
                    }

                    DialogResult ap = MessageBox.Show("¿Estas seguro de registrar esta evaluación?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (ap == DialogResult.Yes)
                    {
                        if (iTotalRegistro < 3)
                        {
                            new CCRegistroEvaluacion().registroEvaluacionServicio(idCallCenter
                                                                                  , p1
                                                                                  , p2
                                                                                  , p3
                                                                                  , p4
                                                                                  , p5
                                                                                  , p6
                                                                                  , p7
                                                                                  , true
                                                                                  , " ");
                            Close();
                        }
                        else
                        {
                            DialogResult rg = MessageBox.Show("Este es el ultimo intento para registrar la evaluación de servicio" + Environment.NewLine +
                                                              "¿Deseas proseguir con el registro de la evaluación?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                            if (rg == DialogResult.Yes)
                            {
                                new CCRegistroEvaluacion().registroEvaluacionServicio(idCallCenter
                                                                                      , p1
                                                                                      , p2
                                                                                      , p3
                                                                                      , p4
                                                                                      , p5
                                                                                      , p6
                                                                                      , p7
                                                                                      , true
                                                                                      , " ");
                                Close();
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Es necesario registrar la evaluacion de cada pregunta", "Aviso!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
            else if (rbNO.Checked == true)
            {
                if (txtObservaciones.Text != string.Empty)
                {
                    DialogResult ap = MessageBox.Show("¿Estas seguro de registrar esta evaluación?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (ap == DialogResult.Yes)
                    {
                        new CCRegistroEvaluacion().registroEvaluacionServicio(idCallCenter
                                                                              , 1
                                                                              , 1
                                                                              , 1
                                                                              , 1
                                                                              , 1
                                                                              , 1
                                                                              , " "
                                                                              , false
                                                                              , txtObservaciones.Text);
                        Close();
                    }
                }
                else
                {
                    MessageBox.Show("Es necesario registrar las observaciones del porque no se contacta al cliente", "Aviso!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
        }