示例#1
0
        public static IList <tblChart_Metric> ChartMetricDTO_Convert_List_DTO_To_Table(ICollection <ChartMetricDTO> chart_metric_dtos)
        {
            IList <tblChart_Metric> tbl_chart_metrics = new List <tblChart_Metric>();

            foreach (ChartMetricDTO chart_metric_dto in chart_metric_dtos)
            {
                tbl_chart_metrics.Add(ChartMetricDTO_Convert.ChartMetricDTO_Convert_DTO_To_Table(chart_metric_dto));
            }
            return(tbl_chart_metrics);
        }
示例#2
0
        public static IList <ChartMetricDTO> ChartMetricDTO_Convert_List_Table_To_DTO(ICollection <tblChart_Metric> tbl_chart_metrics)
        {
            IList <ChartMetricDTO> chart_metric_dtos = new List <ChartMetricDTO>();

            foreach (tblChart_Metric tbl_chart_metric in tbl_chart_metrics)
            {
                chart_metric_dtos.Add(ChartMetricDTO_Convert.ChartMetricDTO_Convert_Table_To_DTO(tbl_chart_metric));
            }
            return(chart_metric_dtos);
        }
示例#3
0
        public static tblChart_Pie ChartPieDTO_Convert_DTO_Table(ChartPieDTO chart_pie_dto)
        {
            tblChart_Pie tbl_chart_pie = new tblChart_Pie();

            tbl_chart_pie.Id                 = chart_pie_dto.Id;
            tbl_chart_pie.Group_By           = chart_pie_dto.Group_By;
            tbl_chart_pie.DashboardWidget_Id = chart_pie_dto.Dashboard_Widget_Id;
            tbl_chart_pie.Chart_Title        = chart_pie_dto.Chart_Title;

            tbl_chart_pie.tblChart_Metric = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_DTO_To_Table(chart_pie_dto.Chart_Id_Metric_Ids, chart_pie_dto.Id, Common.Enums.ChartType.Pie);
            tbl_chart_pie.From_Date       = chart_pie_dto.Chart_Common_Property_DTO.From_Date;
            if (chart_pie_dto.Chart_Common_Property_DTO.Time_Line != null)
            {
                tbl_chart_pie.Time_Line = chart_pie_dto.Chart_Common_Property_DTO.Time_Line.ToString();
            }
            tbl_chart_pie.To_Date   = chart_pie_dto.Chart_Common_Property_DTO.To_Date;
            tbl_chart_pie.Precision = chart_pie_dto.Chart_Common_Property_DTO.Precision;
            return(tbl_chart_pie);
        }
示例#4
0
        public static tblChart_Stacked ChartStackedDTO_Convert_DTO_Table(ChartStackedDTO chart_Stacked_dto)
        {
            tblChart_Stacked tbl_chart_Stacked = new tblChart_Stacked();

            tbl_chart_Stacked.Id                 = chart_Stacked_dto.Id;
            tbl_chart_Stacked.Group_By           = chart_Stacked_dto.Group_By;
            tbl_chart_Stacked.DashboardWidget_Id = chart_Stacked_dto.Dashboard_Widget_Id;
            tbl_chart_Stacked.Chart_Title        = chart_Stacked_dto.Chart_Title;

            tbl_chart_Stacked.tblChart_Metric = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_DTO_To_Table(chart_Stacked_dto.Chart_Id_Metric_Ids, chart_Stacked_dto.Id, Common.Enums.ChartType.Stacked);
            tbl_chart_Stacked.From_Date       = chart_Stacked_dto.Chart_Common_Property_DTO.From_Date;
            if (chart_Stacked_dto.Chart_Common_Property_DTO.Time_Line != null)
            {
                tbl_chart_Stacked.Time_Line = chart_Stacked_dto.Chart_Common_Property_DTO.Time_Line.ToString();
            }
            tbl_chart_Stacked.To_Date   = chart_Stacked_dto.Chart_Common_Property_DTO.To_Date;
            tbl_chart_Stacked.Precision = chart_Stacked_dto.Chart_Common_Property_DTO.Precision;
            return(tbl_chart_Stacked);
        }
