Example #1
0
        private static COPXmlFactory.RTTIE010.ACCTTEMPLATE __Fill(RTTIE010_SrvRef.TT010E00Response_SMA _SMA, RTTIE010_SrvRef.TT010E00Response_EMI _EMI, RTTIE010_SrvRef.TT010E00Response_ENA1 _ENA1, RTTIE010_SrvRef.TT010E00Response_ENA2 _ENA2, RTTIE010_SrvRef.TT010E00Response_ETA _ETA, RTTIE010_SrvRef.TT010E00Response_ECHK _ECHK)
        {
            COPXmlFactory.RTTIE010.ACCTTEMPLATE fobj = RevenueGovXMLFactory.GetAcctTemplate();

            //LOAD ERRORS INTO OBJECT
            fobj.ERROR_INFO = new ERROR_INFO();
            if (_SMA._SYSTEMMESSAGEAREA != null)
            {
                fobj.ERROR_INFO.PROGRAM = _SMA._SYSTEMMESSAGEAREA._PROGRAM;
                fobj.ERROR_INFO.LINE    = _SMA._SYSTEMMESSAGEAREA.LINE.ToString();
                fobj.ERROR_INFO.MESSAGE = _SMA._SYSTEMMESSAGEAREA.MESSAGE;
                fobj.ERROR_INFO.ERROR   = _SMA._SYSTEMMESSAGEAREA.ERROR.ToString();
            }



            //LOAD ENTITY INFOS
            fobj.ENTITY_INFO = new ENTITY_INFO();
            fobj.ENTITY_INFO.FUNCTION_CODE = _EMI._ENTITYMASTERINFO.FUNCTIONCODE;
            fobj.ENTITY_INFO.TYPE          = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.ENTITYTYPE);
            fobj.ENTITY_INFO.ENTITY_ID     = _EMI._ENTITYMASTERINFO.ENTITYID;
            fobj.ENTITY_INFO.ACCOUNT_ID    = _EMI._ENTITYMASTERINFO.ACCOUNTID;
            fobj.ENTITY_INFO.NAIC_CODE     = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.NAICFEDERALCODE);
            fobj.ENTITY_INFO.SIC_CODE      = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.SICFEDERALCODE);
            fobj.ENTITY_INFO.START_DATE    = CopMvcUtil.ConvDate(_EMI._ENTITYMASTERINFO.BUSINESSSTARTDATE);



            fobj.ENTITY_INFO.ORGTYPE     = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.ORGANIZATIONTYPE);
            fobj.ENTITY_INFO.ORIGIN      = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.BUSINESSORIGIN);
            fobj.ENTITY_INFO.GENDER      = _EMI._ENTITYMASTERINFO.BUSINESSGENDER;
            fobj.ENTITY_INFO.OTHER       = _EMI._ENTITYMASTERINFO.BUSINESSOTHER;
            fobj.ENTITY_INFO.PIN         = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.PINNUMBER);
            fobj.ENTITY_INFO.FORCEPINCHG = CopMvcUtil.GetString(_EMI._ENTITYMASTERINFO.PINSWITCH);



            fobj.NAME_ADDRESS = new List <NAME_ADDRESS>();

            if (_ENA1._NAMADDR1s != null)
            {
                for (int i = 0; i < _ENA1._NAMADDR1s.Length; i++)
                {
                    //ENA1 section
                    fobj.NAME_ADDRESS.Add(RevenueGovXMLFactory.GetAcctTemplate_NAME_ADDRESS());
                    fobj.NAME_ADDRESS[i].FUNCTION_CODE     = _ENA1._NAMADDR1s[i].FUNCTIONCODE;
                    fobj.NAME_ADDRESS[i].TYPE              = CopMvcUtil.GetString(_ENA1._NAMADDR1s[i].ENTITYTYPE);
                    fobj.NAME_ADDRESS[i].ID                = _ENA1._NAMADDR1s[i].ENTITYID;
                    fobj.NAME_ADDRESS[i].NAME              = _ENA1._NAMADDR1s[i].ENTITYNAME;
                    fobj.NAME_ADDRESS[i].TRADE_NAME        = _ENA1._NAMADDR1s[i].TRADENAME;
                    fobj.NAME_ADDRESS[i].ADDRESS_TYPE      = CopMvcUtil.GetString(_ENA1._NAMADDR1s[i].ADDRESSTYPE);
                    fobj.NAME_ADDRESS[i].RELATIONSHIP_CODE = CopMvcUtil.GetString(_ENA1._NAMADDR1s[i].RELATIONSHIPCODE);
                }
            }


            if (_ENA2._NAMADDR2s != null)
            {
                //ENA2 section
                for (int i = 0; i < _ENA2._NAMADDR2s.Length; i++)
                {
                    if (_ENA2._NAMADDR2s[i].ATTENTION != null)
                    {
                        fobj.NAME_ADDRESS[i].ATTENTION = _ENA2._NAMADDR2s[i].ATTENTION;
                    }
                    if (_ENA2._NAMADDR2s[i].ADDRESSLINE1 != null)
                    {
                        fobj.NAME_ADDRESS[i].ADDRESS1 = CopMvcUtil.GetString(_ENA2._NAMADDR2s[i].ADDRESSLINE1);
                    }
                    if (_ENA2._NAMADDR2s[i].ADDRESSLINE2 != null)
                    {
                        fobj.NAME_ADDRESS[i].ADDRESS2 = _ENA2._NAMADDR2s[i].ADDRESSLINE2;
                    }
                    if (_ENA2._NAMADDR2s[i].CITY != null)
                    {
                        fobj.NAME_ADDRESS[i].CITY = _ENA2._NAMADDR2s[i].CITY;
                    }
                    if (_ENA2._NAMADDR2s[i].STATE != null)
                    {
                        fobj.NAME_ADDRESS[i].STATE = _ENA2._NAMADDR2s[i].STATE;
                    }
                    if (_ENA2._NAMADDR2s[i].ZIPCODE != null)
                    {
                        fobj.NAME_ADDRESS[i].ZIP = _ENA2._NAMADDR2s[i].ZIPCODE;
                    }
                    if (_ENA2._NAMADDR2s[i].BUSINESSPHONENUMBER != null)
                    {
                        fobj.NAME_ADDRESS[i].WORK_PHONE = CopMvcUtil.GetString(_ENA2._NAMADDR2s[i].BUSINESSPHONENUMBER);
                    }
                    if (_ENA2._NAMADDR2s[i].BUSINESSPHONEEXTENSION != null)
                    {
                        fobj.NAME_ADDRESS[i].WORK_PHONE_EXT = _ENA2._NAMADDR2s[i].BUSINESSPHONEEXTENSION;
                    }
                    if (_ENA2._NAMADDR2s[i].BUSINESSFAX != null)
                    {
                        fobj.NAME_ADDRESS[i].WORK_FAX = CopMvcUtil.GetString(_ENA2._NAMADDR2s[i].BUSINESSFAX);
                    }
                    if (_ENA2._NAMADDR2s[i].OTHERPHONENUMBER != null)
                    {
                        fobj.NAME_ADDRESS[i].OTHER_PHONE = CopMvcUtil.GetString(_ENA2._NAMADDR2s[i].OTHERPHONENUMBER);
                    }
                    if (_ENA2._NAMADDR2s[i].EMAILADDR != null)
                    {
                        fobj.NAME_ADDRESS[i].EMAIL = _ENA2._NAMADDR2s[i].EMAILADDR;
                    }
                    if (_ENA2._NAMADDR2s[i].TIADRSEQUENCENUMBER != null)
                    {
                        fobj.NAME_ADDRESS[i].TRACE_NUMBER = CopMvcUtil.GetString(_ENA2._NAMADDR2s[i].TIADRSEQUENCENUMBER);
                    }
                }
            }

            //LOAD TAX ACCT s
            fobj.TAX_ACCT = new List <TAX_ACCT>();
            string Value = "";

            if (_ETA._ENTITYTAXACCOUNTSs != null)
            {
                for (int i = 0; i < _ETA._ENTITYTAXACCOUNTSs.Length; i++)
                {
                    fobj.TAX_ACCT.Add(COPXmlFactory.RevenueGovXMLFactory.GetAcctTemplate_TaxAcct());
                    if (_ETA._ENTITYTAXACCOUNTSs[i].FUNCTIONCODE != null)
                    {
                        fobj.TAX_ACCT[i].FUNCTION_CODE = _ETA._ENTITYTAXACCOUNTSs[i].FUNCTIONCODE;
                    }
                    if (_ETA._ENTITYTAXACCOUNTSs[i].ACCOUNT != null)
                    {
                        fobj.TAX_ACCT[i].ACCOUNT = CopMvcUtil.GetString(_ETA._ENTITYTAXACCOUNTSs[i].ACCOUNT);
                    }
                    if (_ETA._ENTITYTAXACCOUNTSs[i].STARTDATE != null)
                    {
                        fobj.TAX_ACCT[i].START_DATE = CopMvcUtil.ConvDate(_ETA._ENTITYTAXACCOUNTSs[i].STARTDATE);
                    }
                    if (_ETA._ENTITYTAXACCOUNTSs[i].WAGMONTHLYGROSS != null)
                    {
                        fobj.TAX_ACCT[i].WAGE_MONTHLY_GROSS = _ETA._ENTITYTAXACCOUNTSs[i].WAGMONTHLYGROSS;
                    }
                    if (_ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION != null)
                    {
                        if (_ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAAPPLYFOREXEMPTION == "Y")
                        {
                            Value = _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAAPPLYFOREXEMPTION;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAREACTIVATING;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAAFFILIATED;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNANEWOWNER;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAREALESTATE;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNACOMPLYYEAR1;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNACOMPLYYEAR2;
                            Value = Value + _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNAACCEPTED;
                            fobj.TAX_ACCT[i].UOL_BRT = Value;
                        }
                        else
                        {
                            fobj.TAX_ACCT[i].UOL_BRT = _ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNASTATUS;
                        }
                    }
                    if (_ETA._ENTITYTAXACCOUNTSs[i].PRKID != null)
                    {
                        fobj.TAX_ACCT[i].PRK_ID = _ETA._ENTITYTAXACCOUNTSs[i].PRKID;
                    }
                }
            }

            //LOAD Echecks AX ACCT s
            fobj.ECHECK = new ECHECK();
            if (fobj.ECHECK.ACCOUNT_NUMBER != null)
            {
                fobj.ECHECK.ACCOUNT_NUMBER = CopMvcUtil.GetString(_ECHK._ECHECK.BANKACCOUNTNUMBER);
            }
            if (fobj.ECHECK.FUNCTION_CODE != null)
            {
                fobj.ECHECK.FUNCTION_CODE = _ECHK._ECHECK.FUNCTIONCODE;
            }
            if (fobj.ECHECK.ROUTING_NUMBER != null)
            {
                fobj.ECHECK.ROUTING_NUMBER = CopMvcUtil.GetString(_ECHK._ECHECK.TRANSITROUTINGNUMBER);
            }
            if (fobj.ECHECK.ACCOUNT_TYPE != null)
            {
                fobj.ECHECK.ACCOUNT_TYPE = _ECHK._ECHECK.BANKACCOUNTTYPE;
            }



            return(fobj);
        }
