Example #1
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     int ID = ((Entidades.Plan)this.dgvPlanes.SelectedRows[0].DataBoundItem).IdPlan;
     PlanLogic pl = new PlanLogic();
     pl.Delete(ID);
     this.Listar();
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         PlanLogic pl = new PlanLogic();
         listplan = pl.GetAll();
         ddlPlan.DataSource = listplan;
         ddlPlan.DataTextField = "PlanEspecialidadDesc";
         ddlPlan.DataBind();
     }
     this.gridPanel.Visible = false;
 }
Example #3
0
 public void Listar()
 {
     PlanLogic pl = new PlanLogic();
     try
     {
         this.dgvPlanes.DataSource = pl.GetAll();
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message);
     }
 }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.gridPanel.Visible = false;
     if (!IsPostBack)
     {
         PlanLogic pl = new PlanLogic();
         listplan = pl.GetAll();
         ddlPlan.DataSource = listplan;
         ddlPlan.DataTextField = "PlanEspecialidadDesc";
         ddlPlan.DataBind();
     }
     ddlCurso.Enabled = false;
     txtAnio.Enabled = false;
     ddlComision.Enabled = false;
     btnAceptar.Enabled = false;
 }
Example #5
0
        public PlanDesktop(ModoForm modo,int ID): this()
        {
            _modo=modo;
            PlanLogic pl = new PlanLogic();
            PlanActual = pl.GetOne(ID);
            this.MapearDeDatos();
            switch(_modo)
            {case ModoForm.Modificacion:
            btnAceptar.Text = "Guardar";
            break;
            case ModoForm.Baja:
            btnAceptar.Text = "Eliminar";
            break;
            case ModoForm.Consulta:
            btnAceptar.Text = "Aceptar";
            break;
            }


        }
Example #6
0
        private void MateriaDesktop_Load(object sender, EventArgs e)
        {
            EspecialidadLogic esp = new EspecialidadLogic();
            PlanLogic plan = new PlanLogic();
            if (Modo == ModoForm.Alta || Modo == ModoForm.Modificacion)
            {
                listEsp = esp.GetAll();
                listplan = plan.GetAll();
                if (listEsp.Count >= 1)
                {
                    cmbEspecialidades.DataSource = listEsp;
                    cmbEspecialidades.DisplayMember = "Descripcion";
                }

                else
                {
                    cmbEspecialidades.Text = "No hay especialidades cargadas";
                    cmbEspecialidades.Enabled = false;
                    cmbIDPlan.Enabled = false;
                    btnAceptar.Visible = false;
                }

                if (listplan.Count >= 1)
                {
                    cmbIDPlan.DataSource = listplan;
                    cmbIDPlan.DisplayMember = "Descripcion";
                }

                else
                {
                    cmbIDPlan.Text = "No hay planes cargados";
                    cmbEspecialidades.Enabled = false;
                    cmbIDPlan.Enabled = false;
                    btnAceptar.Visible = false;
                }
            }
            if (Modo == ModoForm.Baja)
            {
                listplan.Add(plan.GetOne(MateriaActual.IDPlan));
                cmbEspecialidades.DataSource = listplan;
                cmbIDPlan.DataSource = listplan;
                cmbIDPlan.DisplayMember = "Descripcion";
                cmbEspecialidades.DisplayMember = "DescripcionEspecialidad";
            }
        }
Example #7
0
 private void cmbEspecialidades_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Modo == ModoForm.Alta || Modo == ModoForm.Modificacion)
     {
         PlanLogic plan = new PlanLogic();
         listplan = plan.GetAll(listEsp[cmbEspecialidades.SelectedIndex].ID);
         if (listplan.Count >= 1)
         {
             cmbIDPlan.DataSource = listplan;
             cmbIDPlan.Enabled = true;
             btnAceptar.Visible = true;
             cmbIDPlan.DisplayMember = "Descripcion";
         }
         else
         {
             btnAceptar.Visible = false;
             cmbIDPlan.Enabled = false;
             cmbIDPlan.Text = "No hay planes cargados";
         }
     }
 }
Example #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         LoadGrid();
         PlanLogic pl = new PlanLogic();
         listplan = pl.GetAll();
         DropDownListPlan.DataSource = listplan;
         DropDownListPlan.DataTextField = "PlanEspecialidadDesc";
         DropDownListPlan.DataBind();
     }
 }
Example #9
0
 public void Listar()
 {
     PlanLogic pl = new PlanLogic();
     this.dgvPlanes.DataSource = pl.GetAll();
 }
