Ejemplo n.º 1
0
 private void chkEntre_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         MesaBusiness mesaBusiness = new MesaBusiness();
         if (chkEntre.Checked == true)
         {
             dtpEntre.Enabled = true;
             lblDesde.Show();
             lblHasta.Show();
             string fecha1 = dtpFecha.Value.ToString("yyyy.MM.dd");
             string fecha2 = dtpEntre.Value.ToString("yyyy.MM.dd");
             dgvFacturacion.DataSource = mesaBusiness.listaFechaEntre(fecha1, fecha2);
             configurarGrilla();
         }
         else
         {
             dtpEntre.Enabled = false;
             lblDesde.Hide();
             lblHasta.Hide();
             string fecha1 = dtpFecha.Value.ToString("yyyy.MM.dd");
             dgvFacturacion.DataSource = mesaBusiness.listaFecha(fecha1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
        private void dtpFecha_ValueChanged(object sender, EventArgs e)
        {
            MesaBusiness mesaBusiness = new MesaBusiness();

            try
            {
                if (chkEntre.Checked == false)
                {
                    configurarGrilla();
                    string fecha = dtpFecha.Value.ToString("yyyy.MM.dd");
                    dgvFacturacion.DataSource = mesaBusiness.listaFecha(fecha);
                }
                else
                {
                    if (dtpEntre.Value == dtpFecha.Value)
                    {
                        configurarGrilla();
                        string fecha = dtpFecha.Value.ToString("yyyy.MM.dd");
                        dgvFacturacion.DataSource = mesaBusiness.listaFecha(fecha);
                        return;
                    }
                    configurarGrilla();
                    string fecha1 = dtpFecha.Value.ToString("yyyy.MM.dd");
                    string fecha2 = dtpEntre.Value.ToString("yyyy.MM.dd");
                    dgvFacturacion.DataSource = mesaBusiness.listaFechaEntre(fecha1, fecha2);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
        public void entreFecha(object sender, EventArgs e)
        {
            MesaBusiness mesaBusiness = new MesaBusiness();
            string       fecha1       = dtpFecha.Value.ToString("yyyy.MM.dd");
            string       fecha2       = dtpEntre.Value.ToString("yyyy.MM.dd");

            configurarGrilla();
            dgvFacturacion.DataSource = mesaBusiness.listaFechaEntre(fecha1, fecha2);
        }