public void Clear(ReconCOM rc, string userName) { //rc.CS_Login(userName, userName); //add by lihf 2014-2-18 rc.CS_Login(LoginUser.AgentNum, LoginUser.AgentNum); AgentLogOff(rc, userName); rc.CS_Logout(); }
public void AllClear(ReconCOM rc, string userName) { string msg = string.Empty; VCLogServiceHelper.Instance.StopRecord(userName, string.Empty, ref msg); VCLogServiceHelper.Instance.AgentLogout(userName, ref msg); //rc.T_AgentLogOff(userName, userName); int iRet = 0; //rc.CS_Login(userName, userName); AgentLogOff(rc, userName); iRet = rc.CS_Logout(); Loger.Log4Net.Info("[CarolHelper]AllClear...rc.CS_Logout()...iRet is:" + iRet); rc.R_Close(); }
public bool execute(ReconCOM rc, String[] argv) { try { int iRet; iRet = rc.CS_Logout(); if (iRet == (int)enErrorCode.E_SUCCESS) { return(true); } System.Console.WriteLine(); System.Console.WriteLine((enErrorCode)iRet); return(false); } catch (Exception ex) { System.Console.WriteLine("Exception: ", ex + " - " + ex.Message); return(false); } }
public int Login(ReconCOM rc, string username, bool IsBindRecord) { Loger.Log4Net.Info("[CarolHelper]Login(ReconCOM rc, string username, bool IsBindRecord) begin..."); string msg = string.Empty; int iRet = -1; try { //iRet = rc.CS_Login(username, username); //add by lihf 2014-2-18 iRet = rc.CS_Login(LoginUser.AgentNum, LoginUser.AgentNum); if (iRet == (int)enErrorCode.E_SUCCESS) { Loger.Log4Net.Info("[CarolHelper]Login->rc.CS_Login(username, username)...E_SUCCESS..."); iRet = rc.T_StartMonitor(username, 1); if (iRet == (int)enErrorCode.E_SUCCESS) { //iRet = rc.T_AgentLogOn(username, username, username, 0); iRet = AgentLogOn(rc, username, ""); if (iRet == (int)enErrorCode.E_SUCCESS) { if (IsBindRecord) { if (VCLogServiceHelper.Instance.AgentLogin(username, username, ref msg) && VCLogServiceHelper.Instance.StartRecord(username, string.Empty, ref msg)) { iRet = (int)enErrorCode.E_SUCCESS; } else { iRet = -1;//宇高录音登录失败 //rc.T_AgentLogOff(username, username); //add by lihf 2014-2-18 rc.T_AgentLogOff(username, LoginUser.AgentNum); rc.CS_Logout(); //rc.R_Close(); } } } else { Loger.Log4Net.Info("[CarolHelper]Login->rc.CS_Login-AgentLogOn...失败...iRet is:" + iRet); rc.CS_Logout(); } } else { Loger.Log4Net.Info("[CarolHelper]Login->rc.CS_Login-T_StartMonitor(username, 1)...失败...iRet is:" + iRet); rc.CS_Logout(); } } else { Loger.Log4Net.Info("[CarolHelper]Login->rc.CS_Login(username, username)...NOTSUCCESS...iRET IS:" + iRet); } //System.Console.WriteLine(); //System.Console.WriteLine((enErrorCode)iRet); return(iRet); } catch (Exception ex) { System.Console.WriteLine("Exception: ", ex + " - " + ex.Message); Loger.Log4Net.Info("[CarolHelper]Login...errorMessage is:" + ex.Message); Loger.Log4Net.Info("[CarolHelper]Login...errorSource is:" + ex.Source); Loger.Log4Net.Info("[CarolHelper]Login...errorStackTrace is:" + ex.StackTrace); } return(iRet); }