Exemple #1
0
        private void FAC_002_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            int     IdEmpresa  = string.IsNullOrEmpty(p_IdEmpresa.Value.ToString()) ? 0 : Convert.ToInt32(p_IdEmpresa.Value);
            int     IdSucursal = string.IsNullOrEmpty(p_IdSucursal.Value.ToString()) ? 0 : Convert.ToInt32(p_IdSucursal.Value);
            int     IdBodega   = string.IsNullOrEmpty(p_IdBodega.Value.ToString()) ? 0 : Convert.ToInt32(p_IdBodega.Value);
            decimal IdNota     = string.IsNullOrEmpty(p_IdNota.Value.ToString()) ? 0 : Convert.ToInt32(p_IdNota.Value);

            FAC_002_Bus         bus_rpt = new FAC_002_Bus();
            List <FAC_002_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdSucursal, IdBodega, IdNota);

            this.DataSource = lst_rpt;


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

            lbl_empresa.Text   = empresa.em_nombre;
            lbl_direccion.Text = empresa.em_direccion;
            lbl_dir.Text       = empresa.em_direccion;
            lbl_correo.Text    = empresa.ContribuyenteEspecial;
            lbl_ruc.Text       = empresa.em_ruc;

            if (empresa != null && empresa.em_logo != null)
            {
                ImageConverter obj = new ImageConverter();
                lbl_imagen.Image = (Image)obj.ConvertFrom(empresa.em_logo);
            }
        }
Exemple #2
0
        private void FAC_002_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            lbl_fecha.Text   = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss");
            lbl_usuario.Text = usuario;
            lbl_empresa.Text = empresa;

            int      IdEmpresa  = string.IsNullOrEmpty(p_IdEmpresa.Value.ToString()) ? 0 : Convert.ToInt32(p_IdEmpresa.Value);
            int      IdSucursal = string.IsNullOrEmpty(p_IdSucursal.Value.ToString()) ? 0 : Convert.ToInt32(p_IdSucursal.Value);
            decimal  IdCliente  = string.IsNullOrEmpty(p_IdCliente.Value.ToString()) ? 0 : Convert.ToDecimal(p_IdCliente.Value);
            DateTime fechaCorte = p_fechaCorte.Value == null ? DateTime.Now : Convert.ToDateTime(p_fechaCorte.Value);
            bool     MostrarSoloCarteraVencida = p_MostrarSoloCarteraVencida.Value == null ? false : Convert.ToBoolean(p_MostrarSoloCarteraVencida.Value);

            FAC_002_Bus         bus_rpt = new FAC_002_Bus();
            List <FAC_002_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdSucursal, IdCliente, fechaCorte, MostrarSoloCarteraVencida);

            this.DataSource = lst_rpt;
        }