コード例 #1
0
ファイル: UserMessageDAL.cs プロジェクト: WZDotCMS/WZDotCMS
 /// <summary>
 /// 系统发站内短信给客服
 /// </summary>
 /// <param name="_Title"></param>
 /// <param name="_Content"></param>
 public bool SendServiceMessage(string _Title, string _Content)
 {
     string strXmlFile = HttpContext.Current.Server.MapPath("~/_data/config/message.config");
     JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.XmlControl(strXmlFile);
     string _SendUserId = XmlTool.GetText("Messages/Service/UserId");
     string _ReceiveUserId = XmlTool.GetText("Messages/Service/UserId");
     string _ReceiveUserName = XmlTool.GetText("Messages/Service/UserName");
     XmlTool.Dispose();
     return SendMessage(_Title, _Content, _SendUserId, _ReceiveUserId, _ReceiveUserName);
 }
コード例 #2
0
ファイル: UserDAL.cs プロジェクト: WZDotCMS/WZDotCMS
 /// <summary>
 /// 更新客服列表
 /// </summary>
 public void RefreshServiceList()
 {
     string _serviceids = "";
     string _servicenames = "";
     string _servicemails = "";
     using (DbOperHandler _doh = new Common().Doh())
     {
         _doh.Reset();
         _doh.SqlCmd = "SELECT [ServiceId],[ServiceName],[Email] FROM [jcms_normal_user] WHERE [ServiceId]>0";
         DataTable dt = _doh.GetDataTable();
         for (int j = 0; j < dt.Rows.Count; j++)
         {
             if (j == 0)
             {
                 _serviceids = dt.Rows[j]["ServiceId"].ToString();
                 _servicenames = dt.Rows[j]["ServiceName"].ToString();
                 _servicemails = dt.Rows[j]["Email"].ToString();
             }
             else
             {
                 _serviceids += "," + dt.Rows[j]["ServiceId"].ToString();
                 _servicenames += "," + dt.Rows[j]["ServiceName"].ToString();
                 _servicemails += "," + dt.Rows[j]["Email"].ToString();
             }
         }
         string strXmlFile = HttpContext.Current.Server.MapPath("~/_data/config/message.config");
         JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.XmlControl(strXmlFile);
         XmlTool.Update("Messages/Service/UserId", _serviceids);
         XmlTool.Update("Messages/Service/UserName", _servicenames);
         XmlTool.Update("Messages/Service/UserMail", _servicemails);
         XmlTool.Save();
         XmlTool.Dispose();
     }
 }