public static INS_UWD_POLICY_HEAD get_policy(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from polh in db.INS_UWD_POLICY_HEAD where polh.POLH_SYS_ID == code select polh).ToList().Select(polh => new INS_UWD_POLICY_HEAD
                {
                    POLH_SYS_ID = polh.POLH_SYS_ID,
                    POLH_DOC_NO = polh.POLH_DOC_NO,
                    POLH_END_NO = polh.POLH_END_NO,
                    POLH_QUT_SER_NO = polh.POLH_QUT_SER_NO,
                    POLH_POL_SER_NO = polh.POLH_POL_SER_NO,
                    MS_SYS_COMPANY = CompanyMdl.get_company(polh.POLH_CMP_CODE),
                    MS_SYS_OFFICE = OfficeMdl.get_office(polh.POLH_OFF_CODE),
                    MS_UDW_CUSTOMERS = CustomerMdl.get_customer(polh.POLH_CUST_CODE),
                    MS_SYS_SOURCE_BUSINESS = SourceBusinessMdl.get_sourcebusiness(polh.POLH_BIZ_SOURCE),
                    INS_UDW_INSUR_SOURCE = InsuranceSourceMdl.get_insource(polh.POLH_INS_SOURCE),
                    MS_SYS_INTERMEDIARY = IntermediaryMdl.get_intermediary(polh.POLH_INTERMIDIARY),
                    MST_UWD_PRODUCT = ProductMdl.get_product(polh.POLH_SUB_CLASS_CODE),
                    MS_UDW_CLASS_OF_BUSINESS = ClassBusinessMdl.get_class(polh.POLH_CLASS_CODE),
                    MS_SYS_CHANNEL = ChannelMdl.get_channel(polh.POLH_CHANNEL_CODE),
                    POLH_CLASS_CODE = polh.POLH_CLASS_CODE,
                    POLH_SUB_CLASS_CODE = polh.POLH_SUB_CLASS_CODE,
                    POLH_CHANNEL_CODE = polh.POLH_CHANNEL_CODE,
                    POLH_CMP_CODE = polh.POLH_CMP_CODE,
                    POLH_OFF_CODE = polh.POLH_OFF_CODE,
                    POLH_CUST_CODE = polh.POLH_CUST_CODE,
                    POLH_INS_SOURCE = polh.POLH_INS_SOURCE,
                    POLH_BIZ_SOURCE = polh.POLH_BIZ_SOURCE,
                    POLH_INTERMIDIARY = polh.POLH_INTERMIDIARY,
                    POLH_POL_START_DATE = polh.POLH_POL_START_DATE,
                    POLH_POL_END_DATE = polh.POLH_POL_END_DATE,
                    POLH_POL_DAYS = polh.POLH_POL_DAYS,
                    POLH_POL_UW_YEAR = polh.POLH_POL_UW_YEAR,
                    POLH_POL_SI_FC = polh.POLH_POL_SI_FC,
                    POLH_POL_SI_BC = polh.POLH_POL_SI_BC,
                    POLH_POL_PREM_FC = polh.POLH_POL_PREM_FC,
                    POLH_POL_PREM_BC = polh.POLH_POL_PREM_BC,
                    POLH_POL_COMM_FC = polh.POLH_POL_COMM_FC,
                    POLH_POL_COMM_BC = polh.POLH_POL_COMM_BC,
                    POLH_POL_DISC_FC = polh.POLH_POL_DISC_FC,
                    POLH_POL_DISC_BC = polh.POLH_POL_DISC_BC,
                    POLH_POL_LOAD_FC = polh.POLH_POL_LOAD_FC,
                    POLH_POL_LOAD_BC = polh.POLH_POL_LOAD_BC,
                    POLH_COINS_SI_FC = polh.POLH_COINS_SI_FC,
                    POLH_COINS_SI_BC = polh.POLH_COINS_SI_BC,
                    POLH_COINS_PREM_FC = polh.POLH_COINS_PREM_FC,
                    POLH_COINS_PREM_BC = polh.POLH_COINS_PREM_BC,
                    POLH_NET_SI_FC = polh.POLH_NET_SI_FC,
                    POLH_NET_SI_BC = polh.POLH_NET_SI_BC,
                    POLH_NET_PREM_FC = polh.POLH_NET_PREM_FC,
                    POLH_NET_PREM_BC = polh.POLH_NET_PREM_BC,
                    POLH_FEE_FC = polh.POLH_FEE_FC,
                    POLH_FEE_BC = polh.POLH_FEE_BC,
                    POLH_RENEW_SER_NO = polh.POLH_RENEW_SER_NO,
                    POLH_TXN_STATE = polh.POLH_TXN_STATE,
                    POLH_POL_STATE = polh.POLH_POL_STATE,
                    POLH_END_TYPE = polh.POLH_END_TYPE,
                    POLH_APPROVE_DATE = polh.POLH_APPROVE_DATE,
                    POLH_ACCT_DATE = polh.POLH_ACCT_DATE,
                    POLH_DISPLAY_NO = polh.POLH_DISPLAY_NO,
                    POLH_CRTE_BY = polh.POLH_CRTE_BY,
                    POLH_CRTE_DATE = polh.POLH_CRTE_DATE,
                    POLH_MOD_BY = polh.POLH_MOD_BY,
                    POLH_MOD_DATE = polh.POLH_MOD_DATE,
                    POLH_STATUS = polh.POLH_STATUS,
                    POLH_CURRENCY = polh.POLH_CURRENCY,
                    POLH_CURRENCY_RATE = polh.POLH_CURRENCY_RATE,

                    INS_UDW_GENERAL_ACCIDENT = polh.INS_UDW_GENERAL_ACCIDENT != null ? polh.INS_UDW_GENERAL_ACCIDENT.Select(c =>
                                                                                                                            new INS_UDW_GENERAL_ACCIDENT
                    {
                        GA_SYS_ID = c.GA_SYS_ID,
                        GA_RISK_ID = c.GA_RISK_ID,
                        GA_POLH_SYS_ID = c.GA_POLH_SYS_ID,
                        GA_POLH_DOC_NO = c.GA_POLH_DOC_NO,
                        GA_POLH_END_NO = c.GA_POLH_END_NO,
                        GA_PDT_CODE = c.GA_PDT_CODE,
                        GA_CVR_CODE = c.GA_CVR_CODE,
                        GA_RENEWAL_STATUS = c.GA_RENEWAL_STATUS,
                        GA_END_TYPE = c.GA_END_TYPE,
                        GA_START_DATE = c.GA_START_DATE,
                        GA_END_DATE = c.GA_END_DATE,
                        GA_CURRENCY = c.GA_CURRENCY,
                        GA_CURRENCY_RATE = c.GA_CURRENCY_RATE,
                        GA_REGION_CODE = c.GA_REGION_CODE,
                        GA_REGION_NAME = c.GA_REGION_NAME,
                        GA_AREA_CODE = c.GA_AREA_CODE,
                        GA_AREA_NAME = c.GA_AREA_NAME,
                        GA_LOC_CODE = c.GA_LOC_CODE,
                        GA_LOC_NAME = c.GA_LOC_NAME,
                        GA_LOC_DESC = c.GA_LOC_DESC,
                        GA_LOC_ADDRS = c.GA_LOC_ADDRS,
                        GA_EARTHQ_ZONE = c.GA_EARTHQ_ZONE,
                        GA_FIRST_LOSS = c.GA_FIRST_LOSS,
                        GA_TOT_PREM_FC = c.GA_TOT_PREM_FC,
                        GA_TOT_PREM_BC = c.GA_TOT_PREM_BC,
                        GA_SI_FC = c.GA_SI_FC,
                        GA_SI_BC = c.GA_SI_BC,
                        GA_RISK_PREM_FC = c.GA_RISK_PREM_FC,
                        GA_RISK_PREM_BC = c.GA_RISK_PREM_BC,
                        GA_ADJ_PREM_FC = c.GA_ADJ_PREM_FC,
                        GA_ADJ_PREM_BC = c.GA_ADJ_PREM_BC,
                        GA_DISC_FC = c.GA_DISC_FC,
                        GA_DISC_BC = c.GA_DISC_BC,
                        GA_LOAD_FC = c.GA_LOAD_FC,
                        GA_LOAD_BC = c.GA_LOAD_BC,
                        GA_COMP_FEE_FC = c.GA_COMP_FEE_FC,
                        GA_COMP_FEE_BC = c.GA_COMP_FEE_BC,
                        GA_COMMISSION_FC = c.GA_COMMISSION_FC,
                        GA_COMMISSION_BC = c.GA_COMMISSION_BC,
                        GA_CRTE_BY = c.GA_CRTE_BY,
                        GA_CRTE_DATE = c.GA_CRTE_DATE,
                        GA_STATUS = c.GA_STATUS,
                    }).ToList() : null,

                    //INS_GA_ASSET_ALL_RISK = polh.INS_GA_ASSET_ALL_RISK != null ? polh.INS_GA_ASSET_ALL_RISK.Select(c =>
                    //     new INS_GA_ASSET_ALL_RISK
                    //     {
                    //         AAR_SYS_ID = c.AAR_SYS_ID,
                    //         AAR_POLH_SYS_ID = c.AAR_POLH_SYS_ID,
                    //         AAR_GA_SYS_ID = c.AAR_GA_SYS_ID,
                    //         AAR_RISK_TYPE = c.AAR_RISK_TYPE,
                    //         AAR_RISK_NAME = c.AAR_RISK_NAME,
                    //         AAR_DESCRIPTION = c.AAR_DESCRIPTION,
                    //         AAR_LIMIT_LIABILITY = c.AAR_LIMIT_LIABILITY,
                    //         AAR_CRTE_BY = c.AAR_CRTE_BY,
                    //         AAR_CRTE_DATE = c.AAR_CRTE_DATE,
                    //         AAR_STATUS = c.AAR_STATUS,
                    //         AAR_POLH_END_NO = c.AAR_POLH_END_NO,
                    //         AAR_RISK_ID = c.AAR_RISK_ID,

                    //     }).ToList() : null,


                    //INS_GA_ASSET_TRANSIT = polh.INS_GA_ASSET_TRANSIT != null ? polh.INS_GA_ASSET_TRANSIT.Select(c =>
                    //     new INS_GA_ASSET_TRANSIT
                    //     {
                    //         TRANS_SYS_ID = c.TRANS_SYS_ID,
                    //         TRANS_GA_SYS_ID = c.TRANS_GA_SYS_ID,
                    //         TRANS_POLH_SYS_ID = c.TRANS_POLH_SYS_ID,
                    //         TRANS_RISK_TYPE = c.TRANS_RISK_TYPE,
                    //         TRANS_RISK_NAME = c.TRANS_RISK_NAME,
                    //         TRANS_DESCRIPTION = c.TRANS_DESCRIPTION,
                    //         TRANS_SUM_INSURED = c.TRANS_SUM_INSURED,
                    //         TRANS_LIMIT_LOSS = c.TRANS_LIMIT_LOSS,
                    //         TRANS_DENT_FROM = c.TRANS_DENT_FROM,
                    //         TRANS_DENT_T0 = c.TRANS_DENT_T0,
                    //         TRANS_DISTANCE = c.TRANS_DISTANCE,
                    //         TRANS_CRTE_BY = c.TRANS_CRTE_BY,
                    //         TRANS_CRTE_DATE = c.TRANS_CRTE_DATE,
                    //         TRANS_STATUS = c.TRANS_STATUS,
                    //         TRANS_POLH_END_NO = c.TRANS_POLH_END_NO,
                    //         TRANS_RISK_ID = c.TRANS_RISK_ID,

                    //     }).ToList() : null,


                    //INS_GA_PROF_INDEMNITY = polh.INS_GA_PROF_INDEMNITY != null ? polh.INS_GA_PROF_INDEMNITY.Select(c =>
                    //         new INS_GA_PROF_INDEMNITY
                    //         {
                    //             PRO_SYS_ID = c.PRO_SYS_ID,
                    //             PRO_RISK_ID = c.PRO_RISK_ID,
                    //             PRO_GA_SYS_ID = c.PRO_GA_SYS_ID,
                    //             PRO_POLH_SYS_ID = c.PRO_POLH_SYS_ID,
                    //             PRO_POLH_END_NO = c.PRO_POLH_END_NO,
                    //             PRO_ITEM = c.PRO_ITEM,
                    //             PRO_ITEM_DESC = c.PRO_ITEM_DESC,
                    //             PRO_AGGRET_LIMIT = c.PRO_AGGRET_LIMIT,
                    //             PRO_LIMIT_OCCUR = c.PRO_LIMIT_OCCUR,
                    //             PRO_PREM_FC = c.PRO_PREM_FC,
                    //             PRO_LIMIT_LOSS = c.PRO_LIMIT_LOSS,
                    //             PRO_ANN_TURNOVER = c.PRO_ANN_TURNOVER,
                    //             PRO_DENT_FROM = c.PRO_DENT_FROM,
                    //             PRO_DENT_TO = c.PRO_DENT_TO,
                    //             PRO_DISTANCE = c.PRO_DISTANCE,
                    //             PRO_CRTE_BY = c.PRO_CRTE_BY,
                    //             PRO_CRTE_DATE = c.PRO_CRTE_DATE,
                    //             PRO_STATUS = c.PRO_STATUS,

                    //         }).ToList() : null,

                    INS_UWD_RISK_COVERS = polh.INS_UWD_RISK_COVERS != null ? polh.INS_UWD_RISK_COVERS.Select(v =>
                                                                                                             new INS_UWD_RISK_COVERS
                    {
                        RCOV_SYS_ID = v.RCOV_SYS_ID,
                        RCOV_RISK_SYS_ID = v.RCOV_RISK_SYS_ID,
                        RCOV_RISK_NO = v.RCOV_RISK_NO,
                        RCOV_POLH_DOC_NO = v.RCOV_POLH_DOC_NO,
                        RPCOV_END_NO = v.RPCOV_END_NO,
                        RCOV_CODE = v.RCOV_CODE,
                        RCOV_NO = v.RCOV_NO,
                        RCOV_SI_FC = v.RCOV_SI_FC,
                        RCOV_SI_BC = v.RCOV_SI_BC,
                        RCOV_RATE = v.RCOV_RATE,
                        RCOV_GROSS_PREM_FC = v.RCOV_GROSS_PREM_FC,
                        RCOV_GROSS_PREM_BC = v.RCOV_GROSS_PREM_BC,
                        RCOV_NET_PREM_FC = v.RCOV_NET_PREM_FC,
                        RCOV_NET_PREM_BC = v.RCOV_NET_PREM_BC,
                        RCOV_RI_SI_YN = v.RCOV_RI_SI_YN,
                        RCOV_RI_PREM_YN = v.RCOV_RI_PREM_YN,
                        RCOV_TYPE = v.RCOV_TYPE,
                        RCOV_DISC_YN = v.RCOV_DISC_YN,
                        RCOV_DISC_FC = v.RCOV_DISC_FC,
                        RCOV_DISC_BC = v.RCOV_DISC_BC,
                        RCOV_LOAD_YN = v.RCOV_LOAD_YN,
                        RCOV_LOAD_FC = v.RCOV_LOAD_FC,
                        RCOV_LOAD_BC = v.RCOV_LOAD_BC,
                        RCOV_TXN_STATE = v.RCOV_TXN_STATE,
                        RCOV_CRTE_BY = v.RCOV_CRTE_BY,
                        RCOV_CRTE_DATE = v.RCOV_CRTE_DATE,
                        RCOV_MOD_BY = v.RCOV_MOD_BY,
                        RCOV_MOD_DATE = v.RCOV_MOD_DATE,
                        RCOV_STATUS = v.RCOV_STATUS,
                    }).ToList() : null,
                }).Single());
            }
            catch (Exception e)
            {
                return(null);
            }
        }
        public static INS_UWD_POLICY_HEAD get_policy(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from polh in db.INS_UWD_POLICY_HEAD where polh.POLH_SYS_ID == code select polh).ToList().Select(polh => new INS_UWD_POLICY_HEAD
                {
                    POLH_SYS_ID = polh.POLH_SYS_ID,
                    POLH_DOC_NO = polh.POLH_DOC_NO,
                    POLH_END_NO = polh.POLH_END_NO,
                    POLH_QUT_SER_NO = polh.POLH_QUT_SER_NO,
                    POLH_POL_SER_NO = polh.POLH_POL_SER_NO,
                    MS_SYS_COMPANY = CompanyMdl.get_company(polh.POLH_CMP_CODE),
                    MS_SYS_OFFICE = OfficeMdl.get_office(polh.POLH_OFF_CODE),
                    MS_UDW_CUSTOMERS = CustomerMdl.get_customer(polh.POLH_CUST_CODE),
                    MS_SYS_SOURCE_BUSINESS = SourceBusinessMdl.get_sourcebusiness(polh.POLH_BIZ_SOURCE),
                    INS_UDW_INSUR_SOURCE = InsuranceSourceMdl.get_insource(polh.POLH_INS_SOURCE),
                    MS_SYS_INTERMEDIARY = IntermediaryMdl.get_intermediary(polh.POLH_INTERMIDIARY),
                    MST_UWD_PRODUCT = ProductMdl.get_product(polh.POLH_SUB_CLASS_CODE),
                    MS_UDW_CLASS_OF_BUSINESS = ClassBusinessMdl.get_class(polh.POLH_CLASS_CODE),
                    MS_SYS_CHANNEL = ChannelMdl.get_channel(polh.POLH_CHANNEL_CODE),
                    POLH_CLASS_CODE = polh.POLH_CLASS_CODE,
                    POLH_SUB_CLASS_CODE = polh.POLH_SUB_CLASS_CODE,
                    POLH_CHANNEL_CODE = polh.POLH_CHANNEL_CODE,
                    POLH_CMP_CODE = polh.POLH_CMP_CODE,
                    POLH_OFF_CODE = polh.POLH_OFF_CODE,
                    POLH_CUST_CODE = polh.POLH_CUST_CODE,
                    POLH_INS_SOURCE = polh.POLH_INS_SOURCE,
                    POLH_BIZ_SOURCE = polh.POLH_BIZ_SOURCE,
                    POLH_INTERMIDIARY = polh.POLH_INTERMIDIARY,
                    POLH_POL_START_DATE = polh.POLH_POL_START_DATE,
                    POLH_POL_END_DATE = polh.POLH_POL_END_DATE,
                    POLH_POL_DAYS = polh.POLH_POL_DAYS,
                    POLH_POL_UW_YEAR = polh.POLH_POL_UW_YEAR,
                    POLH_POL_SI_FC = polh.POLH_POL_SI_FC,
                    POLH_POL_SI_BC = polh.POLH_POL_SI_BC,
                    POLH_POL_PREM_FC = polh.POLH_POL_PREM_FC,
                    POLH_POL_PREM_BC = polh.POLH_POL_PREM_BC,
                    POLH_POL_COMM_FC = polh.POLH_POL_COMM_FC,
                    POLH_POL_COMM_BC = polh.POLH_POL_COMM_BC,

                    POLH_POL_DISC_FC = polh.POLH_POL_DISC_FC,
                    POLH_POL_DISC_BC = polh.POLH_POL_DISC_BC,
                    POLH_POL_LOAD_FC = polh.POLH_POL_LOAD_FC,
                    POLH_POL_LOAD_BC = polh.POLH_POL_LOAD_BC,
                    POLH_COINS_SI_FC = polh.POLH_COINS_SI_FC,
                    POLH_COINS_SI_BC = polh.POLH_COINS_SI_BC,
                    POLH_COINS_PREM_FC = polh.POLH_COINS_PREM_FC,
                    POLH_COINS_PREM_BC = polh.POLH_COINS_PREM_BC,
                    POLH_NET_SI_FC = polh.POLH_NET_SI_FC,
                    POLH_NET_SI_BC = polh.POLH_NET_SI_BC,
                    POLH_NET_PREM_FC = polh.POLH_NET_PREM_FC,
                    POLH_NET_PREM_BC = polh.POLH_NET_PREM_BC,
                    POLH_FEE_FC = polh.POLH_FEE_FC,
                    POLH_FEE_BC = polh.POLH_FEE_BC,
                    POLH_RENEW_SER_NO = polh.POLH_RENEW_SER_NO,
                    POLH_TXN_STATE = polh.POLH_TXN_STATE,
                    POLH_POL_STATE = polh.POLH_POL_STATE,
                    POLH_END_TYPE = polh.POLH_END_TYPE,
                    POLH_APPROVE_DATE = polh.POLH_APPROVE_DATE,
                    POLH_ACCT_DATE = polh.POLH_ACCT_DATE,
                    POLH_DISPLAY_NO = polh.POLH_DISPLAY_NO,
                    POLH_CRTE_BY = polh.POLH_CRTE_BY,
                    POLH_CRTE_DATE = polh.POLH_CRTE_DATE,
                    POLH_MOD_BY = polh.POLH_MOD_BY,
                    POLH_MOD_DATE = polh.POLH_MOD_DATE,
                    POLH_STATUS = polh.POLH_STATUS,
                    POLH_CURRENCY = polh.POLH_CURRENCY,
                    POLH_CURRENCY_RATE = polh.POLH_CURRENCY_RATE,
                    INS_UDW_LIABILITY = polh.INS_UDW_LIABILITY != null ? polh.INS_UDW_LIABILITY.Select(r => get_riskd(r.LIA_SYS_ID)).ToList() : null,
                }).Single());
            }
            catch (Exception e)
            {
                return(null);
            }
        }
