Example #1
0
        public void CargarReporte(String LCorrelativo)
        {
            DataSet   DSDevuelve = new DataSet();
            DataTable DTMain     = new DataTable();

            this.MdiParent = MFMdi.ActiveForm;
            this.Left      = 0;
            this.Top       = 0;
            WSAdministracion.WSAdministracion WSAdm = new WSAdministracion.WSAdministracion();
            WSAdm.Url  = mdlGenerales.DireccionWS + "FazServices/WSAdministracion.asmx";
            DSDevuelve = WSAdm.GeneraReporteEAR(mdlGenerales.Conexion, LCorrelativo);
            DTMain     = DSDevuelve.Tables[0];
            DataSet   DSArma = new DataSet();
            DataTable DTArma = new DataTable();

            DTArma.Columns.Add("tipo", Type.GetType("System.String"));
            DTArma.Columns.Add("correlativo", Type.GetType("System.String"));
            DTArma.Columns.Add("ndoc", Type.GetType("System.String"));
            DTArma.Columns.Add("nombres", Type.GetType("System.String"));
            DTArma.Columns.Add("detalle", Type.GetType("System.String"));
            DTArma.Columns.Add("documento", Type.GetType("System.String"));
            DTArma.Columns.Add("fecha", Type.GetType("System.DateTime"));
            DTArma.Columns.Add("abreviatura", Type.GetType("System.String"));
            DTArma.Columns.Add("monto", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("tc", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("soles", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("logo", Type.GetType("System.Byte[]"));
            DTArma.Columns.Add("FechaEAR", Type.GetType("System.DateTime"));
            DataRow DR;

            foreach (DataRow Row in DTMain.Rows)
            {
                DR                = DTArma.NewRow();
                DR["tipo"]        = Row[0].ToString();
                DR["correlativo"] = Row[1].ToString();
                DR["ndoc"]        = Row[2].ToString();
                DR["nombres"]     = Row[3].ToString();
                DR["detalle"]     = Row[4].ToString();
                DR["documento"]   = Row[5].ToString();
                DR["fecha"]       = Convert.ToDateTime(Row[6].ToString());
                DR["abreviatura"] = Row[7].ToString();
                DR["monto"]       = Convert.ToDecimal(Row[8].ToString());
                DR["tc"]          = Convert.ToDecimal(Row[9].ToString());
                DR["soles"]       = Convert.ToDecimal(Row[10].ToString());
                DR["logo"]        = Mostrar(Row[11].ToString());
                DR["FechaEAR"]    = Convert.ToDateTime(Row[12].ToString());
                DTArma.Rows.Add(DR);
            }
            Report.Database.Tables[0].SetDataSource(DTArma);
            CRVReport.ReportSource = Report;
            CRVReport.Zoom(100);
            CRVReport.Visible = true;
        }
Example #2
0
        private void CargarReporte()
        {
            DataSet   DSDevuelve = new DataSet();
            DataTable DTMain     = new DataTable();

            this.MdiParent = MFMdi.ActiveForm;
            this.Left      = 0;
            this.Top       = 0;
            WSAdministracion.WSAdministracion WSAdm = new WSAdministracion.WSAdministracion();
            WSAdm.Url  = mdlGenerales.DireccionWS + "FazServices/WSAdministracion.asmx";
            DSDevuelve = WSAdm.DevuelveReporteCostosGeneral(mdlGenerales.Conexion,
                                                            RucEmpresa[Convert.ToInt32(cmbEmpresa.SelectedIndex.ToString())].ToString(),
                                                            IDproyecto[Convert.ToInt32(cmbProyecto.SelectedIndex.ToString())].ToString());
            DTMain = DSDevuelve.Tables[0];
            DataSet   DSArma = new DataSet();
            DataTable DTArma = new DataTable();

            DTArma.Columns.Add("empresa", Type.GetType("System.String"));
            DTArma.Columns.Add("Descripcion", Type.GetType("System.String"));
            DTArma.Columns.Add("inicio", Type.GetType("System.DateTime"));
            DTArma.Columns.Add("ruc", Type.GetType("System.String"));
            DTArma.Columns.Add("tipocosto", Type.GetType("System.String"));
            DTArma.Columns.Add("detalletc", Type.GetType("System.String"));
            DTArma.Columns.Add("IGV", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("totalsinigv", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("total", Type.GetType("System.Decimal"));
            DTArma.Columns.Add("logo", Type.GetType("System.Byte[]"));
            DataRow DR;

            foreach (DataRow Row in DTMain.Rows)
            {
                DR                = DTArma.NewRow();
                DR["empresa"]     = Row[0].ToString();
                DR["Descripcion"] = Row[1].ToString();
                DR["inicio"]      = Convert.ToDateTime(Row[2].ToString());
                DR["ruc"]         = Row[3].ToString();
                DR["tipocosto"]   = Row[4].ToString();
                DR["detalletc"]   = Row[5].ToString();
                DR["IGV"]         = Convert.ToDecimal(Row[6].ToString());
                DR["totalsinigv"] = Convert.ToDecimal(Row[7].ToString());
                DR["total"]       = Convert.ToDecimal(Row[8].ToString());
                DR["logo"]        = Mostrar(Row[9].ToString());
                DTArma.Rows.Add(DR);
            }
            Report.Database.Tables[0].SetDataSource(DTArma);
            CRVReport.ReportSource = Report;
            CRVReport.Zoom(100);
            CRVReport.Visible = true;
        }
Example #3
0
        public void CargarReporte(int id)
        {
            DataSet   DSDevuelve = new DataSet();
            DataTable DTMain     = new DataTable();

            this.Left = 0;
            this.Top  = 0;
            WSLicitaciones.WSLicitaciones WSLic = new WSLicitaciones.WSLicitaciones();
            WSLic.Url  = mdlGenerales.DireccionWS + "FazServices/WSLicitaciones.asmx";
            DSDevuelve = WSLic.DevuelveRepOrden(mdlGenerales.Conexion, id.ToString());
            Report.Database.Tables[0].SetDataSource(DSDevuelve.Tables[0]);
            CRVReport.ReportSource = Report;
            CRVReport.Zoom(100);
            CRVReport.Visible = true;
        }
Example #4
0
        private void CargarReporte()
        {
            DataSet   DSDevuelve = new DataSet();
            DataTable DTMain     = new DataTable();

            this.MdiParent = MFMdi.ActiveForm;
            this.Left      = 0;
            this.Top       = 0;
            WSLicitaciones.WSLicitaciones WSLic = new WSLicitaciones.WSLicitaciones();
            WSLic.Url  = mdlGenerales.DireccionWS + "FazServices/WSLicitaciones.asmx";
            DSDevuelve = WSLic.DevuelveRepExpLicEmpresa(mdlGenerales.Conexion);
            Report.Database.Tables[0].SetDataSource(DSDevuelve.Tables[0]);
            CRVReport.ReportSource = Report;
            CRVReport.Zoom(100);
            CRVReport.Visible = true;
        }
Example #5
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            CRVReport.PrintReport();

            try
            {
                OleDbConnection con = new OleDbConnection(iLoginEx.ConnString());
                con.Open();
                string       sql = "select count(*) from zhrs_t_zzcSO_SOAddSeriesInfo where SO_SOMain_Id=" + SO_SOMain_Id + "";
                OleDbCommand com = new OleDbCommand(sql, con);
                int          n   = Convert.ToInt32(com.ExecuteScalar());
                if (n > 0)
                {
                    crystalReportViewer1.PrintReport();
                }
                con.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("发生错误!" + ex.Message);
            }
            finally { GC.Collect(); }
        }
Example #6
0
 private void tsmiLast_Click(object sender, EventArgs e)
 {
     CRVReport.ShowLastPage();
 }
Example #7
0
 private void tsmifrist_Click(object sender, EventArgs e)
 {
     CRVReport.ShowPreviousPage();
 }
Example #8
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     CRVReport.ShowFirstPage();
 }