public string listFields(string personID, string fieldName)
        {
            string json = "";

            //using (OracleConnection dbConnection = Util.getDBConnection())
            using (OracleConnection dbConnection = new OracleConnection(FacultyDirectoryListItem.getConnectionString()))
            {
                string        str           = "research_dir_user.profile_views.sel_research_view";
                OracleCommand oracleCommand = new OracleCommand();
                oracleCommand.Connection = dbConnection;
                ((DbCommand)oracleCommand).CommandText = str;
                ((DbCommand)oracleCommand).CommandType = CommandType.StoredProcedure;
                oracleCommand.Parameters.Add("p_person_id", OracleDbType.Long, personID, ParameterDirection.Input);
                oracleCommand.Parameters.Add("r_research", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_progs", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_title_depts", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_publications", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_degrees", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_lectures", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_positions", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_specialty", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_memberships", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_awards", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_grants", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_patents", OracleDbType.RefCursor, ParameterDirection.Output);
                OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(oracleCommand);
                ((DbConnection)dbConnection).Open();
                ((DbCommand)oracleCommand).ExecuteNonQuery();
                DataSet dataSet = new DataSet();
                ((DataAdapter)oracleDataAdapter).Fill(dataSet);
                //json = "success!";
                //json = Newtonsoft.Json.JsonConvert.SerializeObject(dataSet, new Newtonsoft.Json.Converters.DataSetConverter());

                var table = dataSet.Tables[0];
                if (table.Rows.Count > 0)
                {
                    json = table.ToString();
                    //json = dataSet.Tables[0].Rows[0][fieldName].ToString();
                }
            }

            return(json);
        }
        public string doTest(string personID, FacultyDirectoryListItem item)
        {
            string json  = "Nothing!!";
            string title = "";

            using (OracleConnection dbConnection = new OracleConnection(FacultyDirectoryListItem.getConnectionString()))
            {
                string        str           = "research_dir_user.profile_views.sel_research_view";
                OracleCommand oracleCommand = new OracleCommand();
                oracleCommand.Connection = dbConnection;
                ((DbCommand)oracleCommand).CommandText = str;
                ((DbCommand)oracleCommand).CommandType = CommandType.StoredProcedure;
                oracleCommand.Parameters.Add("p_person_id", OracleDbType.Long, personID, ParameterDirection.Input);
                oracleCommand.Parameters.Add("r_research", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_progs", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_title_depts", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_publications", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_degrees", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_lectures", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_positions", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_specialty", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_memberships", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_awards", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_grants", OracleDbType.RefCursor, ParameterDirection.Output);
                oracleCommand.Parameters.Add("r_patents", OracleDbType.RefCursor, ParameterDirection.Output);
                OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(oracleCommand);
                ((DbConnection)dbConnection).Open();
                ((DbCommand)oracleCommand).ExecuteNonQuery();
                DataSet dataSet = new DataSet();
                ((DataAdapter)oracleDataAdapter).Fill(dataSet);
                //json = "success!";
                json = Newtonsoft.Json.JsonConvert.SerializeObject(dataSet, new Newtonsoft.Json.Converters.DataSetConverter());

                foreach (DataRow dataRow in (InternalDataCollectionBase)dataSet.Tables[0].Rows)
                {
                    title = dataRow["title"].ToString();

                    //json += "Building = " + dataRow["bldg"].ToString();
                    //json += ", last_login = "******"last_login"].ToString();
                    //json += ", email = " + dataRow["email"].ToString();
                    //json += ", update_date = " + dataRow["update_date"].ToString();
                }

                //var table = dataSet.Tables[0];
                //if (table.Rows.Count > 0)
                //{
                //    json = dataSet.Tables[0].Rows[0][fieldName].ToString();
                //}

                //json = dataSet.Tables[0].Rows[0]["TITLE"].ToString();

                //item.SCItem.Editing.BeginEdit();
                //using (new EditContext(item.SCItem))
                //{
                //    item.SCItem.Fields["Credentials"].Value = title;
                //}
                //item.SCItem.Editing.EndEdit();
            }

            return("");
        }