Ejemplo n.º 1
0
        private void CONTA_002_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            lbl_fecha.Text   = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss");
            lbl_empresa.Text = empresa;
            lbl_usuario.Text = usuario;
            int                   IdEmpresa         = p_IdEmpresa.Value == null ? 0 : Convert.ToInt32(p_IdEmpresa.Value);
            string                IdCtaCble         = p_IdCtaCble.Value == null ? "" : Convert.ToString(p_IdCtaCble.Value);
            string                IdCtaCbleFin      = p_IdCtaCbleFin.Value == null ? "" : Convert.ToString(p_IdCtaCbleFin.Value);
            DateTime              fechaIni          = p_fechaIni.Value == null ? DateTime.Now : Convert.ToDateTime(p_fechaIni.Value);
            DateTime              fechaFin          = p_fechaFin.Value == null ? DateTime.Now : Convert.ToDateTime(p_fechaFin.Value);
            int                   IdSucursal        = string.IsNullOrEmpty(p_IdSucursal.Value.ToString()) ? 0 : Convert.ToInt32(p_IdSucursal.Value);
            int                   IdPuntoCargo      = string.IsNullOrEmpty(p_IdPuntoCargo.Value.ToString()) ? 0 : Convert.ToInt32(p_IdPuntoCargo.Value);
            int                   IdPuntoCargoGrupo = string.IsNullOrEmpty(p_IdGrupo.Value.ToString()) ? 0 : Convert.ToInt32(p_IdGrupo.Value);
            CONTA_002_Bus         bus_rpt           = new CONTA_002_Bus();
            List <CONTA_002_Info> lst_rpt           = new List <CONTA_002_Info>();

            if (IntArray != null)
            {
                foreach (var item in IntArray)
                {
                    lst_rpt.AddRange(bus_rpt.get_list(IdEmpresa, IdCtaCble, IdCtaCbleFin, item, fechaIni, fechaFin, IdPuntoCargo, IdPuntoCargoGrupo));
                }
            }
            this.DataSource = lst_rpt;

            tb_empresa_Bus bus_empresa = new tb_empresa_Bus();
            var            emp         = bus_empresa.get_info(IdEmpresa);

            if (emp != null && emp.em_logo != null)
            {
                ImageConverter obj = new ImageConverter();
                lbl_imagen.Image = (Image)obj.ConvertFrom(emp.em_logo);
            }
        }
Ejemplo n.º 2
0
        private void CONTA_002_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            lbl_fecha.Text   = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss");
            lbl_empresa.Text = empresa;
            lbl_usuario.Text = usuario;
            int      IdEmpresa = p_IdEmpresa.Value == null ? 0 : Convert.ToInt32(p_IdEmpresa.Value);
            string   IdCtaCble = p_IdCtaCble.Value == null ? "" : Convert.ToString(p_IdCtaCble.Value);
            DateTime fechaIni  = p_fechaIni.Value == null ? DateTime.Now : Convert.ToDateTime(p_fechaIni.Value);
            DateTime fechaFin  = p_fechaFin.Value == null ? DateTime.Now : Convert.ToDateTime(p_fechaFin.Value);

            CONTA_002_Bus         bus_rpt = new CONTA_002_Bus();
            List <CONTA_002_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdCtaCble, fechaIni, fechaFin);

            this.DataSource = lst_rpt;
        }