예제 #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <Informe>().Count() == 1)
     {
         Application.OpenForms.OfType <Informe>().First().Focus();
     }
     else
     {
         Informe frm = new Informe();
         Conexion.data = "Gastos";
         frm.Show();
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <Informe>().Count() == 1)
     {
         Application.OpenForms.OfType <Informe>().First().Focus();
     }
     else
     {
         Informe frm = new Informe();
         Conexion.data  = "Caja";
         Conexion.desde = Convert.ToDateTime(maskedTextBox1.Text + " 00:00:00").ToString();
         Conexion.hasta = Convert.ToDateTime(maskedTextBox2.Text + " 23:59:59").ToString();
         frm.Show();
     }
 }