public dynamic SaveOTRReg_helper(NavodayamOTR root)
        {
            dynamic obj = new ExpandoObject();

            try
            {
                var val  = PostData("http://125.17.121.166:8080/SDPIntegrationServices/YSRNavodayamService/SaveOTRDetails", root);
                var data = GetSerialzedData <dynamic>(val);

                obj.Status = 100;
                obj.Reason = "Data Loaded Successfully";
                obj.Data   = data;

                return(obj);
            }
            catch (Exception ex)
            {
                ExceptionDataModel objex   = new ExceptionDataModel();
                string             mappath = HttpContext.Current.Server.MapPath("IndustriesExceptionLogs");
                Task WriteTask             = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "GetSeedGroupsData Service:" + ex.Message.ToString()));
                Common_Industries_Error(ex.Message.ToString(), "http://125.17.121.166:8080/SDPIntegrationServices/YSRNavodayamService/SaveOTRDetails", "2");

                //objectData.Status = "Failure";

                //objectData.Reason = ThirdpartyMessage; //ex.Message.ToString();
                //objectData.Data = "";
                obj.Status = 102;
                obj.Reason = ThirdpartyMessage;
                return(obj);
            }
        }
        public IHttpActionResult SaveOTRReg(dynamic data)
        {
            string value = token_gen.Authorize_aesdecrpty(data);

            try
            {
                //string value = JsonConvert.SerializeObject(data);
                NavodayamOTR rootobj = JsonConvert.DeserializeObject <NavodayamOTR>(value);
                bool         IsPDF   = true;
                if (!string.IsNullOrEmpty(rootobj.UAM_Enclosure))
                {
                    byte[] PdfBytes = Convert.FromBase64String(rootobj.UAM_Enclosure);
                    if (!Utils.IsValidPDF(PdfBytes))
                    {
                        IsPDF = false;
                    }
                }

                if (!string.IsNullOrEmpty(rootobj.Other_Enclosure))
                {
                    byte[] PdfBytes = Convert.FromBase64String(rootobj.UAM_Enclosure);
                    if (!Utils.IsValidPDF(PdfBytes))
                    {
                        IsPDF = false;
                    }
                }
                if (IsPDF)
                {
                    return(Ok(Indhel.SaveOTRReg_helper(rootobj)));
                }
                else
                {
                    CatchData.Status = 102;
                    CatchData.Reason = "Invalid File Format";
                    return(Ok(CatchData));
                }
            }
            catch (Exception ex)
            {
                CatchData.Status = 102;
                CatchData.Reason = IndustriesHelper.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }