public static void RequestUpdateCMS(string num, string comment) { IMWSUtility wsUtil = new IMWSUtility(); var wSpace = wsUtil.GetWs(num); var mailTo = new List<WsUser>(); mailTo.Add(wSpace.PartnerNManager.Find(x => x.UserType == UserType.Manager)); mailTo.Add(wSpace.PartnerNManager.Find(x => x.UserType == UserType.Partner)); var currentUser = IMUtility2.GetCurrentUser(wsUtil); mailTo.Add(currentUser); IMWrapUtility.SendMail_RequestUpdateCMS(new KMailInfo { KMailType = KMailType.RequestUpdateCMS, EngNum = num, EngName = wSpace.IMProfAttrs.Find(x => (imProfileAttributeIDType)Enum.Parse(typeof(imProfileAttributeIDType), x.Key, true) == imProfileAttributeIDType.imProfileCustom2Description).Value.ToString(), ClientName = wSpace.IMProfAttrs.Find(x => (imProfileAttributeIDType)Enum.Parse(typeof(imProfileAttributeIDType), x.Key, true) == imProfileAttributeIDType.imProfileCustom1Description).Value.ToString(), Reason = comment, To = mailTo.GetToMail(), Requestor = new KeyValuePair<string, string>(currentUser.Name, currentUser.FullName) }); }
private static WSpace GetWs(string num, IMWSUtility wsUtil) { IMWSUtility _wsUtil = wsUtil ?? new IMWSUtility(); return _wsUtil.GetWs(num); }
public static List<WsUser> GetAllUsers(string num, List<imAccessRightType> imAccessRightType) { IMWSUtility wsUtil = new IMWSUtility(); return wsUtil.GetAllUsers(num, imAccessRightType); }
public static WsUser UserAccessLevel(string num) { IMWSUtility wsUtil = new IMWSUtility(); return wsUtil.UserAccessLevel(num); }
public static WSpace GetWs(string num, bool isAdmin = false) { IMWSUtility _wsUtil = new IMWSUtility(isAdmin); return GetWs(num, _wsUtil); }
public static List<WsUser> GetPartnerNManager(string num) { IMWSUtility wsUtil = new IMWSUtility(); return wsUtil.GetPartnerNManager(num); }
public static WsUser GetCurrentUser(IMWSUtility iMWSUtility) { return iMWSUtility.GetWsUser(KConfig.GetCurrentUser, false); }
public CreateWS() { var session = IMSession.GetIManSession(true); var nRTSession = IMSession.GetNRTSession(true); _iMUtil = new IMUtility(session, IMDBType.Active); _nRTUtility = new NRTUtility(nRTSession, IMDBType.Active); _iMWSUtility = new IMWSUtility(_iMUtil); }