コード例 #1
0
ファイル: HeaderBuilder.cs プロジェクト: umair-me/gail
        public override void SetSenderDetails()
        {
            GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication Authentication = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication();

            switch (ReferenceDataManager.Settings["SenderAuthenticationMethod"])
            {
            case "MD5":
                Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.MD5;
                break;

            case "clear":
                Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.clear;
                break;

            case "W3Csigned":
                Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.W3Csigned;
                break;
            }
            Authentication.Role = ReferenceDataManager.Settings["SenderAuthenticationRole"];
            Authentication.Item = ReferenceDataManager.Settings["SenderAuthenticationValue"];

            GovTalkMessageHeaderSenderDetailsIDAuthentication IDAuthentication = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthentication();

            IDAuthentication.SenderID = ReferenceDataManager.Settings["SenderID"];

            GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication[] Authentications = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication[1];
            Authentications[0] = Authentication;
            IDAuthentication.Authentication = Authentications;

            GovTalkMessageHeaderSenderDetails SenderDetails = new hmrcclasses.GovTalkMessageHeaderSenderDetails();

            SenderDetails.IDAuthentication = IDAuthentication;

            Header.SenderDetails = SenderDetails;
        }
コード例 #2
0
ファイル: HeaderBuilder.cs プロジェクト: LalithaSharma/gail
        public override void SetSenderDetails()
        {
            hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication Authentication = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication();
            switch (ReferenceDataManager.Settings["SenderAuthenticationMethod"])
            {
                case "MD5":
                    Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.MD5;
                    break;
                case "clear":
                    Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.clear;
                    break;
                case "W3Csigned":
                    Authentication.Method = hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthenticationMethod.W3Csigned;
                    break;
            }
            Authentication.Role = ReferenceDataManager.Settings["SenderAuthenticationRole"];
            Authentication.Item = ReferenceDataManager.Settings["SenderAuthenticationValue"];

            GovTalkMessageHeaderSenderDetailsIDAuthentication IDAuthentication = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthentication();
            IDAuthentication.SenderID = ReferenceDataManager.Settings["SenderID"];

            GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication[] Authentications = new hmrcclasses.GovTalkMessageHeaderSenderDetailsIDAuthenticationAuthentication[1];
            Authentications[0] = Authentication;
            IDAuthentication.Authentication = Authentications;

            GovTalkMessageHeaderSenderDetails SenderDetails = new hmrcclasses.GovTalkMessageHeaderSenderDetails();
            SenderDetails.IDAuthentication = IDAuthentication;

            Header.SenderDetails = SenderDetails;
        }