예제 #1
0
        public virtual ReportDataTable getJournalByCodeDate(DateTime?dateFrom, DateTime?dateTo, int?account)
        {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if (&dateFrom.HasValue)
            {
                this.Adapter.SelectCommand.Parameters[1].Value = &dateFrom.Value;
            }
            else
            {
                this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
            }
            if (&dateTo.HasValue)
            {
                this.Adapter.SelectCommand.Parameters[2].Value = &dateTo.Value;
            }
            else
            {
                this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value;
            }
            if (&account.HasValue)
            {
                this.Adapter.SelectCommand.Parameters[3].Value = &account.Value;
            }
            else
            {
                this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value;
            }
            ReportDataTable reportDataTable = new ReportDataTable();

            this.Adapter.Fill(reportDataTable);
            return(reportDataTable);
        }
            public override global::System.Data.DataTable Clone()
            {
                ReportDataTable cln = ((ReportDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
 private void InitClass()
 {
     this.DataSetName             = "NewDataSet";
     this.Prefix                  = "";
     this.Locale                  = new global::System.Globalization.CultureInfo("en-ZA");
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableReport             = new ReportDataTable();
     base.Tables.Add(this.tableReport);
 }
예제 #4
0
 private void InitClass()
 {
     this.DataSetName             = "Report";
     this.Prefix                  = "";
     this.Namespace               = "http://tempuri.org/Report.xsd";
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tableReport             = new ReportDataTable();
     base.Tables.Add(this.tableReport);
 }
 internal void InitVars(bool initTable)
 {
     this.tableReport = ((ReportDataTable)(base.Tables["Report"]));
     if ((initTable == true))
     {
         if ((this.tableReport != null))
         {
             this.tableReport.InitVars();
         }
     }
 }
예제 #6
0
        public ReportResult Get(string reportName, string reportPath, string format, string connectionString, string datasetName = "DataSet1")
        {
            try
            {
                var reportDataTable = new ReportDataTable(connectionString);

                var dataTable = reportDataTable.GetTable("sp_" + reportName);

                string    mimeType;
                string    encoding;
                string    extension;
                string[]  streams;
                Warning[] warnings;

                ReportDataSource rds = new ReportDataSource
                {
                    Name  = datasetName,
                    Value = dataTable
                };

                //var currentDir = System.IO.Directory.GetCurrentDirectory().ToString();

                //LocalReport localReport = new LocalReport { ReportPath = @"" + currentDir +"\\" + reportPath };
                LocalReport localReport = new LocalReport {
                    ReportPath = @"" + reportPath
                };
                localReport.DataSources.Clear();
                localReport.DataSources.Add(rds);

                byte[] bytes = localReport.Render(
                    format,
                    null,
                    out mimeType,
                    out encoding,
                    out extension,
                    out streams,
                    out warnings);

                return(new ReportResult
                {
                    Content = bytes,
                    Extension = extension,
                    MediaType = mimeType
                });
            }
            catch (Exception e)
            {
                throw e;
            }
        }
예제 #7
0
        public HttpResponseMessage GetById(String badgeId, String personId, String companyId, String divisionId, String empId, String categoryId, String badgeStatus, String wcType, String wcData)
        {
            List <ReportRow> listReport;
            Report_Audit     reportObj = Report_Audit.getAccessReportObj();

            listReport = reportObj.getData(badgeId, personId, companyId, divisionId, empId, categoryId, badgeStatus, wcType, wcData);

            ReportDataTable tableObj = new ReportDataTable();

            tableObj.Page    = "1";
            tableObj.Records = listReport.Count().ToString();
            tableObj.Total   = "2";
            tableObj.repdata = listReport;
            var jsonNew = new
            {
                report = tableObj
            };

            return(Request.CreateResponse(HttpStatusCode.OK, jsonNew));
        }
예제 #8
0
        public HttpResponseMessage Get()
        {
            List <ReportRow> listReport;
            Report_Audit     reportObj = Report_Audit.getAccessReportObj();

            listReport = reportObj.getData("null", "null", "null", "null", "null", "null", "null", "null", "null");

            ReportDataTable tableObj = new ReportDataTable();

            tableObj.Page    = "1";
            tableObj.Records = listReport.Count().ToString();
            tableObj.Total   = "2";
            tableObj.repdata = listReport;
            var jsonNew = new
            {
                report = tableObj
            };

            return(Request.CreateResponse(HttpStatusCode.OK, jsonNew));
        }
        public HttpResponseMessage Get(String criteria, String top, String stDate, String stTime, String endDate, String endTime)
        {
            List <ReportRow>        listReport;
            Report_TopSoundingAlarm reportObj = Report_TopSoundingAlarm.getTopSoundingAlarmReportObj();

            listReport = reportObj.getData(criteria, top, stDate, stTime, endDate, endTime);

            ReportDataTable tableObj = new ReportDataTable();

            tableObj.Page    = "1";
            tableObj.Records = listReport.Count().ToString();
            tableObj.Total   = "2";
            tableObj.repdata = listReport;
            var jsonNew = new
            {
                report = tableObj
            };

            return(Request.CreateResponse(HttpStatusCode.OK, jsonNew));
        }
예제 #10
0
        public HttpResponseMessage Get(String areaId, String categoryId, String doorId)
        {
            List <ReportRow>    listReport;
            Report_DoorCategory reportObj = Report_DoorCategory.getAccessReportObj();

            listReport = reportObj.getData(areaId, categoryId, doorId);

            ReportDataTable tableObj = new ReportDataTable();

            tableObj.Page    = "1";
            tableObj.Records = listReport.Count().ToString();
            tableObj.Total   = "2";
            tableObj.repdata = listReport;
            var jsonNew = new
            {
                report = tableObj
            };

            return(Request.CreateResponse(HttpStatusCode.OK, jsonNew));
        }
예제 #11
0
        public HttpResponseMessage Get(String facilityId, String alarmDesc, String inputDesc, String stDate, String endDate, String stTime, String endTime, String days, String months)
        {
            List <ReportRow> listReport;
            Report_AlarmDoor reportObj = Report_AlarmDoor.getAlarmDoorReportObj();

            listReport = reportObj.getData(facilityId, alarmDesc, inputDesc, stDate, endDate, stTime, endTime, days, months);


            ReportDataTable tableObj = new ReportDataTable();

            tableObj.Page    = "1";
            tableObj.Records = listReport.Count().ToString();
            tableObj.Total   = "2";
            tableObj.repdata = listReport;
            var jsonNew = new
            {
                report = tableObj
            };

            return(Request.CreateResponse(HttpStatusCode.OK, jsonNew));
        }
 internal ReportRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tableReport = ((ReportDataTable)(this.Table));
 }