Example #1
0
        private Hashtable construtPlantReportObj(int plantid, int type, string dataitem)
        {
            Hashtable    table     = new Hashtable();
            string       plantName = PlantService.GetInstance().GetPlantInfoById(plantid).name + " ";
            DefineReport report1   = new DefineReport()
            {
                ReportType = type,
                ReportName = plantName + "-" + DataReportType.getNameByCode(type),
                SaveTime   = DateTime.Now,
                dataitem   = dataitem,
                PlantId    = plantid
            };
            ReportConfig config1 = new ReportConfig()
            {
                sendFormat = "html",
                email      = "",
                sendMode   = "2",
                reportId   = 0,
                plantId    = plantid
            };

            table.Add(0, report1);
            table.Add(1, config1);
            return(table);
        }
Example #2
0
        private Hashtable construtAllPlantsReportObj(int userid, int type, string dataitem)
        {
            Hashtable    table   = new Hashtable();
            DefineReport report1 = new DefineReport()
            {
                ReportType = type,
                ReportName = "All plants-" + DataReportType.getNameByCode(type),
                SaveTime   = DateTime.Now,
                dataitem   = dataitem,
                UserId     = userid
            };
            ReportConfig config1 = new ReportConfig()
            {
                tinterval  = "4",
                sendFormat = "html",
                sendMode   = "2",
                email      = "",
                reportId   = 0,
                plantId    = 0
            };

            table.Add(0, report1);
            table.Add(1, config1);
            return(table);
        }