Exemplo n.º 1
0
        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)
            });
        }
Exemplo n.º 2
0
        private static WSpace GetWs(string num, IMWSUtility wsUtil)
        {
            IMWSUtility _wsUtil = wsUtil ?? new IMWSUtility();

            return _wsUtil.GetWs(num);
        }
Exemplo n.º 3
0
        public static List<WsUser> GetAllUsers(string num, List<imAccessRightType> imAccessRightType)
        {
            IMWSUtility wsUtil = new IMWSUtility();

            return wsUtil.GetAllUsers(num, imAccessRightType);
        }
Exemplo n.º 4
0
        public static WsUser UserAccessLevel(string num)
        {
            IMWSUtility wsUtil = new IMWSUtility();

            return wsUtil.UserAccessLevel(num);
        }
Exemplo n.º 5
0
        public static WSpace GetWs(string num, bool isAdmin = false)
        {
            IMWSUtility _wsUtil = new IMWSUtility(isAdmin);

            return GetWs(num, _wsUtil);
        }
Exemplo n.º 6
0
        public static List<WsUser> GetPartnerNManager(string num)
        {
            IMWSUtility wsUtil = new IMWSUtility();

            return wsUtil.GetPartnerNManager(num);
        }
Exemplo n.º 7
0
 public static WsUser GetCurrentUser(IMWSUtility iMWSUtility)
 {
     return iMWSUtility.GetWsUser(KConfig.GetCurrentUser, false);
 }
Exemplo n.º 8
0
        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);
        }