示例#1
0
 private void btnReporte_Click(object sender, EventArgs e)
 {
     if (FormMDI.IsUsuarioAdmin())
     {
         if (!frm_reporte.Visible)
         {
             try
             {
                 this.frm_reporte.MdiParent = this;
                 System.Threading.Thread.Sleep(250);
                 frm_reporte.Show();
             }
             catch (System.ObjectDisposedException)
             {
                 frm_reporte = new Reportes.FormReporte();
                 this.frm_reporte.MdiParent = this;
                 System.Threading.Thread.Sleep(250);
                 frm_reporte.Show();
             }
         }
         else
         {
             frm_reporte.Focus();
         }
     }
 }
示例#2
0
        private void FormReporte_Load(object sender, EventArgs e)
        {
            // dateFechaInicial.MaxDate = DateTime.Today.AddDays(-1);
            // dateFechaFinal.MaxDate = DateTime.Today;
            btnGenerar.Focus();
            chkFecha_CheckedChanged(new Object(), new EventArgs());
            txtNombre.AutoCompleteCustomSource = FormReporte.LoadAutoCompleteNombre();
            txtNombre.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtNombre.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            chkFecha.Checked = false;

            chkProducto.Checked = false;
            finicial            = new DateTime(DateTime.Today.Year, 1, 1);
            ffinal = DateTime.Today;
        }