Пример #1
0
        /// <summary>
        /// 确认去审按钮事件
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public string ConfirmApplyCheck(string _ucode, string _ocode, string _logid, string _ccode, string paramvalue, string msgdescription, DateTime sortdate, string receiver, string sender, string targetcboo, out string msg)
        {
            try
            {
                _ucode = _ucode == "" ? NG3.AppInfoBase.UCode : _ucode;
                _ocode = _ocode == "" ? NG3.AppInfoBase.OCode : _ocode;
                _logid = _logid == "" ? NG3.AppInfoBase.LoginID : _logid;
                _ccode = _ccode == "" ? System.Guid.NewGuid().ToString() : _ccode;
                sender = sender == "" ? NG3.AppInfoBase.UserID.ToString() : sender;
                BusinessDataPushService businessPush = new BusinessDataPushService();
                bool success = true;
                int  rows    = this.GetBusData(paramvalue, receiver);
                if (rows > 0)
                {
                    success = false;
                    msg     = "当前单据已经申请去审,请勿重复申请";
                }
                else
                {
                    msg = "";
                    if (!businessPush.BusinessInsertData(_ucode, _ocode, _logid, _ccode, paramvalue, msgdescription, "DMC", "ApplyCheck", DateTime.Now, receiver, sender, targetcboo))
                    {
                        success = false;
                        msg     = "申请去审失败";
                    }
                    else
                    {
                        DesktopPortalRefreshNotice notice = new DesktopPortalRefreshNotice();

                        DataTable timeTriggerDt = MessageTimeManager.GetTimeTriggerObjectDt();

                        DataRow timeTriggerDr = timeTriggerDt.NewRow();
                        timeTriggerDr["uid"]   = receiver;// i6SessionInfo.AppInfo.UserID;    //_logid;
                        timeTriggerDr["utype"] = ReceiverType.Type_Ope;
                        timeTriggerDt.Rows.Add(timeTriggerDr);

                        notice.NoticeDesktopRefreshMsg(NG3.AppInfoBase.UserConnectString, _logid, i6.Biz.PortalType.Portal_BusinessAlert, timeTriggerDt);
                    }
                }

                return("{\"success\":\"" + success + "\",\"msg\":\"" + msg + "\"}");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Пример #2
0
 public void KillOnlineUser(string IpAddress, string Devicetype, string UserId, string SessionID)
 {
     if (Devicetype == "1")
     {
         //发送桌面消息推送,用于Web版强制下线登录用户
         DesktopPortalRefreshNotice notice = new DesktopPortalRefreshNotice();
         string    logoutMessage           = "当前登录被强制注销,点击确定后将取消当前登录!";
         DataTable receiverDt = i6.Biz.MessageTimeManager.GetTimeTriggerObjectDt();
         receiverDt.TableName = "receiver";
         receiverDt.Rows.Add();
         receiverDt.Rows[0]["uid"]   = UserId;
         receiverDt.Rows[0]["utype"] = i6.Biz.ReceiverType.Type_Ope;
         notice.NoticeDesktopRefreshMsg("SYSTEM", "KillLoginUser", receiverDt, logoutMessage);
     }
     else
     {
         new WinLoginService().KillLoginUser(SessionID);
     }
 }