FlexFieldGet() public method

get the Flexfield.
public FlexFieldGet ( ) : DataTable
return System.Data.DataTable
コード例 #1
0
ファイル: AtulBusinessLogic.cs プロジェクト: godaddy/ATUL
 /// <summary>
 /// get the Flexfield.
 /// </summary>
 /// <returns></returns>
 public string FlexFieldGet()
 {
     DataTable returnTable = new DataTable();
     Atul_v1Data adb = new Atul_v1Data();
     returnTable = adb.FlexFieldGet();
     return JsonMethods.GetJSONString(returnTable);
 }
コード例 #2
0
ファイル: AtulBusinessLogic.cs プロジェクト: godaddy/ATUL
        public string GetProviderParameters(long providerId, string ProviderVerb)
        {
            //get the provider XML
            DataTable returnTable = new DataTable();
            DataTable flexfields = new DataTable();
            Atul_v1Data adb = new Atul_v1Data();
            returnTable = adb.ServiceProviderGetByID(providerId);
            flexfields = adb.FlexFieldGet();
            string ProviderXML = returnTable.Rows[0]["ServiceProviderXML"].ToString();
            string ProviderName = returnTable.Rows[0]["ServiceProviderName"].ToString();

            string JSON = string.Empty;
            XmlDocument pxml = new XmlDocument();
            pxml.LoadXml(ProviderXML);
            XmlNodeList parameters = pxml.SelectNodes("//verb[name='"+ProviderVerb+"']/parameter");
            XmlDocument xdoc = new XmlDocument();
            xdoc.LoadXml(@"<parameters></parameters>");

            foreach (XmlNode p in parameters)
            {
                XmlElement e = xdoc.CreateElement("parameter");
                e.InnerText = p.InnerText;
                xdoc.AppendChild(e);
            }

            JSON = JsonMethods.XmlToJSON(xdoc);

            return JSON;
        }