Example #10
0
 private void ComisionDesktop_Load(object sender, EventArgs e)
 {
     PlanLogic plan = new PlanLogic();
     listplan = plan.GetAll();
     comboIDPlan.DataSource = listplan;
     if (listplan.Count >= 1)
         comboIDPlan.DisplayMember = "PlanEspecialidadDesc";
     else
     {
         comboIDPlan.Enabled = false;
         btnAceptar.Visible = false;
         comboIDPlan.Text = "No hay planes cargados";
     }
 }
Example #11
0
        private void SeleccionPreReporte_Load(object sender, EventArgs e)
        {
            if (Tipo == "Curso")
            {
                PersonaLogic proflogic = new PersonaLogic();
                PlanLogic planlogic = new PlanLogic();
                CursoLogic cursologic = new CursoLogic();
                listprofesores = proflogic.GetNom(Persona.TiposPersonas.Docente);
                listplanes = planlogic.GetAll();
                cmbIDPlan.DataSource = listplanes;
                listcursos = cursologic.GetAll();
                cmbIDCurso.DataSource = listcursos;
                cmbIDProfesor.DataSource = listprofesores;
                cmbIDProfesor.DisplayMember = "NombreYApellido";
                cmbIDPlan.DisplayMember = "PlanEspecialidadDesc";
                cmbIDCurso.DisplayMember = "MateriaComision";
                AutoCompleteStringCollection accprof = new AutoCompleteStringCollection();
                AutoCompleteStringCollection acccur = new AutoCompleteStringCollection();
                if (listprofesores.Count >= 1)
                {
                    foreach (Persona prof in listprofesores)
                    {
                        accprof.Add(prof.NombreYApellido);
                    }
                    cmbIDProfesor.AutoCompleteCustomSource = accprof;
                    cmbIDProfesor.AutoCompleteMode = AutoCompleteMode.Suggest;
                    cmbIDProfesor.AutoCompleteSource = AutoCompleteSource.CustomSource;
                }
                else
                {
                    cmbIDProfesor.Text = "No hay profesores cargados";
                    cmbIDProfesor.Enabled = false;
                    cmbIDPlan.Enabled = false;
                    btnAceptar.Visible = false;
                }
                if (listcursos.Count >= 1)
                {
                    foreach (Curso cur in listcursos)
                    {
                        acccur.Add(cur.MateriaComision);
                    }
                    cmbIDCurso.AutoCompleteCustomSource = acccur;
                    cmbIDCurso.AutoCompleteMode = AutoCompleteMode.Suggest;
                    cmbIDCurso.AutoCompleteSource = AutoCompleteSource.CustomSource;
                }
                else
                {
                    cmbIDCurso.Text = "No hay cursos cargados";
                    cmbIDProfesor.Enabled = false;
                    cmbIDCurso.Enabled = false;
                    cmbIDPlan.Enabled = false;
                    btnAceptar.Visible = false;
                }
            }
            else
            {
                PlanLogic planlogic = new PlanLogic();
                listplanes = planlogic.GetAll();
                cmbIDPlan.DataSource = listplanes;
                cmbIDPlan.DisplayMember = "PlanEspecialidadDesc";
            }

            if (listplanes.Count < 1)
            {
                cmbIDCurso.Text = "No hay planes cargados";
                cmbIDProfesor.Enabled = false;
                cmbIDCurso.Enabled = false;
                cmbIDPlan.Enabled = false;
                btnAceptar.Visible = false;
            }
        }
Example #12
0
 public override void GuardarCambios()
 {
     this.MapearADatos();
     PlanLogic pl = new PlanLogic();
     pl.Save(PlanActual);
 }
Example #13
0
 public Planes()
 {
     PlanNegocio = new Negocio.PlanLogic();
 }
Example #14
0
 private void AlumnoDesktop_Load(object sender, EventArgs e)
 {
     PlanLogic plan = new PlanLogic();
     listplan = plan.GetAll();
     if (listplan.Count >= 1)
     {
         comboIDPlan.DataSource = listplan;
         comboIDPlan.DisplayMember = "PlanEspecialidadDesc";
     }
     else
     {
         comboIDPlan.Text = "No hay planes cargados";
         btnAceptar.Visible = false;
         txtApellido.Enabled = false;
         txtDireccion.Enabled = false;
         txtFechaNac.Enabled = false;
         txtLegajo.Enabled = false;
         txtNombre.Enabled = false;
         txtTelefono.Enabled = false;
         comboIDPlan.Enabled = false;
     }
 }