예제 #1
0
 public static DataTable PensionVolunteerMappingProc(pensionModel obj)
 {
     try
     {
         OracleCommand cmd = new OracleCommand();
         cmd.InitialLONGFetchSize = 1000;
         cmd.CommandType          = CommandType.StoredProcedure;
         cmd.CommandText          = "GSWS_PENSION_VV_MAPPING_PROC";
         cmd.Parameters.Add("ptype", OracleDbType.Varchar2).Value         = obj.type;
         cmd.Parameters.Add("psec_id", OracleDbType.Varchar2).Value       = obj.gsws_code;
         cmd.Parameters.Add("pPENSIONID", OracleDbType.Varchar2).Value    = obj.pension_id;
         cmd.Parameters.Add("pvv_id", OracleDbType.Varchar2).Value        = obj.vv_id;
         cmd.Parameters.Add("pUPDATED_ON", OracleDbType.TimeStamp).Value  = DateTime.Now;
         cmd.Parameters.Add("pUPDATED_BY", OracleDbType.Varchar2).Value   = obj.updated_by;
         cmd.Parameters.Add("pvv_name", OracleDbType.Varchar2).Value      = obj.vv_name;
         cmd.Parameters.Add("pCLUSTER_ID", OracleDbType.Varchar2).Value   = obj.cluster_id;
         cmd.Parameters.Add("pCLUSTER_NAME", OracleDbType.Varchar2).Value = obj.cluster_name;
         cmd.Parameters.Add("pcur", OracleDbType.RefCursor).Direction     = ParameterDirection.Output;
         DataTable dt = _Hel.GetyouthserviceDataAdapter(cmd);//db.executeProcedure(cmd, oradb_youth_service);
         return(dt);
     }
     catch (Exception ex)
     {
         string mappath         = HttpContext.Current.Server.MapPath("pensionVolunteerMappingProcedure");
         string serialized_data = JsonConvert.SerializeObject(obj);
         Task   WriteTask       = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, serialized_data));
         throw ex;
     }
 }
예제 #2
0
        public IHttpActionResult loadClusters(dynamic data)
        {
            pensionHelper _Hel    = new pensionHelper();
            dynamic       objdata = new ExpandoObject();

            try
            {
                string       value   = token_gen.Authorize_aesdecrpty(data);
                pensionModel rootobj = JsonConvert.DeserializeObject <pensionModel>(value);
                return(Ok(_Hel.loadClusters(rootobj)));
            }

            catch (Exception ex)
            {
                objdata.status = 500;
                objdata.result = "Session Expired !!! Please login again to continue...";
                return(Ok(objdata));
            }
        }