Beispiel #1
0
 public StandardResult RegisterComAcc(string account, PubAccountType acctype)
 {
     if (string.IsNullOrEmpty(account)) return Result(iTripExceptionCode.Error_Null_Account);
     IPubAccount ipubaccount = new PubAccount();
         IRecipientRegistration registration = GetService<IRecipientRegistration>();
     StandardResult result;
     switch (acctype)
     {
         case PubAccountType.Group:
             result = ipubaccount.RegisterGroup(account);
             break;
         case PubAccountType.Publisher:
             result = ipubaccount.RegisterPublisher(account);
             break;
         case PubAccountType.Community:
             result = ipubaccount.RegisterCommunity(account);
             break;
         case PubAccountType.Organization:
             result = ipubaccount.RegisterOrganization(account);
             break;
         default:
             result = Result(iTripExceptionCode.Error_UnKnown);
             break;
     }
     //if (result.Ret)
     //{
     //    registration.RegisterGroup
     //}
     return result;
 }
Beispiel #2
0
        public StandardResult RegisterComAcc(string account, PubAccountType acctype)
        {
            if (string.IsNullOrEmpty(account))
            {
                return(Result(iTripExceptionCode.Error_Null_Account));
            }
            IPubAccount            ipubaccount  = new PubAccount();
            IRecipientRegistration registration = GetService <IRecipientRegistration>();
            StandardResult         result;

            switch (acctype)
            {
            case PubAccountType.Group:
                result = ipubaccount.RegisterGroup(account);
                break;

            case PubAccountType.Publisher:
                result = ipubaccount.RegisterPublisher(account);
                break;

            case PubAccountType.Community:
                result = ipubaccount.RegisterCommunity(account);
                break;

            case PubAccountType.Organization:
                result = ipubaccount.RegisterOrganization(account);
                break;

            default:
                result = Result(iTripExceptionCode.Error_UnKnown);
                break;
            }
            //if (result.Ret)
            //{
            //    registration.RegisterGroup
            //}
            return(result);
        }