Example #1
0
 public DataTable GetApplicantStatus(PSSModel oj)
 {
     try
     {
         cmd = new OracleCommand();
         cmd.InitialLONGFetchSize = 1000;
         cmd.CommandType          = CommandType.StoredProcedure;
         cmd.CommandText          = "check_survey_status";
         cmd.Parameters.Add("ftype", OracleDbType.Varchar2, 12).Value  = "2";
         cmd.Parameters.Add("fuid", OracleDbType.Varchar2, 20).Value   = oj.INPUT;
         cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
         DataTable dtstatus = comhel.GetspsDataAdapter(cmd);
         if (dtstatus != null && dtstatus.Rows.Count > 0)
         {
             return(dtstatus);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("PSSExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetApplicantStatus:" + ex.Message.ToString()));
         throw ex;
     }
 }
        public IHttpActionResult GetApplicantStatus(dynamic data)
        {
            string value = token_gen.Authorize_aesdecrpty(data);

            try
            {
                //string value = JsonConvert.SerializeObject(data);
                PSSModel rootobj = JsonConvert.DeserializeObject <PSSModel>(value);
                if (Utils.IsAlphaNumeric(rootobj.INPUT))
                {
                    return(Ok(RTGShel.GetApplicantStatus(rootobj)));
                }
                else
                {
                    dynamic RData = new ExpandoObject();
                    RData.Status = "Failure";
                    RData.Reason = "Special Characters Not Allowed.";
                    return(Ok(RData));
                }
            }
            catch (Exception ex)
            {
                CatchData.Status = "Failure";
                CatchData.Reason = "Error Occured While Getting Data";
                return(Ok(CatchData));
            }
        }
Example #3
0
        public dynamic GetApplicantStatus(PSSModel oj)
        {
            dynamic      obj       = new ExpandoObject();
            RTGSSPHelper RTGSsphel = new RTGSSPHelper();

            try
            {
                DataTable dt = RTGSsphel.GetApplicantStatus(oj);
                if (dt != null && dt.Rows.Count > 0)
                {
                    obj.Status  = "Success";
                    obj.Reason  = "";
                    obj.Details = dt;
                }
                else
                {
                    obj.Status = "Failure";
                    obj.Reason = "No Data Found";
                }
            }
            catch (Exception ex)
            {
                obj.Status = "Failure";
                obj.Reason = "Error Occured While Getting Data";
            }
            return(obj);
        }