public _00007_AsignarAgenteSubSector() { InitializeComponent(); _agenteSubSectorServicio = new AgenteSubSectorServicio(); _subSectorServicio = new SubSectorServicio(); _sectorServicio = new SectorServicio(); this.WindowState = FormWindowState.Maximized; this.imgBuscarNoAsignados.Image = PresentacionBase.Imagenes.BotonBuscar; this.imgBuscarAsignados.Image = PresentacionBase.Imagenes.BotonBuscar; this.txtBuscarAsignados.Enter += Control_Enter; this.txtBuscarNoAsignado.Enter += Control_Enter; this.txtBuscarAsignados.Leave += Control_Leave; this.txtBuscarNoAsignado.Leave += Control_Leave; this.btnActualizar.Image = PresentacionBase.Imagenes.BotonActualizar; this.btnEjecutar.Image = PresentacionBase.Imagenes.BotonEjecutar; this.btnSalir.Image = PresentacionBase.Imagenes.BotonSalir; PoblarComboBox(this.cmbSector, _sectorServicio.ObtenerTodo(), "Descripcion"); if (this.cmbSector.Items.Count > 0) { PoblarComboBox(this.cmbSubSector, _subSectorServicio.ObtenerTodo(Convert.ToInt64(this.cmbSector.SelectedValue)), "Descripcion"); } }
private void btnNuevoSector_Click(object sender, EventArgs e) { var formularioNuevoSector = new _00002_ABM_Sector(); formularioNuevoSector.EntidadId = null; formularioNuevoSector.TipoOperacion = PresentacionBase.TipoOperacion.Insertar; formularioNuevoSector.ShowDialog(); if (formularioNuevoSector.RealizoAlgunaOperacion) { PoblarComboBox(this.cmbSector, _sectorServicio.ObtenerTodo(), "Descripcion"); } }
private void _00021_ReporteMensual_Load(object sender, EventArgs e) { try { cmbAño.DataSource = ReporteMensualServicio.ListaAños(); cmbMes.DataSource = ReporteMensualServicio.ListaMeses(); } catch (Exception ex) { } finally { try { lblApyNom.Text = String.Empty; lblLegajo.Text = String.Empty; this.txtBuscar.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.txtBuscar.AutoCompleteSource = AutoCompleteSource.CustomSource; } catch (Exception ex) { } finally { try { CargarComboBox(this.cmbDireccion, _sectorServicio.ObtenerTodo(), "Descripcion"); CargarComboBox(this.cmbArea, _subsectorServicio.ObtenerTodo(((SectorDTO)cmbDireccion.SelectedItem).Id), "Descripcion"); _agenteSeleccionado = _agenteServicio.ObtenerPorFiltro(((SubSectorDTO)cmbArea.SelectedItem).Descripcion).First(); ActualizarAgentes(); dgvReporte.TabStop = false; dgvLactancias.TabStop = false; dgvNovedades.TabStop = false; dgvComisiones.TabStop = false; dgvAgentes.Focus(); ActualizarReporte(); } catch { } } } }
public _00004_ABM_SubSector() : base("ABM de Sub-Sectores") { InitializeComponent(); _subSectorServicio = new SubSectorServicio(); _sectorServicio = new SectorServicio(); this.nudCodigo.Enter += Control_Enter; this.txtDescripcion.Enter += Control_Enter; this.txtAbreviatura.Enter += Control_Enter; this.nudCodigo.Leave += Control_Leave; this.txtDescripcion.Leave += Control_Leave; this.txtAbreviatura.Leave += Control_Leave; PoblarComboBox(this.cmbSector, _sectorServicio.ObtenerTodo(), "Descripcion"); this.txtDescripcion.Validating += (sender, e) => Validacion.VerificarNoVacios(sender, e, errorProviderMensaje); this.txtAbreviatura.Validating += (sender, e) => Validacion.VerificarNoVacios(sender, e, errorProviderMensaje); }