示例#1
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);
        }
示例#2
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);
        }