コード例 #1
0
        public IHttpActionResult GetValunteerDetails(dynamic data)
        {
            string  value = token_gen.Authorize_aesdecrpty(data);
            dynamic obj   = new ExpandoObject();

            try
            {
                //string value = JsonConvert.SerializeObject(data);
                VolunteerCls rootobj = JsonConvert.DeserializeObject <VolunteerCls>(value);
                if (Utils.IsAlphaNumeric(rootobj.fuid_num) && Utils.IsAlphaNumeric(rootobj.fvv_id))
                {
                    return(Ok(hlpval.GetValunteerMapping_helper(rootobj)));
                }
                else
                {
                    dynamic RData = new ExpandoObject();
                    RData.Status = 102;
                    RData.Reason = "Special Characters are Not Allowed.";
                    return(Ok(RData));
                }
            }
            catch (Exception ex)
            {
                obj.Status = 102;
                obj.Reason = "Error Occured While Getting Volunteer Data";

                return(Ok(obj));
            }
        }
コード例 #2
0
        public DataTable GetValunteerMapping_data_helper(VolunteerCls obj)
        {
            try
            {
                var comd = new OracleCommand();

                comd.InitialLONGFetchSize = 1000;
                comd.CommandType          = CommandType.StoredProcedure;
                comd.CommandText          = "youth_service.vv_id_details_updations_proc";
                comd.Parameters.Add("ftype", OracleDbType.Varchar2).Value      = obj.ftype;
                comd.Parameters.Add("fuid_num", OracleDbType.Varchar2).Value   = obj.fuid_num;
                comd.Parameters.Add("fvv_id", OracleDbType.Varchar2).Value     = obj.fvv_id;
                comd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output;

                DataTable data = GetspsDataAdapter(comd);
                if (data != null && data.Rows.Count > 0)
                {
                    return(data);
                }
                else
                {
                    return(null);
                }
            }
            catch (WebException wex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("VolunteerMappingExceptionLogs");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "Error Getting Volunteer Mapping Data API:" + wex.Message.ToString()));
                throw wex;
            }
        }
コード例 #3
0
        public dynamic GetValunteerMapping_helper(VolunteerCls root)
        {
            dynamic      obj   = new ExpandoObject();
            PRRDSPHelper spobj = new PRRDSPHelper();

            try
            {
                DataTable data = spobj.GetValunteerMapping_data_helper(root);
                if (data != null)
                {
                    obj.Status  = 100;
                    obj.Reason  = "Data Loaded Successfully.";
                    obj.Details = data;
                }
                else
                {
                    obj.Status = 102;
                    obj.Reason = "No Data Found";
                }
            }
            catch (Exception ex)
            {
                obj.Status = 102;
                obj.Reason = "Error Occured While Getting Volunteer Data";
            }

            return(obj);
        }