예제 #1
0
        static void Main(string[] args)
        {
            AgenteDTO agenteDto = new AgenteDTO();

            agenteDto.AGECODIGO    = 0;
            agenteDto.AGEDESCRICAO = "Farmacia do José!!!";

            Agente model = agenteDto.getModel();

            Console.WriteLine(model.Codigo);
            Console.WriteLine(model.Nome);
        }
예제 #2
0
        public _00021_ReporteMensual()
        {
            InitializeComponent();
            WindowState = FormWindowState.Maximized;

            _agenteServicio     = new AgenteServicio();
            _sectorServicio     = new SectorServicio();
            _subsectorServicio  = new SubSectorServicio();
            _agenteSeleccionado = null;

            _filaAgente = -1;
        }
예제 #3
0
        private void dgvAgentes_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvAgentes.RowCount > 0)
            {
                _filaAgente         = e.RowIndex;
                _agenteSeleccionado = (AgenteDTO)dgvAgentes.Rows[_filaAgente].DataBoundItem;

                btnActualizar.PerformClick();
                //cmbMes.SelectedIndex = DateTime.Now.Month - 1;
            }
            else
            {
                _filaAgente         = -1;
                _agenteSeleccionado = null;
            }
        }
예제 #4
0
        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
                    {
                    }
                }
            }
        }