示例#1
0
        public void Dashboard(E_Dashboard obj)
        {
            CD_Dashboard accesDB = new CD_Dashboard();

            accesDB.EstMaterias(obj);
            accesDB.EstCarreras(obj);
            accesDB.SumarioDatos(obj);
        }
示例#2
0
        //private void GrafMaterias()
        //{
        //    cmd = new SqlCommand("MateriasTutorias", Conexion);
        //    cmd.CommandType = CommandType.StoredProcedure;
        //    Conexion.Open();
        //    dr = cmd.ExecuteReader();
        //    while (dr.Read())
        //    {
        //        Materia.Add(dr.GetString(0));
        //        Cant.Add(dr.GetInt32(1));


        //    }
        //    chartMaterias.Series[0].Points.DataBindXY(Materia, Cant);
        //    dr.Close();
        //    Conexion.Close();
        //}
        //private void GrafCarreras()
        //{
        //    cmd = new SqlCommand("CarrerasTomanTutorias", Conexion);
        //    cmd.CommandType = CommandType.StoredProcedure;
        //    Conexion.Open();
        //    dr = cmd.ExecuteReader();
        //    while (dr.Read())
        //    {
        //        Carrera.Add(dr.GetString(0));
        //        CantCarrera.Add(dr.GetInt32(1));


        //    }
        //    chartCarrerasPreferidas.Series[0].Points.DataBindXY(Carrera, CantCarrera);
        //    dr.Close();
        //    Conexion.Close();
        //}
        //private void DashboardDatos()
        //{
        //    cmd = new SqlCommand("DashboardDatos", Conexion);
        //    cmd.CommandType = CommandType.StoredProcedure;
        //    SqlParameter totalEst = new SqlParameter("@IdEstudiante", 0); totalEst.Direction = ParameterDirection.Output;
        //    SqlParameter nCarrera = new SqlParameter("@IdCarrera", 0); nCarrera.Direction = ParameterDirection.Output;
        //    SqlParameter nMaestro = new SqlParameter("@IdMaestro", 0); nMaestro.Direction = ParameterDirection.Output;
        //    SqlParameter nMateria = new SqlParameter("@IdMateria", 0); nMateria.Direction = ParameterDirection.Output;
        //    SqlParameter nTutoria = new SqlParameter("@IdTutoria", 0); nTutoria.Direction = ParameterDirection.Output;
        //    cmd.Parameters.Add(totalEst);
        //    cmd.Parameters.Add(nCarrera);
        //    cmd.Parameters.Add(nMaestro);
        //    cmd.Parameters.Add(nMateria);
        //    cmd.Parameters.Add(nTutoria);
        //    Conexion.Open();
        //    cmd.ExecuteNonQuery();
        //    lblEstudiantes.Text = cmd.Parameters["@IdEstudiante"].Value.ToString();
        //    Conexion.Close();

        //}

        //private void chartMaterias_Click(object sender, EventArgs e)
        //{

        //}
        #endregion
        private void MostrarDashboard()
        {
            CN_Dashboard neg = new CN_Dashboard();
            E_Dashboard  obj = new E_Dashboard();

            neg.Dashboard(obj);

            //RECUPERANDO DE LA ENTIDAD PARA CAMBIAR LOS DATOS DEL DASHBOARD //
            chartMaterias.Series[0].Points.DataBindXY(obj.Materia, obj.Cant);
            chartCarrerasPreferidas.Series[0].Points.DataBindXY(obj.Carrera, obj.CantCarrera);
            lblEstudiantes.Text = obj.TotalEstudiantes;
        }
示例#3
0
        public void EstCarreras(E_Dashboard obj)
        {
            cmd = new SqlCommand("CarrerasTomanTutorias", Con.Conexion);

            cmd.CommandType = CommandType.StoredProcedure;
            Con.AbrirConexion();

            dr = cmd.ExecuteReader();
            while (dr.Read())
            {
                obj.Carrera.Add(dr.GetString(0));
                obj.CantCarrera.Add(dr.GetInt32(1));
            }
            dr.Close();
            Con.CerrarConexion();
        }
示例#4
0
        public void SumarioDatos(E_Dashboard obj)
        {
            cmd = new SqlCommand("DashboardDatos", Con.Conexion);

            //cmd.CommandText = "DashboardDatos";
            cmd.CommandType = CommandType.StoredProcedure;
            SqlParameter totalEst = new SqlParameter("@IdEstudiante", 0); totalEst.Direction = ParameterDirection.Output;
            SqlParameter nCarrera = new SqlParameter("@IdCarrera", 0); nCarrera.Direction = ParameterDirection.Output;
            SqlParameter nMaestro = new SqlParameter("@IdMaestro", 0); nMaestro.Direction = ParameterDirection.Output;
            SqlParameter nMateria = new SqlParameter("@IdMateria", 0); nMateria.Direction = ParameterDirection.Output;
            SqlParameter nTutoria = new SqlParameter("@IdTutoria", 0); nTutoria.Direction = ParameterDirection.Output;

            cmd.Parameters.Add(totalEst);
            cmd.Parameters.Add(nCarrera);
            cmd.Parameters.Add(nMaestro);
            cmd.Parameters.Add(nMateria);
            cmd.Parameters.Add(nTutoria);
            Con.AbrirConexion();

            cmd.ExecuteNonQuery();
            obj.TotalEstudiantes = cmd.Parameters["@IdEstudiante"].Value.ToString();
            Con.CerrarConexion();
        }