コード例 #1
0
ファイル: ModelResponsible.cs プロジェクト: metoer/wpf
        /// <summary>
        /// 发送操作日志
        /// </summary>
        /// <param name="data">操作码</param>
        /// <param name="data">被操作对象,如果没有不传</param>
        public void SendOperationLog(string operateCode, Conditions data = null)
        {
            if (data == null)
            {
                data = new Conditions();
            }

            data.AddItem("StationID", AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationID);
            data.AddItem("StationCode", AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationCode);
            data.AddItem("OperatorGuid", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserGuid);
            data.AddItem("OperatorID", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserID);
            data.AddItem("OperatorName", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserName);
            data.AddItem("OperatorCode", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.UserCode);
            data.AddItem("OperatorOrgID", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgID);
            data.AddItem("OperatorOrgName", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgName);
            data.AddItem("OperatorOrgIDCode", AppConfigInfos.CurrentUserInfos == null ? "" : AppConfigInfos.CurrentUserInfos.OrgIDCode);
            data.AddItem("OpTime", DateTime.Now.ToString("yyyyMMdd HH:mm:ss"));
            data.AddItem("OpType", operateCode);
            data.AddItem("LogID", DateTime.Now.ToString("yyyyMMddHHmmss") + AppConfigInfos.AppStateInfos == null ? "" : AppConfigInfos.AppStateInfos.StationCode + Guid.NewGuid().ToString("N"));

            DataResponsible.SendMsg(MsgType.StationLogContent, data);
        }
コード例 #2
0
ファイル: ModelResponsible.cs プロジェクト: metoer/wpf
 public void SendMessage(MsgType msgType, Conditions data)
 {
     DataResponsible.SendMsg(msgType, data);
 }
コード例 #3
0
ファイル: ModelResponsible.cs プロジェクト: metoer/wpf
 /// <summary>
 /// 发送消息
 /// </summary>
 /// <param name="msgType"></param>
 /// <param name="message"></param>
 public void SendMessage(MsgType msgType, string message)
 {
     DataResponsible.SendMsg(msgType, message);
 }