示例#5
0
        public static tblChart_Donut ChartDonutDTO_Convert_DTO_Table(ChartDonutDTO chart_Donut_dto)
        {
            tblChart_Donut tbl_chart_Donut = new tblChart_Donut();

            tbl_chart_Donut.Id = chart_Donut_dto.Id;
            tbl_chart_Donut.DashboardWidget_Id = chart_Donut_dto.Dashboard_Widget_Id;
            tbl_chart_Donut.Chart_Title        = chart_Donut_dto.Chart_Title;

            tbl_chart_Donut.tblChart_Metric = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_DTO_To_Table(chart_Donut_dto.Chart_Id_Metric_Ids, chart_Donut_dto.Id, Common.Enums.ChartType.Donut);

            tbl_chart_Donut.From_Date = chart_Donut_dto.Chart_Common_Property_DTO.From_Date;
            tbl_chart_Donut.To_Date   = chart_Donut_dto.Chart_Common_Property_DTO.To_Date;
            tbl_chart_Donut.Precision = chart_Donut_dto.Chart_Common_Property_DTO.Precision;
            if (chart_Donut_dto.Chart_Common_Property_DTO.Time_Line != null)
            {
                tbl_chart_Donut.Time_Line = chart_Donut_dto.Chart_Common_Property_DTO.Time_Line.ToString();
            }


            return(tbl_chart_Donut);
        }
示例#6
0
        public static ChartPieDTO ChartPieDTO_Convert_Table_DTO(tblChart_Pie tbl_Chart_Pie)
        {
            ChartPieDTO chart_pie_dto = new ChartPieDTO();

            chart_pie_dto.Id                  = tbl_Chart_Pie.Id;
            chart_pie_dto.Group_By            = tbl_Chart_Pie.Group_By;
            chart_pie_dto.Dashboard_Widget_Id = tbl_Chart_Pie.DashboardWidget_Id;
            chart_pie_dto.Chart_Title         = tbl_Chart_Pie.Chart_Title;
            chart_pie_dto.Chart_Metric_Ids    = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_Table_To_Array(tbl_Chart_Pie.tblChart_Metric);
            //chart_pie_dto.Chart_Metric = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_Table_To_DTO(tbl_Chart_Pie.tblChart_Metric);
            chart_pie_dto.Dashboard_Widget_Id = tbl_Chart_Pie.DashboardWidget_Id;

            chart_pie_dto.Chart_Common_Property_DTO.From_Date = tbl_Chart_Pie.From_Date;
            if (tbl_Chart_Pie.Time_Line != null)
            {
                chart_pie_dto.Chart_Common_Property_DTO.Time_Line = (TimeLine)Enums.TryParse(typeof(TimeLine), tbl_Chart_Pie.Time_Line);
            }
            chart_pie_dto.Chart_Common_Property_DTO.To_Date   = tbl_Chart_Pie.To_Date;
            chart_pie_dto.Chart_Common_Property_DTO.Precision = tbl_Chart_Pie.Precision;
            return(chart_pie_dto);
        }
示例#7
0
        public static ChartDonutDTO ChartDonutDTO_Convert_Table_DTO(tblChart_Donut tbl_Chart_Donut)
        {
            ChartDonutDTO chart_Donut_dto = new ChartDonutDTO();

            chart_Donut_dto.Id = tbl_Chart_Donut.Id;
            chart_Donut_dto.Dashboard_Widget_Id = tbl_Chart_Donut.DashboardWidget_Id;
            chart_Donut_dto.Chart_Title         = tbl_Chart_Donut.Chart_Title;
            chart_Donut_dto.Chart_Metric_Ids    = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_Table_To_Array(tbl_Chart_Donut.tblChart_Metric);
            //chart_Donut_dto.Chart_Metric = ChartMetricDTO_Convert.ChartMetricDTO_Convert_List_Table_To_DTO(tbl_Chart_Donut.tblChart_Metric);
            chart_Donut_dto.Dashboard_Widget_Id = tbl_Chart_Donut.DashboardWidget_Id;

            chart_Donut_dto.Chart_Common_Property_DTO.From_Date = tbl_Chart_Donut.From_Date;
            chart_Donut_dto.Chart_Common_Property_DTO.To_Date   = tbl_Chart_Donut.To_Date;
            chart_Donut_dto.Chart_Common_Property_DTO.Precision = tbl_Chart_Donut.Precision;
            if (tbl_Chart_Donut.Time_Line != null)
            {
                chart_Donut_dto.Chart_Common_Property_DTO.Time_Line = (TimeLine)Enums.TryParse(typeof(TimeLine), tbl_Chart_Donut.Time_Line);
            }


            return(chart_Donut_dto);
        }