示例#3
0
        public static INS_UWD_POLICY_HEAD get_policy(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from polh in db.INS_UWD_POLICY_HEAD where polh.POLH_SYS_ID == code select polh).ToList().Select(polh => new INS_UWD_POLICY_HEAD
                {
                    POLH_SYS_ID = polh.POLH_SYS_ID,
                    POLH_DOC_NO = polh.POLH_DOC_NO,
                    POLH_END_NO = polh.POLH_END_NO,
                    POLH_QUT_SER_NO = polh.POLH_QUT_SER_NO,
                    POLH_POL_SER_NO = polh.POLH_POL_SER_NO,
                    MS_SYS_COMPANY = CompanyMdl.get_company(polh.POLH_CMP_CODE),
                    MS_SYS_OFFICE = OfficeMdl.get_office(polh.POLH_OFF_CODE),
                    MS_UDW_CUSTOMERS = CustomerMdl.get_customer(polh.POLH_CUST_CODE),
                    MS_SYS_SOURCE_BUSINESS = SourceBusinessMdl.get_sourcebusiness(polh.POLH_BIZ_SOURCE),
                    INS_UDW_INSUR_SOURCE = InsuranceSourceMdl.get_insource(polh.POLH_INS_SOURCE),
                    MS_SYS_INTERMEDIARY = IntermediaryMdl.get_intermediary(polh.POLH_INTERMIDIARY),
                    MST_UWD_PRODUCT = ProductMdl.get_product(polh.POLH_SUB_CLASS_CODE),
                    MS_UDW_CLASS_OF_BUSINESS = ClassBusinessMdl.get_class(polh.POLH_CLASS_CODE),
                    MS_SYS_CHANNEL = ChannelMdl.get_channel(polh.POLH_CHANNEL_CODE),
                    POLH_CLASS_CODE = polh.POLH_CLASS_CODE,
                    POLH_SUB_CLASS_CODE = polh.POLH_SUB_CLASS_CODE,
                    POLH_CHANNEL_CODE = polh.POLH_CHANNEL_CODE,
                    POLH_CMP_CODE = polh.POLH_CMP_CODE,
                    POLH_OFF_CODE = polh.POLH_OFF_CODE,
                    POLH_CUST_CODE = polh.POLH_CUST_CODE,
                    POLH_INS_SOURCE = polh.POLH_INS_SOURCE,
                    POLH_BIZ_SOURCE = polh.POLH_BIZ_SOURCE,
                    POLH_INTERMIDIARY = polh.POLH_INTERMIDIARY,
                    POLH_POL_START_DATE = polh.POLH_POL_START_DATE,
                    POLH_POL_END_DATE = polh.POLH_POL_END_DATE,
                    POLH_POL_DAYS = polh.POLH_POL_DAYS,
                    POLH_POL_UW_YEAR = polh.POLH_POL_UW_YEAR,
                    POLH_POL_SI_FC = polh.POLH_POL_SI_FC,
                    POLH_POL_SI_BC = polh.POLH_POL_SI_BC,
                    POLH_POL_PREM_FC = polh.POLH_POL_PREM_FC,
                    POLH_POL_PREM_BC = polh.POLH_POL_PREM_BC,
                    POLH_POL_COMM_FC = polh.POLH_POL_COMM_FC,
                    POLH_POL_COMM_BC = polh.POLH_POL_COMM_BC,

                    POLH_POL_DISC_FC = polh.POLH_POL_DISC_FC,
                    POLH_POL_DISC_BC = polh.POLH_POL_DISC_BC,
                    POLH_POL_LOAD_FC = polh.POLH_POL_LOAD_FC,
                    POLH_POL_LOAD_BC = polh.POLH_POL_LOAD_BC,
                    POLH_COINS_SI_FC = polh.POLH_COINS_SI_FC,
                    POLH_COINS_SI_BC = polh.POLH_COINS_SI_BC,
                    POLH_COINS_PREM_FC = polh.POLH_COINS_PREM_FC,
                    POLH_COINS_PREM_BC = polh.POLH_COINS_PREM_BC,
                    POLH_NET_SI_FC = polh.POLH_NET_SI_FC,
                    POLH_NET_SI_BC = polh.POLH_NET_SI_BC,
                    POLH_NET_PREM_FC = polh.POLH_NET_PREM_FC,
                    POLH_NET_PREM_BC = polh.POLH_NET_PREM_BC,


                    POLH_FEE_FC = polh.POLH_FEE_FC,
                    POLH_FEE_BC = polh.POLH_FEE_BC,
                    POLH_RENEW_SER_NO = polh.POLH_RENEW_SER_NO,
                    POLH_TXN_STATE = polh.POLH_TXN_STATE,
                    POLH_POL_STATE = polh.POLH_POL_STATE,
                    POLH_END_TYPE = polh.POLH_END_TYPE,
                    POLH_APPROVE_DATE = polh.POLH_APPROVE_DATE,
                    POLH_ACCT_DATE = polh.POLH_ACCT_DATE,
                    POLH_DISPLAY_NO = polh.POLH_DISPLAY_NO,
                    POLH_CRTE_BY = polh.POLH_CRTE_BY,
                    POLH_CRTE_DATE = polh.POLH_CRTE_DATE,
                    POLH_MOD_BY = polh.POLH_MOD_BY,
                    POLH_MOD_DATE = polh.POLH_MOD_DATE,
                    POLH_STATUS = polh.POLH_STATUS,
                    POLH_CURRENCY = polh.POLH_CURRENCY,
                    POLH_CURRENCY_RATE = polh.POLH_CURRENCY_RATE,

                    INS_UWD_FIRE_LOCRISK = polh.INS_UWD_FIRE_LOCRISK != null ? polh.INS_UWD_FIRE_LOCRISK.Select(c =>
                                                                                                                new INS_UWD_FIRE_LOCRISK
                    {
                        PLOC_SYS_ID = c.PLOC_SYS_ID,
                        PLOC_POLH_SYS_ID = c.PLOC_POLH_SYS_ID,
                        PLOC_POLH_DOC_NO = c.PLOC_POLH_DOC_NO,
                        PLOC_POLH_END_NO = c.PLOC_POLH_END_NO,
                        PLOC_RISK_NO = c.PLOC_RISK_NO,
                        PLOC_REG_CODE = c.PLOC_REG_CODE,
                        PLOC_REG_NAME = c.PLOC_REG_NAME,
                        PLOC_AREA_CODE = c.PLOC_AREA_CODE,
                        PLOC_AREA_NAME = c.PLOC_AREA_NAME,
                        PLOC_LOC_CODE = c.PLOC_LOC_CODE,
                        PLOC_LOC_NAME = c.PLOC_LOC_NAME,
                        PLOC_LOC_DESC = c.PLOC_LOC_DESC,
                        PLOC_LOC_ADDRS = c.PLOC_LOC_ADDRS,

                        PLOC_OCCUP_CODE = c.PLOC_OCCUP_CODE,
                        PLOC_OCCUP_NAME = c.PLOC_OCCUP_NAME,
                        PLOC_OCCUP_SECTION = c.PLOC_OCCUP_SECTION,
                        PLOC_EQZONE = c.PLOC_EQZONE,
                        PLOC_RIEML = c.PLOC_RIEML,
                        PLOC_EML = c.PLOC_EML,
                        PLOC_START_DATE = c.PLOC_START_DATE,
                        PLOC_END_DATE = c.PLOC_END_DATE,
                        PLOC_CURR_CODE = c.PLOC_CURR_CODE,
                        PLOC_CURR_RATE = c.PLOC_CURR_RATE,

                        PLOC_UW_YEAR = c.PLOC_UW_YEAR,
                        PLOC_POL_CANCELLED = c.PLOC_POL_CANCELLED,
                        PLOC_CANCELLED_REASON = c.PLOC_CANCELLED_REASON,
                        PLOC_SI_FC = c.PLOC_SI_FC,
                        PLOC_SI_BC = c.PLOC_SI_BC,
                        PLOC_TOT_PREM_FC = c.PLOC_TOT_PREM_FC,
                        PLOC_TOT_PREM_BC = c.PLOC_TOT_PREM_BC,
                        PLOC_RISK_PREM_FC = c.PLOC_RISK_PREM_FC,
                        PLOC_RISK_PREM_BC = c.PLOC_RISK_PREM_BC,
                        PLOC_ADJ_PREM_FC = c.PLOC_ADJ_PREM_FC,

                        PLOC_ADJ_PREM_BC = c.PLOC_ADJ_PREM_BC,
                        PLOC_DISC_FC = c.PLOC_DISC_FC,
                        PLOC_DISC_BC = c.PLOC_DISC_BC,
                        PLOC_LOAD_FC = c.PLOC_LOAD_FC,
                        PLOC_LOAD_BC = c.PLOC_LOAD_BC,
                        PLOC_COMP_FEE_FC = c.PLOC_COMP_FEE_FC,
                        PLOC_COMP_FEE_BC = c.PLOC_COMP_FEE_BC,
                        PLOC_COMMISSION_FC = c.PLOC_COMMISSION_FC,
                        PLOC_COMMISSION_BC = c.PLOC_COMMISSION_BC,
                        PLOC_RI_APPLICABLE = c.PLOC_RI_APPLICABLE,

                        PLOC_RI_EFF_DATE = c.PLOC_RI_EFF_DATE,
                        PLOC_RI_SI_FC = c.PLOC_RI_SI_FC,
                        PLOC_RI_SI_BC = c.PLOC_RI_SI_BC,
                        PLOC_RI_PREM_FC = c.PLOC_RI_PREM_FC,
                        PLOC_RI_PREM_BC = c.PLOC_RI_PREM_BC,
                        PLOC_PDT_CODE = c.PLOC_PDT_CODE,
                        PLOC_CVR_CODE = c.PLOC_CVR_CODE,
                        PLOC_RENEWAL_STATUS = c.PLOC_RENEWAL_STATUS,
                        PLOC_END_TYPE = c.PLOC_END_TYPE,
                        PLOC_APPROVE_DATE = c.PLOC_APPROVE_DATE,

                        PLOC_ACCT_DATE = c.PLOC_ACCT_DATE,
                        PLOC_CRTE_BY = c.PLOC_CRTE_BY,
                        PLOC_CRTE_DATE = c.PLOC_CRTE_DATE,
                        PLOC_MOD_BY = c.PLOC_MOD_BY,
                        PLOC_MOD_DATE = c.PLOC_MOD_DATE,
                        PLOC_STATUS = c.PLOC_STATUS,
                        PLOC_TXN_STATUS = c.PLOC_TXN_STATUS,
                        PLOC_RISK_STATE = c.PLOC_RISK_STATE,
                        PLOC_TRISM_SI_FC = c.PLOC_TRISM_SI_FC,
                        PLOC_TRISM_SI_BC = c.PLOC_TRISM_SI_BC,

                        PLOC_TRISM_PREM_FC = c.PLOC_TRISM_PREM_FC,
                        PLOC_TRISM_PREM_BC = c.PLOC_TRISM_PREM_BC,
                    }).ToList() : null,


                    INS_UWD_FIRE_LOCINT = polh.INS_UWD_FIRE_LOCINT != null ? polh.INS_UWD_FIRE_LOCINT.Select(r => get_fire_locint(r.LINT_SYS_ID)).ToList() : null,
                }).Single());
            }
            catch (Exception e)
            {
                return(null);
            }
        }