public JsonResult GetSegmentLRS(int segmentId)
 {
     SegmentModel model = new SegmentModel();
     try
     {
         model.LRSSchemeBase = _rtpProjectRepository.GetLRSScheme((int)SchemeName.LRSProjects);
         XMLService xml = new XMLService(_rtpProjectRepository);
         model._LRS = xml.LoadRecords((int)SchemeName.LRSProjects, segmentId);
     }
     catch (Exception ex)
     {
         return Json(new { message = "Segment not found." });
     }
     return Json(model);
 }
 public JsonResult GetSegmentDetails(int segmentId)
 {
     SegmentModel model;
     try
     {
         model = _rtpProjectRepository.GetSegmentDetails(segmentId);
         model.LRSSchemeBase = _rtpProjectRepository.GetLRSScheme((int)SchemeName.LRSProjects);
         XMLService xml = new XMLService(_rtpProjectRepository);
         model._LRS = xml.LoadRecords((int)SchemeName.LRSProjects, segmentId);
         //model._LRS = xml.LoadRecord((int)SchemeName.LRSProjects, segmentId);
         //var test = xml.GetScheme(1);
         //var temp = xml.GenerateXml(test,xml.GetSegmentLRSData(1, segmentId));
     }
     catch (Exception ex)
     {
         return Json(new { message = "Segment not found." });
     }
     return Json(model);
 }