Ejemplo n.º 1
0
 public ReportVerificationModel()
 {
     SourceDataSet = new ReportDataSet();
     DestinationDataSet = new ReportDataSet();
     VerifiedResultSet = new ReportDataSet();
     VerifiedResultMsg = new Dictionary<string, string>();
 }
Ejemplo n.º 2
0
        public ReportDataSet ReadDataSet(string file, int headerRowNumber)
        {
            ReportDataSet dataSet = new ReportDataSet();

            try
            {
                excel = new Excel.Application();
                Excel.Workbook tempBook = excel.Workbooks.Open(file);

                foreach (var item in tempBook.Sheets)
                {
                    Excel.Worksheet sheet = item as Excel.Worksheet;
                    ReportDataTable table = this.GetDataTable(sheet, headerRowNumber);
                    dataSet.Tables.Add(table.Name, table);
                }

                tempBook.Save();
                tempBook.Close();
                tempBook = null;
                excel.Application.Quit();
            }
            catch (Exception ex)
            {
                excel.Application.Quit();
            }

            return(dataSet);
        }
Ejemplo n.º 3
0
        public ReportDataSet ReadDataSet(string file, int headerRowNumber)
        {
            ReportDataSet dataSet = new ReportDataSet();
            try
            {
                excel = new Excel.Application();
                Excel.Workbook tempBook = excel.Workbooks.Open(file);

                foreach (var item in tempBook.Sheets)
                {
                    Excel.Worksheet sheet = item as Excel.Worksheet;
                    ReportDataTable table = this.GetDataTable(sheet, headerRowNumber);
                    dataSet.Tables.Add(table.Name, table);
                }

                tempBook.Save();
                tempBook.Close();
                tempBook = null;
                excel.Application.Quit();
            }
            catch (Exception ex)
            {
                excel.Application.Quit();
            }

            return dataSet;
        }
Ejemplo n.º 4
0
 public ReportVerificationModel()
 {
     SourceDataSet      = new ReportDataSet();
     DestinationDataSet = new ReportDataSet();
     VerifiedResultSet  = new ReportDataSet();
     VerifiedResultMsg  = new Dictionary <string, string>();
 }