Exemplo n.º 1
0
        private void ROL_013_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  = string.IsNullOrEmpty(p_IdEmpresa.Value.ToString()) ? 0 : Convert.ToInt32(p_IdEmpresa.Value);
            int      IdNomina   = string.IsNullOrEmpty(p_IdNomina.Value.ToString()) ? 0 : Convert.ToInt32(p_IdNomina.Value);
            int      IdSucursal = string.IsNullOrEmpty(p_IdSucursal.Value.ToString()) ? 0 : Convert.ToInt32(p_IdSucursal.Value);
            DateTime FechaIni   = string.IsNullOrEmpty(p_FechaIni.Value.ToString()) ? DateTime.Now : Convert.ToDateTime(p_FechaIni.Value);
            DateTime FechaFin   = string.IsNullOrEmpty(p_FechaFin.Value.ToString()) ? DateTime.Now : Convert.ToDateTime(p_FechaFin.Value);
            decimal  IdEmpleado = string.IsNullOrEmpty(p_IdEmpleado.Value.ToString()) ? 0 : Convert.ToDecimal(p_IdEmpleado.Value);
            int      IdDivision = 0;
            int      IdArea     = 0;

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

            lbl_empresa.Text = emp.RazonSocial;
            if (emp != null && emp.em_logo != null)
            {
                ImageConverter obj = new ImageConverter();
                lbl_imagen.Image = (Image)obj.ConvertFrom(emp.em_logo);
            }

            ROL_013_Bus         bus_rpt = new ROL_013_Bus();
            List <ROL_013_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdNomina, IdSucursal, FechaIni, FechaFin, IdEmpleado, IdDivision, IdArea);

            this.DataSource = lst_rpt;
        }
Exemplo n.º 2
0
        private void ROL_013_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);
            int      IdNomina     = p_IdNomina.Value == null ? 0 : Convert.ToInt32(p_IdNomina.Value);
            decimal  IdEmpleado   = p_IdEmpleado.Value == null ? 0 : Convert.ToDecimal(p_IdEmpleado.Value);
            DateTime fecha_inicio = p_fecha_inicio.Value == null ? DateTime.Now : Convert.ToDateTime(p_fecha_inicio.Value);
            DateTime fecha_fin    = p_fecha_fin.Value == null ? DateTime.Now : Convert.ToDateTime(p_fecha_fin.Value);

            ROL_013_Bus         bus_rpt = new ROL_013_Bus();
            List <ROL_013_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdNomina, IdEmpleado, fecha_inicio, fecha_fin);

            this.DataSource = lst_rpt;
        }