Esempio n. 1
0
        private void CXC_003_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);
            decimal  IdCliente           = p_IdCliente.Value == null ? 0 : Convert.ToDecimal(p_IdCliente.Value);
            DateTime Fecha_ini           = p_Fecha_ini.Value == null ? DateTime.Now : Convert.ToDateTime(p_Fecha_ini.Value);
            DateTime Fecha_fin           = p_Fecha_fin.Value == null ? DateTime.Now : Convert.ToDateTime(p_Fecha_fin.Value);
            bool     MostrarSinRetencion = p_MostrarSinRetencion.Value == null ? false : Convert.ToBoolean(p_MostrarSinRetencion.Value);
            string   Tipo = string.IsNullOrEmpty(P_IdTipo.Value.ToString()) ? "" : P_IdTipo.Value.ToString();

            CXC_003_Bus         bus_rpt = new CXC_003_Bus();
            List <CXC_003_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdCliente, Fecha_ini, Fecha_fin, Tipo, MostrarSinRetencion);

            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);
            }
        }
Esempio n. 2
0
        private void CXC_003_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);
            decimal  IdCliente = p_IdCliente.Value == null ? 0 : Convert.ToDecimal(p_IdCliente.Value);
            DateTime Fecha_ini = p_Fecha_ini.Value == null ? DateTime.Now : Convert.ToDateTime(p_Fecha_ini.Value);
            DateTime Fecha_fin = p_Fecha_fin.Value == null ? DateTime.Now : Convert.ToDateTime(p_Fecha_fin.Value);

            CXC_003_Bus         bus_rpt = new CXC_003_Bus();
            List <CXC_003_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdCliente, Fecha_ini, Fecha_fin);

            this.DataSource = lst_rpt;
        }