105 lines
3.0 KiB
C#
105 lines
3.0 KiB
C#
using System.IO;
|
|
using System.Xml;
|
|
|
|
namespace WX.CRM.CRMServices.SMS.InterfaceModel
|
|
{
|
|
public class RuiXinConfig
|
|
{
|
|
string _Assembly = "";
|
|
string _Url = "";
|
|
string _PkgUrl = "";
|
|
string _Account = "";
|
|
string _Password = "";
|
|
|
|
public RuiXinConfig()
|
|
{
|
|
string filename = System.AppDomain.CurrentDomain.BaseDirectory + "XML\\SmsAccountConfig.xml";
|
|
try
|
|
{
|
|
if (File.Exists(filename))
|
|
{
|
|
XmlDocument xDoc = new XmlDocument();
|
|
xDoc.Load(filename);
|
|
XmlNode xNode;
|
|
xNode = xDoc.SelectSingleNode(string.Format("//root//{0}", "RuiXinConfig"));
|
|
if (xNode.Name == "RuiXinConfig")
|
|
{
|
|
XmlNodeList node = xNode.ChildNodes;
|
|
foreach (XmlNode cn in node)
|
|
{
|
|
XmlElement temp = (XmlElement)cn;
|
|
switch (temp.GetAttribute("key"))
|
|
{
|
|
case "Assembly":
|
|
this._Assembly = temp.GetAttribute("value");
|
|
break;
|
|
case "Url":
|
|
this._Url = temp.GetAttribute("value");
|
|
break;
|
|
case "PkgUrl":
|
|
this._PkgUrl = temp.GetAttribute("value");
|
|
break;
|
|
case "Account":
|
|
this._Account = temp.GetAttribute("value");
|
|
break;
|
|
case "Password":
|
|
this._Password = temp.GetAttribute("value");
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
throw;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 程序集
|
|
/// </summary>
|
|
public string Assembly
|
|
{
|
|
get { return _Assembly; }
|
|
set { _Assembly = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 提交URL
|
|
/// </summary>
|
|
public string Url
|
|
{
|
|
get { return _Url; }
|
|
set { _Url = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打包提交Url
|
|
/// </summary>
|
|
public string PkgUrl
|
|
{
|
|
get { return _PkgUrl; }
|
|
set { _PkgUrl = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 帐号
|
|
/// </summary>
|
|
public string Account
|
|
{
|
|
get { return _Account; }
|
|
set { _Account = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 密码
|
|
/// </summary>
|
|
public string Password
|
|
{
|
|
get { return _Password; }
|
|
set { _Password = value; }
|
|
}
|
|
}
|
|
}
|