Example #2
0
        private static COPXmlFactory.RTTIE010.ACCTTEMPLATE __Fill(RTTIE210_SrvRef.RTTIE210Response e)
        {
            COPXmlFactory.RTTIE010.ACCTTEMPLATE fobj = RevenueGovXMLFactory.GetAcctTemplate();

            //LOAD ERRORS INTO OBJECT
            fobj.ERROR_INFO = new ERROR_INFO();

            fobj.ERROR_INFO.PROGRAM = e._SMA._SYSTEMMESSAGEAREA._PROGRAM;
            fobj.ERROR_INFO.LINE    = e._SMA._SYSTEMMESSAGEAREA.LINE.ToString();
            fobj.ERROR_INFO.MESSAGE = e._SMA._SYSTEMMESSAGEAREA.MESSAGE;
            fobj.ERROR_INFO.ERROR   = e._SMA._SYSTEMMESSAGEAREA.ERROR.ToString();

            //LOAD ENTITY INFOS
            fobj.ENTITY_INFO = new ENTITY_INFO();
            fobj.ENTITY_INFO.FUNCTION_CODE = e._EMI._ENTITYMASTERINFO.FUNCTIONCODE;
            fobj.ENTITY_INFO.TYPE          = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.ENTITYTYPE);
            fobj.ENTITY_INFO.ENTITY_ID     = e._EMI._ENTITYMASTERINFO.ENTITYID;
            fobj.ENTITY_INFO.ACCOUNT_ID    = e._EMI._ENTITYMASTERINFO.ACCOUNTID;
            fobj.ENTITY_INFO.NAIC_CODE     = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.NAICFEDERALCODE);
            fobj.ENTITY_INFO.SIC_CODE      = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.SICFEDERALCODE);
            fobj.ENTITY_INFO.START_DATE    = CopMvcUtil.ConvDate(e._EMI._ENTITYMASTERINFO.BUSINESSSTARTDATE);

            fobj.ENTITY_INFO.ORGTYPE     = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.ORGANIZATIONTYPE);
            fobj.ENTITY_INFO.ORIGIN      = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.BUSINESSORIGIN);
            fobj.ENTITY_INFO.GENDER      = e._EMI._ENTITYMASTERINFO.BUSINESSGENDER;
            fobj.ENTITY_INFO.OTHER       = e._EMI._ENTITYMASTERINFO.BUSINESSOTHER;
            fobj.ENTITY_INFO.PIN         = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.PINNUMBER);
            fobj.ENTITY_INFO.FORCEPINCHG = CopMvcUtil.GetString(e._EMI._ENTITYMASTERINFO.PINSWITCH);
            // Unused : fobj.ENTITY_INFO.FORCEPINCHG = ???

            //LOAD NAME ADDRESS INFOS
            //fobj.NAME_ADDRESS = new List<NAME_ADDRESS>(e._ENA1._NAMADDR1s.Length);
            fobj.NAME_ADDRESS = new List <NAME_ADDRESS>();


            for (int i = 0; i < e._ENA1._NAMADDR1s.Length; i++)
            {
                //ENA1 section
                fobj.NAME_ADDRESS.Add(RevenueGovXMLFactory.GetAcctTemplate_NAME_ADDRESS());
                fobj.NAME_ADDRESS[i].FUNCTION_CODE     = e._ENA1._NAMADDR1s[i].FUNCTIONCODE;
                fobj.NAME_ADDRESS[i].TYPE              = CopMvcUtil.GetString(e._ENA1._NAMADDR1s[i].ENTITYTYPE);
                fobj.NAME_ADDRESS[i].ID                = e._ENA1._NAMADDR1s[i].ENTITYID;
                fobj.NAME_ADDRESS[i].NAME              = e._ENA1._NAMADDR1s[i].ENTITYNAME;
                fobj.NAME_ADDRESS[i].TRADE_NAME        = e._ENA1._NAMADDR1s[i].TRADENAME;
                fobj.NAME_ADDRESS[i].ADDRESS_TYPE      = CopMvcUtil.GetString(e._ENA1._NAMADDR1s[i].ADDRESSTYPE);
                fobj.NAME_ADDRESS[i].RELATIONSHIP_CODE = CopMvcUtil.GetString(e._ENA1._NAMADDR1s[i].RELATIONSHIPCODE);

                //ENA2 section
                fobj.NAME_ADDRESS[i].ATTENTION      = e._ENA2._NAMADDR2s[i].ATTENTION;
                fobj.NAME_ADDRESS[i].ADDRESS1       = CopMvcUtil.GetString(e._ENA2._NAMADDR2s[i].ADDRESSLINE1);
                fobj.NAME_ADDRESS[i].ADDRESS2       = e._ENA2._NAMADDR2s[i].ADDRESSLINE2;
                fobj.NAME_ADDRESS[i].CITY           = e._ENA2._NAMADDR2s[i].CITY;
                fobj.NAME_ADDRESS[i].STATE          = e._ENA2._NAMADDR2s[i].STATE;
                fobj.NAME_ADDRESS[i].ZIP            = e._ENA2._NAMADDR2s[i].ZIPCODE;
                fobj.NAME_ADDRESS[i].WORK_PHONE     = CopMvcUtil.GetString(e._ENA2._NAMADDR2s[i].BUSINESSPHONENUMBER);
                fobj.NAME_ADDRESS[i].WORK_PHONE_EXT = e._ENA2._NAMADDR2s[i].BUSINESSPHONEEXTENSION;
                fobj.NAME_ADDRESS[i].WORK_FAX       = CopMvcUtil.GetString(e._ENA2._NAMADDR2s[i].BUSINESSFAX);
                fobj.NAME_ADDRESS[i].OTHER_PHONE    = CopMvcUtil.GetString(e._ENA2._NAMADDR2s[i].OTHERPHONENUMBER);
                fobj.NAME_ADDRESS[i].EMAIL          = e._ENA2._NAMADDR2s[i].EMAILADDR;
                fobj.NAME_ADDRESS[i].TRACE_NUMBER   = CopMvcUtil.GetString(e._ENA2._NAMADDR2s[i].TIADRSEQUENCENUMBER);
            }

            //LOAD TAX ACCT s
            fobj.TAX_ACCT = new List <TAX_ACCT>();
            for (int i = 0; i < e._ETA._ENTITYTAXACCOUNTSs.Length; i++)
            {
                fobj.TAX_ACCT.Add(COPXmlFactory.RevenueGovXMLFactory.GetAcctTemplate_TaxAcct());
                fobj.TAX_ACCT[i].FUNCTION_CODE      = e._ETA._ENTITYTAXACCOUNTSs[i].FUNCTIONCODE;
                fobj.TAX_ACCT[i].ACCOUNT            = CopMvcUtil.GetString(e._ETA._ENTITYTAXACCOUNTSs[i].ACCOUNT);
                fobj.TAX_ACCT[i].START_DATE         = CopMvcUtil.ConvDate(e._ETA._ENTITYTAXACCOUNTSs[i].STARTDATE);
                fobj.TAX_ACCT[i].WAGE_MONTHLY_GROSS = e._ETA._ENTITYTAXACCOUNTSs[i].WAGMONTHLYGROSS;
                fobj.TAX_ACCT[i].UOL_BRT            = e._ETA._ENTITYTAXACCOUNTSs[i].BPTNEWAPPLICATION.BPTNASTATUS;
                fobj.TAX_ACCT[i].PRK_ID             = e._ETA._ENTITYTAXACCOUNTSs[i].PRKID;
            }

            //LOAD Echecks AX ACCT s
            fobj.ECHECK = new ECHECK();
            fobj.ECHECK.FUNCTION_CODE  = e._ECHK._ECHECK.FUNCTIONCODE;
            fobj.ECHECK.ROUTING_NUMBER = CopMvcUtil.GetString(e._ECHK._ECHECK.TRANSITROUTINGNUMBER);
            fobj.ECHECK.ACCOUNT_NUMBER = CopMvcUtil.GetString(e._ECHK._ECHECK.BANKACCOUNTNUMBER);
            fobj.ECHECK.ACCOUNT_TYPE   = e._ECHK._ECHECK.BANKACCOUNTTYPE;

            return(fobj);
        }