Ejemplo n.º 1
0
        public IHttpActionResult GetJobcardetails(dynamic data)
        {
            string       value     = token_gen.Authorize_aesdecrpty(data);
            JobCardModel root      = JsonConvert.DeserializeObject <JobCardModel>(value);
            LogModel     ologmodel = new LogModel();

            ologmodel.UserId   = root.UserId;
            ologmodel.SacId    = root.SacId;
            ologmodel.DesignId = root.DesignId;
            ologmodel.DeptId   = "";          //Departments.Panchayati_Raj.ToString();
            ologmodel.TranId   = root.TranId;
            //olog.WriteLogParameters(ologmodel);
            JobCardHelper hlpval = new JobCardHelper();

            try
            {
                //_log.Info("In the PRRDController => GetJobcardetails: " + value.ToString());
                return(Ok(hlpval.GetJobcardetails(root)));
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("JobcardControllrExceptions");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "getting error GetJobcardetails :" + ex.Message.ToString()));
                CatchData.Status = 102;
                CatchData.Reason = "Error Occured While Getting Data";
                return(Ok(CatchData));
            }
        }
Ejemplo n.º 2
0
        public dynamic TranslateTextAPI(dynamic data)
        {
            string           jsondata  = token_gen.Authorize_aesdecrpty(data);
            TranslationModel val       = JsonConvert.DeserializeObject <TranslationModel>(jsondata);
            LogModel         ologmodel = new LogModel();

            //ologmodel.UserId = val.UserId;
            //ologmodel.SacId = val.SacId;
            //ologmodel.DesignId = val.DesignId;
            //ologmodel.DeptId = string.Empty;
            //ologmodel.TranId = val.TranId;
            ////olog.WriteLogParameters(ologmodel);
            try
            {
                JobCardHelper hel = new JobCardHelper();
                //_log.Info("In the PRRDController => TranslateTextAPI: " + jsondata.ToString());

                return(Ok(hel.GetTranslationText(val)));

                // return "SuccessEncryptDataModel
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("JobcardControllrExceptions");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "getting error TranslateTextAPI :" + ex.Message.ToString()));
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }
Ejemplo n.º 3
0
        public dynamic Aadharvalidate(dynamic data)
        {
            string jsondata = token_gen.Authorize_aesdecrpty(data);
            //JobCardModel val = JsonConvert.DeserializeObject<JobCardModel>(jsondata);
            dynamic  val       = JsonConvert.DeserializeObject <dynamic>(jsondata);
            LogModel ologmodel = new LogModel();

            try
            {
                JobCardHelper hel = new JobCardHelper();
                //_log.Info("In the PRRDController => Aadharvalidate: " + jsondata.ToString());

                return(Ok(hel.AadharVaiidateAPI(val)));

                // return "SuccessEncryptDataModel
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("JobcardControllerExceptions");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "getting error Aadharvalidate :" + ex.Message.ToString()));
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }