Beispiel #1
0
        private static COPXmlFactory.RTTIE010.ACCTTEMPLATE __RTTIE010_F_U(COPXmlFactory.RTTIE010.ACCTTEMPLATE e)
        {
            RTTIE010_SrvRef.TT010E00_EMI  _EMI     = new RTTIE010_SrvRef.TT010E00_EMI();
            RTTIE010_SrvRef.TT010E00_ENA1 _ENA1    = new RTTIE010_SrvRef.TT010E00_ENA1();
            RTTIE010_SrvRef.TT010E00_ENA2 _ENA2    = new RTTIE010_SrvRef.TT010E00_ENA2();
            RTTIE010_SrvRef.TT010E00_ETA  _ETA     = new RTTIE010_SrvRef.TT010E00_ETA();
            RTTIE010_SrvRef.TT010E00_ECHK _ECHK    = new RTTIE010_SrvRef.TT010E00_ECHK();
            RTTIE010_SrvRef.TT010E00      rttie010 = new RTTIE010_SrvRef.TT010E00();

            RTTIE010_SrvRef.TT010E00Response_SMA  _SMAResponse  = new RTTIE010_SrvRef.TT010E00Response_SMA();
            RTTIE010_SrvRef.TT010E00Response_EMI  _EMIResponse  = new RTTIE010_SrvRef.TT010E00Response_EMI();
            RTTIE010_SrvRef.TT010E00Response_ETA  _ETAResponse  = new RTTIE010_SrvRef.TT010E00Response_ETA();
            RTTIE010_SrvRef.TT010E00Response_ECHK _ECHKResponse = new RTTIE010_SrvRef.TT010E00Response_ECHK();
            RTTIE010_SrvRef.TT010E00Response_ENA1 _ENA1Response = new RTTIE010_SrvRef.TT010E00Response_ENA1();
            RTTIE010_SrvRef.TT010E00Response_ENA2 _ENA2Response = new RTTIE010_SrvRef.TT010E00Response_ENA2();

            _EMI._ENTITYMASTERINFO                   = new RTTIE010_SrvRef.TT010E00_EMI_ENTITYMASTERINFO();
            _EMI._ENTITYMASTERINFO.ENTITYID          = e.ENTITY_INFO.ENTITY_ID;
            _EMI._ENTITYMASTERINFO.FUNCTIONCODE      = e.ENTITY_INFO.FUNCTION_CODE;
            _EMI._ENTITYMASTERINFO.ACCOUNTID         = e.ENTITY_INFO.ACCOUNT_ID;
            _EMI._ENTITYMASTERINFO.PINNUMBER         = CopMvcUtil.GetDecimal(e.ENTITY_INFO.PIN);
            _EMI._ENTITYMASTERINFO.ENTITYTYPE        = CopMvcUtil.GetDecimal(e.ENTITY_INFO.TYPE);
            _EMI._ENTITYMASTERINFO.NAICFEDERALCODE   = CopMvcUtil.GetDecimal(e.ENTITY_INFO.NAIC_CODE);
            _EMI._ENTITYMASTERINFO.SICFEDERALCODE    = CopMvcUtil.GetDecimal(e.ENTITY_INFO.SIC_CODE);
            _EMI._ENTITYMASTERINFO.BUSINESSSTARTDATE = CopMvcUtil.ConvDateToDecimal(e.ENTITY_INFO.START_DATE);// changed method
            _EMI._ENTITYMASTERINFO.ORGANIZATIONTYPE  = CopMvcUtil.GetDecimal(e.ENTITY_INFO.ORGTYPE);

            //Error fixed by SumanG-----Error code no-15
            _EMI._ENTITYMASTERINFO.BUSINESSORIGIN = CopMvcUtil.GetDecimal(e.ENTITY_INFO.ORIGIN);
            //Code End


            _EMI._ENTITYMASTERINFO.BUSINESSGENDER = CopMvcUtil.GetString(e.ENTITY_INFO.GENDER);
            _EMI._ENTITYMASTERINFO.BUSINESSOTHER  = CopMvcUtil.GetString(e.ENTITY_INFO.OTHER);
            _EMI._ENTITYMASTERINFO.PINSWITCH      = CopMvcUtil.GetString(e.ENTITY_INFO.FORCEPINCHG);

            _EMI._ENTITYMASTERINFO.PINNUMBERSpecified = true;

            _EMI._ENTITYMASTERINFO.NAICFEDERALCODESpecified   = true;
            _EMI._ENTITYMASTERINFO.SICFEDERALCODESpecified    = true;
            _EMI._ENTITYMASTERINFO.BUSINESSSTARTDATESpecified = true;
            _EMI._ENTITYMASTERINFO.ORGANIZATIONTYPESpecified  = true;
            _EMI._ENTITYMASTERINFO.BUSINESSORIGINSpecified    = true;
            _EMI._ENTITYMASTERINFO.ENTITYTYPESpecified        = true;



            if (e.NAME_ADDRESS.Count > 0)
            {
                //e.NAME_ADDRESS.Count
                int r = 0;

                for (int s = 0; s < e.NAME_ADDRESS.Count; s++)
                {
                    if (e.NAME_ADDRESS[s].ID.Value != null)
                    {
                        r++;
                    }
                }

                if (r > 0)
                {
                    _ENA1._NAMADDR1s = new RTTIE010_SrvRef.TT010E00_ENA1_NAMADDR1[r];
                    _ENA2._NAMADDR2s = new RTTIE010_SrvRef.TT010E00_ENA2_NAMADDR2[r];
                }

                r = 0;
                for (int i = 0; i < e.NAME_ADDRESS.Count; i++)
                {
                    if (e.NAME_ADDRESS[i].ID.Value != null)
                    {
                        // ENA 1


                        _ENA1._NAMADDR1s[r] = new RTTIE010_SrvRef.TT010E00_ENA1_NAMADDR1();
                        _ENA1._NAMADDR1s[r].FUNCTIONCODE              = CopMvcUtil.GetString(e.NAME_ADDRESS[i].FUNCTION_CODE);
                        _ENA1._NAMADDR1s[r].ENTITYTYPE                = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].TYPE);
                        _ENA1._NAMADDR1s[r].ENTITYID                  = CopMvcUtil.GetString(e.NAME_ADDRESS[i].ID);
                        _ENA1._NAMADDR1s[r].ENTITYNAME                = CopMvcUtil.GetString(e.NAME_ADDRESS[i].NAME);
                        _ENA1._NAMADDR1s[r].TRADENAME                 = CopMvcUtil.GetString(e.NAME_ADDRESS[i].TRADE_NAME);
                        _ENA1._NAMADDR1s[r].ADDRESSTYPE               = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].ADDRESS_TYPE);
                        _ENA1._NAMADDR1s[r].RELATIONSHIPCODE          = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].RELATIONSHIP_CODE);
                        _ENA1._NAMADDR1s[r].ADDRESSTYPESpecified      = true;
                        _ENA1._NAMADDR1s[r].ENTITYTYPESpecified       = true;
                        _ENA1._NAMADDR1s[r].RELATIONSHIPCODESpecified = true;


                        // ENA 2

                        _ENA2._NAMADDR2s[r]              = new RTTIE010_SrvRef.TT010E00_ENA2_NAMADDR2();
                        _ENA2._NAMADDR2s[r].ATTENTION    = CopMvcUtil.GetString(e.NAME_ADDRESS[i].ATTENTION);
                        _ENA2._NAMADDR2s[r].ADDRESSLINE1 = CopMvcUtil.GetString(e.NAME_ADDRESS[i].ADDRESS1);
                        _ENA2._NAMADDR2s[r].ADDRESSLINE2 = CopMvcUtil.GetString(e.NAME_ADDRESS[i].ADDRESS2);

                        _ENA2._NAMADDR2s[r].CITY    = CopMvcUtil.GetString(e.NAME_ADDRESS[i].CITY);
                        _ENA2._NAMADDR2s[r].STATE   = CopMvcUtil.GetString(e.NAME_ADDRESS[i].STATE);
                        _ENA2._NAMADDR2s[r].ZIPCODE = CopMvcUtil.GetString(e.NAME_ADDRESS[i].ZIP);

                        _ENA2._NAMADDR2s[r].BUSINESSPHONENUMBER = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].WORK_PHONE);

                        _ENA2._NAMADDR2s[r].BUSINESSPHONEEXTENSION = CopMvcUtil.GetString(e.NAME_ADDRESS[i].WORK_PHONE_EXT);

                        _ENA2._NAMADDR2s[r].BUSINESSFAX = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].WORK_FAX);

                        _ENA2._NAMADDR2s[r].OTHERPHONENUMBER = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].OTHER_PHONE);

                        _ENA2._NAMADDR2s[r].EMAILADDR = CopMvcUtil.GetString(e.NAME_ADDRESS[i].EMAIL);

                        _ENA2._NAMADDR2s[r].TIADRSEQUENCENUMBER = CopMvcUtil.GetDecimal(e.NAME_ADDRESS[i].TRACE_NUMBER);

                        _ENA2._NAMADDR2s[r].BUSINESSPHONENUMBERSpecified = true;
                        _ENA2._NAMADDR2s[r].OTHERPHONENUMBERSpecified    = true;
                        _ENA2._NAMADDR2s[r].BUSINESSFAXSpecified         = true;
                        _ENA2._NAMADDR2s[r].TIADRSEQUENCENUMBERSpecified = true;

                        r++;
                    }
                }
            }

            //LOAD TAX ACCT s
            if (e.TAX_ACCT.Count > 0)
            {
                _ETA._ENTITYTAXACCOUNTSs = new RTTIE010_SrvRef.TT010E00_ETA_ENTITYTAXACCOUNTS[e.TAX_ACCT.Count];

                for (int i = 0; i < e.TAX_ACCT.Count; i++)
                {
                    _ETA._ENTITYTAXACCOUNTSs[i] = new RTTIE010_SrvRef.TT010E00_ETA_ENTITYTAXACCOUNTS();

                    _ETA._ENTITYTAXACCOUNTSs[i].FUNCTIONCODE = CopMvcUtil.GetString(e.TAX_ACCT[i].FUNCTION_CODE);


                    _ETA._ENTITYTAXACCOUNTSs[i].ACCOUNT = CopMvcUtil.GetDecimal(e.TAX_ACCT[i].ACCOUNT);

                    _ETA._ENTITYTAXACCOUNTSs[i].STARTDATE = CopMvcUtil.ConvDateToDecimal(e.TAX_ACCT[i].START_DATE); //change the method

                    _ETA._ENTITYTAXACCOUNTSs[i].WAGMONTHLYGROSS = CopMvcUtil.GetString(e.TAX_ACCT[i].WAGE_MONTHLY_GROSS);

                    _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION = new RTTIE010_SrvRef.TT010E00_ETA_ENTITYTAXACCOUNTSBPTNEWAPPLICATION();


                    if (e.TAX_ACCT[i].UOL_BRT != null)
                    {
                        if (e.TAX_ACCT[i].UOL_BRT.Value != null)
                        {
                            if (e.TAX_ACCT[i].UOL_BRT.ToString().Substring(0, 1) == "Y")
                            {
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAAPPLYFOREXEMPTION = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(0, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAREACTIVATING      = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(1, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAAFFILIATED        = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(2, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNANEWOWNER          = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(3, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAREALESTATE        = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(4, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNACOMPLYYEAR1       = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(5, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNACOMPLYYEAR2       = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(6, 1);
                                _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAACCEPTED          = e.TAX_ACCT[i].UOL_BRT.ToString().Substring(7, 1);
                            }
                        }
                        _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNASTATUS = CopMvcUtil.GetString(e.TAX_ACCT[i].UOL_BRT);
                    }
                    else
                    {
                        _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNASTATUS = CopMvcUtil.GetString(e.TAX_ACCT[i].UOL_BRT);
                    }

                    _ETA._ENTITYTAXACCOUNTSs[i].PRKID = CopMvcUtil.GetString(e.TAX_ACCT[i].PRK_ID);


                    _ETA._ENTITYTAXACCOUNTSs[i].ACCOUNTSpecified   = true;
                    _ETA._ENTITYTAXACCOUNTSs[i].STARTDATESpecified = true;
                }
            }


            _ECHK._ECHECK = new RTTIE010_SrvRef.TT010E00_ECHK_ECHECK();

            _ECHK._ECHECK.FUNCTIONCODE         = CopMvcUtil.GetString(e.ECHECK.FUNCTION_CODE);
            _ECHK._ECHECK.TRANSITROUTINGNUMBER = CopMvcUtil.GetString(e.ECHECK.ROUTING_NUMBER);
            _ECHK._ECHECK.BANKACCOUNTNUMBER    = CopMvcUtil.GetString(e.ECHECK.ACCOUNT_NUMBER);
            _ECHK._ECHECK.BANKACCOUNTTYPE      = CopMvcUtil.GetString(e.ECHECK.ACCOUNT_TYPE);

            string emi  = CopMvcUtil.GetXMlFromObject(_EMI);
            string eta  = CopMvcUtil.GetXMlFromObject(_ETA);
            string echk = CopMvcUtil.GetXMlFromObject(_ECHK);
            string ena  = CopMvcUtil.GetXMlFromObject(_ENA1);
            string ena2 = CopMvcUtil.GetXMlFromObject(_ENA2);


            _SMAResponse = rttie010.CallTT010E00 // calling the  service for Update/Registration...
                               (_EMI, _ETA, _ECHK, _ENA1, _ENA2, out _EMIResponse, out _ETAResponse,
                               out _ECHKResponse,
                               out _ENA1Response,
                               out _ENA2Response
                               );

            //Assigning the reponse to the tempalte...

            e = __Fill(_SMAResponse, _EMIResponse, _ENA1Response, _ENA2Response, _ETAResponse, _ECHKResponse);

            return(e);
        }