public static ChartHeatMapDTO ChartHeatMapDTO_Convert_Table_To_DTO(tblChart_Heatmap chart_Heatmap_tbl)
 {
     if (chart_Heatmap_tbl != null)
     {
         try
         {
             ChartHeatMapDTO chart_Heatmap_dto = new ChartHeatMapDTO();
             chart_Heatmap_dto.Chart_Title         = chart_Heatmap_tbl.Chart_Title;
             chart_Heatmap_dto.Dashboard_Widget_Id = chart_Heatmap_tbl.DashboardWidget_Id;
             chart_Heatmap_dto.Id        = chart_Heatmap_tbl.Id;
             chart_Heatmap_dto.Metric.Id = chart_Heatmap_tbl.Metric_Id;
             chart_Heatmap_dto.Chart_Common_Property_DTO.From_Date = chart_Heatmap_tbl.From_Date;
             if (chart_Heatmap_tbl.Time_Line != null)
             {
                 chart_Heatmap_dto.Chart_Common_Property_DTO.Time_Line = (TimeLine)Enums.TryParse(typeof(TimeLine), chart_Heatmap_tbl.Time_Line);
             }
             chart_Heatmap_dto.Chart_Common_Property_DTO.To_Date   = chart_Heatmap_tbl.To_Date;
             chart_Heatmap_dto.Chart_Common_Property_DTO.Precision = chart_Heatmap_tbl.Precision;
             return(chart_Heatmap_dto);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
     else
     {
         throw new Chart_Heatmap_Exception(Resources.Chart_Heatmap_Null_Exception);
     }
 }
        public static tblChart_Heatmap ChartHeatMapDTO_Convert_DTO_To_Table(ChartHeatMapDTO chart_Heatmap_dto)
        {
            if (chart_Heatmap_dto != null)
            {
                try
                {
                    tblChart_Heatmap chart_Heatmap_tbl = new tblChart_Heatmap();
                    chart_Heatmap_tbl.Chart_Title        = chart_Heatmap_dto.Chart_Title;
                    chart_Heatmap_tbl.DashboardWidget_Id = chart_Heatmap_dto.Dashboard_Widget_Id;
                    chart_Heatmap_tbl.Id        = chart_Heatmap_dto.Id;
                    chart_Heatmap_tbl.Metric_Id = chart_Heatmap_dto.Metric.Id;

                    chart_Heatmap_tbl.From_Date = chart_Heatmap_dto.Chart_Common_Property_DTO.From_Date;
                    if (chart_Heatmap_dto.Chart_Common_Property_DTO.Time_Line != null)
                    {
                        chart_Heatmap_tbl.Time_Line = chart_Heatmap_dto.Chart_Common_Property_DTO.Time_Line.ToString();
                    }
                    chart_Heatmap_tbl.To_Date   = chart_Heatmap_dto.Chart_Common_Property_DTO.To_Date;
                    chart_Heatmap_tbl.Precision = chart_Heatmap_dto.Chart_Common_Property_DTO.Precision;
                    return(chart_Heatmap_tbl);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else
            {
                throw new Chart_Heatmap_Exception(Resources.Chart_Heatmap_Null_Exception);
            }
        }