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(); }
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; }
public void Listar() { PlanLogic pl = new PlanLogic(); try { this.dgvPlanes.DataSource = pl.GetAll(); } catch (Exception Ex) { MessageBox.Show(Ex.Message); } }
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; }
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; } }
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"; } }
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"; } } }
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(); } }
public void Listar() { PlanLogic pl = new PlanLogic(); this.dgvPlanes.DataSource = pl.GetAll(); }
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"; } }
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; } }
public override void GuardarCambios() { this.MapearADatos(); PlanLogic pl = new PlanLogic(); pl.Save(PlanActual); }
public Planes() { PlanNegocio = new Negocio.PlanLogic(); }
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; } }