예제 #1
0
        public static INS_UDW_PERSONAL_ACCIDENT get_risk(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_PERSONAL_ACCIDENT where c.PA_SYS_ID == code select c).ToList().Select(c => new INS_UDW_PERSONAL_ACCIDENT
                {
                    PA_SYS_ID = c.PA_SYS_ID,
                    PA_POLH_SYS_ID = c.PA_POLH_SYS_ID,
                    PA_POLH_DOC_NO = c.PA_POLH_DOC_NO,
                    PA_POLH_END_NO = c.PA_POLH_END_NO,
                    PA_ACCT_DATE = c.PA_ACCT_DATE,
                    PA_ADJ_PREM_BC = c.PA_ADJ_PREM_BC,
                    PA_ADJ_PREM_FC = c.PA_ADJ_PREM_FC,
                    PA_AGE = c.PA_AGE,
                    PA_ANN_BENCOV = c.PA_ANN_BENCOV,
                    PA_ANN_SALARY = c.PA_ANN_SALARY,
                    PA_APPROVE_DATE = c.PA_APPROVE_DATE,
                    PA_COMMISSION_BC = c.PA_COMMISSION_BC,
                    PA_COMMISSION_FC = c.PA_COMMISSION_FC,
                    PA_COMP_FEE_BC = c.PA_COMP_FEE_BC,
                    PA_COMP_FEE_FC = c.PA_COMP_FEE_FC,
                    PA_CURRENCY = c.PA_CURRENCY,
                    PA_CURRENCY_RATE = c.PA_CURRENCY_RATE,
                    PA_DAYS = c.PA_DAYS,
                    PA_DESCRIPTION = c.PA_DESCRIPTION,
                    PA_DISC_BC = c.PA_DISC_BC,
                    PA_DISC_FC = c.PA_DISC_FC,
                    PA_DOB = c.PA_DOB,
                    PA_CVR_CODE = c.PA_CVR_CODE,
                    PA_EARNING = c.PA_EARNING,
                    PA_END_DATE = c.PA_END_DATE,
                    PA_END_TYPE = c.PA_END_TYPE,
                    PA_EXCLUSIONS = c.PA_EXCLUSIONS,
                    PA_GENDER = c.PA_GENDER,
                    PA_GRP_ID = c.PA_GRP_ID,
                    PA_GRP_NAME = c.PA_GRP_NAME,
                    PA_JOB_TYPE = c.PA_JOB_TYPE,
                    PA_ISSUE_DATE = c.PA_ISSUE_DATE,
                    PA_LIM_EVENTS = c.PA_LIM_EVENTS,
                    PA_LIM_LIFE = c.PA_LIM_LIFE,
                    PA_LOAD_BC = c.PA_LOAD_BC,
                    PA_LOAD_FC = c.PA_LOAD_FC,
                    PA_MONTHLY_INCOME = c.PA_MONTHLY_INCOME,
                    PA_NAME_INSURED = c.PA_NAME_INSURED,
                    PA_NAME_NOMINEE = c.PA_NAME_NOMINEE,
                    PA_NUM_PERSONS = c.PA_NUM_PERSONS,
                    PA_OCCUPATION = c.PA_OCCUPATION,
                    PA_PDT_CODE = c.PA_PDT_CODE,
                    PA_RATE = c.PA_RATE,
                    PA_RELATION = c.PA_RELATION,
                    PA_RENEWAL_STATUS = c.PA_RENEWAL_STATUS,
                    PA_RISK_CLASSCODE = c.PA_RISK_CLASSCODE,
                    PA_RISK_CLASSNAME = c.PA_RISK_CLASSNAME,
                    PA_RISK_ID = c.PA_RISK_ID,
                    PA_RISK_NO = c.PA_RISK_NO,
                    PA_RISK_PREM_BC = c.PA_RISK_PREM_BC,
                    PA_RISK_PREM_FC = c.PA_RISK_PREM_FC,
                    PA_RISK_STATE = c.PA_RISK_STATE,
                    PA_RISK_TYPE = c.PA_RISK_TYPE,
                    PA_RI_PREM_BC = c.PA_RI_PREM_BC,
                    PA_RI_PREM_FC = c.PA_RI_PREM_FC,
                    PA_RI_SI_BC = c.PA_RI_SI_BC,
                    PA_RI_SI_FC = c.PA_RI_SI_FC,
                    PA_SI_BC = c.PA_SI_BC,
                    PA_SI_FC = c.PA_SI_FC,
                    PA_TFE_SALARY = c.PA_TFE_SALARY,
                    PA_TOT_PREM_BC = c.PA_TOT_PREM_BC,
                    PA_TOT_PREM_FC = c.PA_TOT_PREM_FC,
                    PA_TXN_STATUS = c.PA_TXN_STATUS,
                    PA_WEEKLY_BENEFIT = c.PA_WEEKLY_BENEFIT,
                    PA_UW_YEAR = c.PA_UW_YEAR,
                    PA_WEEKS = c.PA_WEEKS,
                    PA_RETRO_DATE = c.PA_RETRO_DATE,
                    PA_START_DATE = c.PA_START_DATE,
                    PA_CRTE_BY = c.PA_CRTE_BY,
                    PA_CRTE_DATE = c.PA_CRTE_DATE,
                    PA_MOD_BY = c.PA_MOD_BY,
                    PA_MOD_DATE = c.PA_MOD_DATE,
                    PA_STATUS = c.PA_STATUS,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
        public static INS_UDW_LIABILITY get_riskd(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_LIABILITY where c.LIA_SYS_ID == code select c).ToList().Select(c => new INS_UDW_LIABILITY
                {
                    LIA_SYS_ID = c.LIA_SYS_ID,
                    LIA_AREA_CODE = c.LIA_AREA_CODE,
                    LIA_AREA_NAME = c.LIA_AREA_NAME,
                    LIA_REG_CODE = c.LIA_REG_CODE,
                    LIA_REG_NAME = c.LIA_REG_NAME,
                    LIA_LOC_CODE = c.LIA_LOC_CODE,
                    LIA_LOC_NAME = c.LIA_LOC_NAME,
                    LIA_LOC_ADDRS = c.LIA_LOC_ADDRS,
                    LIA_EARTHQ_ZONE = c.LIA_EARTHQ_ZONE,
                    LIA_ITEM = c.LIA_ITEM,
                    LIA_ITEM_DESC = c.LIA_ITEM_DESC,
                    LIA_AGGRET_LIMIT_BC = c.LIA_AGGRET_LIMIT_BC,
                    LIA_AGGRET_LIMIT_FC = c.LIA_AGGRET_LIMIT_FC,
                    LIA_LIMIT_OCCUR_BC = c.LIA_LIMIT_OCCUR_BC,
                    LIA_LIMIT_OCCUR_FC = c.LIA_LIMIT_OCCUR_FC,
                    LIA_PREMIUM_FC = c.LIA_PREMIUM_FC,
                    LIA_PREMIUM_BC = c.LIA_PREMIUM_BC,
                    LIA_CURRENCY_RATE = c.LIA_CURRENCY_RATE,
                    LIA_CURRENCY = c.LIA_CURRENCY,
                    LIA_TOT_PREM_FC = c.LIA_TOT_PREM_FC,
                    LIA_SI_BC = c.LIA_SI_BC,
                    LIA_SI_FC = c.LIA_SI_FC,
                    LIA_RISK_PREM_BC = c.LIA_RISK_PREM_BC,
                    LIA_RISK_PREM_FC = c.LIA_RISK_PREM_FC,
                    LIA_ADJ_PREM_BC = c.LIA_ADJ_PREM_BC,
                    LIA_ADJ_PREM_FC = c.LIA_ADJ_PREM_FC,
                    LIA_DISC_BC = c.LIA_DISC_BC,
                    LIA_DISC_FC = c.LIA_DISC_FC,
                    LIA_LOAD_BC = c.LIA_LOAD_BC,
                    LIA_LOAD_FC = c.LIA_LOAD_FC,
                    LIA_COMP_FEE_BC = c.LIA_COMP_FEE_BC,
                    LIA_COMP_FEE_FC = c.LIA_COMP_FEE_FC,
                    LIA_COMMISSION_BC = c.LIA_COMMISSION_BC,
                    LIA_COMMISSION_FC = c.LIA_COMMISSION_FC,
                    LIA_TXN_STATUS = c.LIA_TXN_STATUS,
                    LIA_RISK_STATE = c.LIA_RISK_STATE,
                    LIA_RISK_ID = c.LIA_RISK_ID,
                    LIA_POLH_END_NO = c.LIA_POLH_END_NO,
                    LIA_PDT_CODE = c.LIA_PDT_CODE,
                    LIA_CVR_CODE = c.LIA_CVR_CODE,
                    LIA_RENEWAL_STATUS = c.LIA_RENEWAL_STATUS,
                    LIA_END_TYPE = c.LIA_END_TYPE,
                    LIA_CRTE_BY = c.LIA_CRTE_BY,
                    LIA_MOD_BY = c.LIA_MOD_BY,
                    LIA_STATUS = c.LIA_STATUS,
                    LIA_PERIOD_DAYS = c.LIA_PERIOD_DAYS,
                    LIA_UW_YEAR = c.LIA_UW_YEAR,
                    LIA_RI_SI_BC = c.LIA_RI_SI_BC,
                    LIA_RI_SI_FC = c.LIA_RI_SI_FC,
                    LIA_RI_PREM_BC = c.LIA_RI_PREM_BC,
                    LIA_RI_PREM_FC = c.LIA_RI_PREM_FC,
                    LIA_START_DATE = c.LIA_START_DATE,
                    LIA_END_DATE = c.LIA_END_DATE,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
예제 #3
0
        public static INS_UDW_GA_PROF_INDEMNITY get_ga(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_GA_PROF_INDEMNITY where c.PRO_SYS_ID == code select c).ToList().Select(c => new INS_UDW_GA_PROF_INDEMNITY
                {
                    PRO_SYS_ID = c.PRO_SYS_ID,
                    PRO_RISK_ID = c.PRO_RISK_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_FC = c.PRO_AGGRET_LIMIT_FC,
                    PRO_AGGRET_LIMIT_BC = c.PRO_AGGRET_LIMIT_BC,
                    PRO_LIMIT_OCCUR_FC = c.PRO_LIMIT_OCCUR_FC,
                    PRO_LIMIT_OCCUR_BC = c.PRO_LIMIT_OCCUR_BC,
                    PRO_ACCT_DATE = c.PRO_ACCT_DATE,
                    PRO_ADJ_PREM_BC = c.PRO_ADJ_PREM_BC,
                    PRO_ADJ_PREM_FC = c.PRO_ADJ_PREM_FC,
                    PRO_APPROVE_DATE = c.PRO_APPROVE_DATE,
                    PRO_COMMISSION_BC = c.PRO_COMMISSION_BC,
                    PRO_COMMISSION_FC = c.PRO_COMMISSION_FC,
                    PRO_COMP_FEE_BC = c.PRO_COMP_FEE_BC,
                    PRO_COMP_FEE_FC = c.PRO_COMP_FEE_FC,
                    PRO_CURRENCY = c.PRO_CURRENCY,
                    PRO_CURR_RATE = c.PRO_CURR_RATE,
                    PRO_CVR_CODE = c.PRO_CVR_CODE,
                    PRO_DISC_BC = c.PRO_DISC_BC,
                    PRO_DISC_FC = c.PRO_DISC_FC,
                    PRO_LOAD_BC = c.PRO_LOAD_BC,
                    PRO_LOAD_FC = c.PRO_LOAD_FC,
                    PRO_PERIOD_DAYS = c.PRO_PERIOD_DAYS,
                    PRO_POLH_DOC_NO = c.PRO_POLH_DOC_NO,
                    PRO_PREM_BC = c.PRO_PREM_BC,
                    PRO_RISK_PREM_BC = c.PRO_RISK_PREM_BC,
                    PRO_RISK_PREM_FC = c.PRO_RISK_PREM_FC,
                    PRO_SI_BC = c.PRO_SI_BC,
                    PRO_SI_FC = c.PRO_SI_FC,
                    PRO_RI_SI_BC = c.PRO_RI_SI_BC,
                    PRO_RI_SI_FC = c.PRO_RI_SI_FC,
                    PRO_TOT_PREM_BC = c.PRO_TOT_PREM_BC,
                    PRO_TOT_PREM_FC = c.PRO_TOT_PREM_FC,
                    PRO_RENEWAL_STATUS = c.PRO_RENEWAL_STATUS,
                    PRO_RISK_NO = c.PRO_RISK_NO,
                    PRO_RISK_STATE = c.PRO_RISK_STATE,
                    PRO_RI_PREM_BC = c.PRO_RI_PREM_BC,
                    PRO_TXN_STATUS = c.PRO_TXN_STATUS,
                    PRO_START_DATE = c.PRO_START_DATE,
                    PRO_RI_PREM_FC = c.PRO_RI_PREM_FC,
                    PRO_PDT_CODE = c.PRO_PDT_CODE,
                    PRO_UW_YEAR = c.PRO_UW_YEAR,
                    PRO_PREM_FC = c.PRO_PREM_FC,
                    PRO_LIMIT_LOSS = c.PRO_LIMIT_LOSS,
                    PRO_ANN_TURNOVER = c.PRO_ANN_TURNOVER,
                    PRO_CRTE_BY = c.PRO_CRTE_BY,
                    PRO_CRTE_DATE = c.PRO_CRTE_DATE,
                    PRO_STATUS = c.PRO_STATUS,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
예제 #4
0
        public static INS_UDW_TRAVEL_RISK get_traveller(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_TRAVEL_RISK where c.TRA_SYS_ID == code select c).ToList().Select(c => new INS_UDW_TRAVEL_RISK
                {
                    TRA_SYS_ID = c.TRA_SYS_ID,
                    TRA_POLH_SYS_ID = c.TRA_POLH_SYS_ID,
                    TRA_POLH_DOC_NO = c.TRA_POLH_DOC_NO,
                    TRA_POLH_END_NO = c.TRA_POLH_END_NO,
                    TRA_FULL_NAME = c.TRA_FULL_NAME,
                    TRA_DOB = c.TRA_DOB,
                    TRA_AGE = c.TRA_AGE,
                    TRA_GENDER = c.TRA_GENDER,
                    TRA_OCCUPATION = c.TRA_OCCUPATION,
                    TRA_NATIONALITY = c.TRA_NATIONALITY,
                    TRA_NATIONAL_ID = c.TRA_NATIONAL_ID,
                    TRA_PASSPORT_NO = c.TRA_PASSPORT_NO,
                    TRA_ISSUING_CTY = c.TRA_ISSUING_CTY,
                    TRA_EXPIRY_DATE = c.TRA_EXPIRY_DATE,
                    TRA_COUNTRY_VISIT = c.TRA_COUNTRY_VISIT,
                    TRA_DESTIN_ADDRESS = c.TRA_DESTIN_ADDRESS,
                    TRA_DESTIN_PHONE = c.TRA_DESTIN_PHONE,
                    TRA_BENFI_NAME = c.TRA_BENFI_NAME,
                    TRA_RELATIONSHIP = c.TRA_RELATIONSHIP,
                    TRA_CONTACT = c.TRA_CONTACT,
                    TRA_DECLARATION = c.TRA_DECLARATION,
                    TRA_DECLARATION_DTS = c.TRA_DECLARATION_DTS,
                    TRA_RISK_PREM_FC = c.TRA_RISK_PREM_FC,
                    TRA_RISK_PREM_BC = c.TRA_RISK_PREM_BC,
                    TRA_ADJ_PREM_FC = c.TRA_ADJ_PREM_FC,
                    TRA_ADJ_PREM_BC = c.TRA_ADJ_PREM_BC,
                    TRA_DISC_FC = c.TRA_DISC_FC,
                    TRA_DISC_BC = c.TRA_DISC_BC,
                    TRA_LOAD_FC = c.TRA_LOAD_FC,
                    TRA_LOAD_BC = c.TRA_LOAD_BC,
                    TRA_COMP_FEE_FC = c.TRA_COMP_FEE_FC,
                    TRA_COMP_FEE_BC = c.TRA_COMP_FEE_BC,
                    TRA_COMMISSION_FC = c.TRA_COMMISSION_FC,
                    TRA_COMMISSION_BC = c.TRA_COMMISSION_BC,
                    TRA_TXN_STATUS = c.TRA_TXN_STATUS,
                    TRA_RISK_STATE = c.TRA_RISK_STATE,
                    TRA_RISK_NO = c.TRA_RISK_NO,
                    TRA_PDT_CODE = c.TRA_PDT_CODE,
                    TRA_CVR_CODE = c.TRA_CVR_CODE,
                    TRA_RENEWAL_STATUS = c.TRA_RENEWAL_STATUS,
                    TRA_END_TYPE = c.TRA_END_TYPE,
                    TRA_APPROVE_DATE = c.TRA_APPROVE_DATE,
                    TRA_ACCT_DATE = c.TRA_ACCT_DATE,
                    TRA_CRTE_BY = c.TRA_CRTE_BY,
                    TRA_CRTE_DATE = c.TRA_CRTE_DATE,
                    TRA_MOD_BY = c.TRA_MOD_BY,
                    TRA_MOD_DATE = c.TRA_MOD_DATE,
                    TRA_STATUS = c.TRA_STATUS,
                    TRA_SI_FC = c.TRA_SI_FC,
                    TRA_SI_BC = c.TRA_SI_BC,
                    TRA_TOT_PREM_FC = c.TRA_TOT_PREM_FC,
                    TRA_TOT_PREM_BC = c.TRA_TOT_PREM_BC,
                    TRA_POL_CANCELLED = c.TRA_POL_CANCELLED,
                    TRA_CANCELLED_REASON = c.TRA_CANCELLED_REASON,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
예제 #5
0
        public static INS_UDW_ENG_OTHER get_risk(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_ENG_OTHER where c.ENG_OTHER_SYS_ID == code select c).ToList().Select(c => new INS_UDW_ENG_OTHER
                {
                    ENG_OTHER_SYS_ID = c.ENG_OTHER_SYS_ID,
                    ENG_OTHER_POLH_SYS_ID = c.ENG_OTHER_POLH_SYS_ID,
                    ENG_OTHER_POLH_DOC_NO = c.ENG_OTHER_POLH_DOC_NO,
                    ENG_OTHER_POLH_END_NO = c.ENG_OTHER_POLH_END_NO,
                    ENG_OTHER_ACCT_DATE = c.ENG_OTHER_ACCT_DATE,
                    ENG_OTHER_ADJ_PREM_BC = c.ENG_OTHER_ADJ_PREM_BC,
                    ENG_OTHER_ADJ_PREM_FC = c.ENG_OTHER_ADJ_PREM_FC,
                    ENG_OTHER_CAP = c.ENG_OTHER_CAP,
                    ENG_OTHER_APPROVE_DATE = c.ENG_OTHER_APPROVE_DATE,
                    ENG_OTHER_COMMISSION_BC = c.ENG_OTHER_COMMISSION_BC,
                    ENG_OTHER_COMMISSION_FC = c.ENG_OTHER_COMMISSION_FC,
                    ENG_OTHER_COMP_FEE_BC = c.ENG_OTHER_COMP_FEE_BC,
                    ENG_OTHER_COMP_FEE_FC = c.ENG_OTHER_COMP_FEE_FC,
                    ENG_OTHER_CRTE_BY = c.ENG_OTHER_CRTE_BY,
                    ENG_OTHER_CRTE_DATE = c.ENG_OTHER_CRTE_DATE,
                    ENG_OTHER_CURRENCY = c.ENG_OTHER_CURRENCY,
                    ENG_OTHER_CURRENCY_RATE = c.ENG_OTHER_CURRENCY_RATE,
                    ENG_OTHER_CVR_CODE = c.ENG_OTHER_CVR_CODE,
                    ENG_OTHER_DESC = c.ENG_OTHER_DESC,
                    ENG_OTHER_DISC_BC = c.ENG_OTHER_DISC_BC,
                    ENG_OTHER_DISC_FC = c.ENG_OTHER_DISC_FC,
                    ENG_OTHER_END_DATE = c.ENG_OTHER_END_DATE,
                    ENG_OTHER_END_TYPE = c.ENG_OTHER_END_TYPE,
                    ENG_OTHER_ESCL = c.ENG_OTHER_ESCL,
                    ENG_OTHER_FUNDT_BC = c.ENG_OTHER_FUNDT_BC,
                    ENG_OTHER_FUNDT_FC = c.ENG_OTHER_FUNDT_FC,
                    ENG_OTHER_LOAD_BC = c.ENG_OTHER_LOAD_BC,
                    ENG_OTHER_LOAD_FC = c.ENG_OTHER_LOAD_FC,
                    ENG_OTHER_LOC = c.ENG_OTHER_LOC,
                    ENG_OTHER_MANUF = c.ENG_OTHER_MANUF,
                    ENG_OTHER_MANUF_YR = c.ENG_OTHER_MANUF_YR,
                    ENG_OTHER_MK_MODEL = c.ENG_OTHER_MK_MODEL,
                    ENG_OTHER_MOD_BY = c.ENG_OTHER_MOD_BY,
                    ENG_OTHER_MOD_DATE = c.ENG_OTHER_MOD_DATE,
                    ENG_OTHER_OBJECT = c.ENG_OTHER_OBJECT,
                    ENG_OTHER_OBJECT_NAME = c.ENG_OTHER_OBJECT_NAME,
                    ENG_OTHER_PDT_CODE = c.ENG_OTHER_PDT_CODE,
                    ENG_OTHER_PERIOD_DAYS = c.ENG_OTHER_PERIOD_DAYS,
                    ENG_OTHER_PREMIUM_BC = c.ENG_OTHER_PREMIUM_BC,
                    ENG_OTHER_PREMIUM_FC = c.ENG_OTHER_PREMIUM_FC,
                    ENG_OTHER_RENEWAL_STATUS = c.ENG_OTHER_RENEWAL_STATUS,
                    ENG_OTHER_RISK_ID = c.ENG_OTHER_RISK_ID,
                    ENG_OTHER_RISK_NO = c.ENG_OTHER_RISK_NO,
                    ENG_OTHER_RISK_PREM_BC = c.ENG_OTHER_RISK_PREM_BC,
                    ENG_OTHER_RISK_PREM_FC = c.ENG_OTHER_RISK_PREM_FC,
                    ENG_OTHER_RISK_STATE = c.ENG_OTHER_RISK_STATE,
                    ENG_OTHER_RI_PREM_BC = c.ENG_OTHER_RI_PREM_BC,
                    ENG_OTHER_RI_PREM_FC = c.ENG_OTHER_RI_PREM_FC,
                    ENG_OTHER_RI_SI_BC = c.ENG_OTHER_RI_SI_BC,
                    ENG_OTHER_RI_SI_FC = c.ENG_OTHER_RI_SI_FC,
                    ENG_OTHER_SERL_NO = c.ENG_OTHER_SERL_NO,
                    ENG_OTHER_SI_BC = c.ENG_OTHER_SI_BC,
                    ENG_OTHER_SI_FC = c.ENG_OTHER_SI_FC,
                    ENG_OTHER_START_DATE = c.ENG_OTHER_START_DATE,
                    ENG_OTHER_STATUS = c.ENG_OTHER_STATUS,
                    ENG_OTHER_STND_BY = c.ENG_OTHER_STND_BY,
                    ENG_OTHER_SUM_INSURED_BC = c.ENG_OTHER_SUM_INSURED_BC,
                    ENG_OTHER_SUM_INSURED_FC = c.ENG_OTHER_SUM_INSURED_FC,
                    ENG_OTHER_TOT_PREM_BC = c.ENG_OTHER_TOT_PREM_BC,
                    ENG_OTHER_TOT_PREM_FC = c.ENG_OTHER_TOT_PREM_FC,
                    ENG_OTHER_TRANSF_BC = c.ENG_OTHER_TRANSF_BC,
                    ENG_OTHER_TRANSF_FC = c.ENG_OTHER_TRANSF_FC,
                    ENG_OTHER_TXN_STATUS = c.ENG_OTHER_TXN_STATUS,
                    ENG_OTHER_UW_YEAR = c.ENG_OTHER_UW_YEAR,

                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
예제 #6
0
        public static INS_UDW_BONDS get_bond(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_BONDS where c.BOND_SYS_ID == code select c).ToList().Select(c => new INS_UDW_BONDS
                {
                    BOND_SYS_ID = c.BOND_SYS_ID,
                    BOND_DESCRIPTION = c.BOND_DESCRIPTION,
                    BOND_PRINCIPAL = c.BOND_PRINCIPAL,
                    BOND_SUM_INSURED = c.BOND_SUM_INSURED,
                    BOND_PREMIUM_FC = c.BOND_PREMIUM_FC,
                    BOND_CURRENCY = c.BOND_CURRENCY,
                    BOND_CURRENCY_RATE = c.BOND_CURRENCY_RATE,
                    BOND_TOT_PREM_FC = c.BOND_TOT_PREM_FC,
                    BOND_TOT_PREM_BC = c.BOND_TOT_PREM_BC,
                    BOND_SI_FC = c.BOND_SI_FC,
                    BOND_SI_BC = c.BOND_SI_BC,
                    BOND_RISK_PREM_FC = c.BOND_RISK_PREM_FC,
                    BOND_RISK_PREM_BC = c.BOND_RISK_PREM_BC,
                    BOND_ADJ_PREM_FC = c.BOND_ADJ_PREM_FC,
                    BOND_ADJ_PREM_BC = c.BOND_ADJ_PREM_BC,
                    BOND_DISC_FC = c.BOND_DISC_FC,
                    BOND_DISC_BC = c.BOND_DISC_BC,
                    BOND_LOAD_FC = c.BOND_LOAD_FC,
                    BOND_LOAD_BC = c.BOND_LOAD_BC,
                    BOND_COMP_FEE_FC = c.BOND_COMP_FEE_FC,
                    BOND_COMP_FEE_BC = c.BOND_COMP_FEE_BC,
                    BOND_COMMISSION_FC = c.BOND_COMMISSION_FC,
                    BOND_COMMISSION_BC = c.BOND_COMMISSION_BC,
                    BOND_TXN_STATUS = c.BOND_TXN_STATUS,
                    BOND_RISK_STATE = c.BOND_RISK_STATE,
                    BOND_RISK_ID = c.BOND_RISK_ID,
                    BOND_POLH_END_NO = c.BOND_POLH_END_NO,
                    BOND_PDT_CODE = c.BOND_PDT_CODE,
                    BOND_CVR_CODE = c.BOND_CVR_CODE,
                    BOND_RENEWAL_STATUS = c.BOND_RENEWAL_STATUS,
                    BOND_END_TYPE = c.BOND_END_TYPE,
                    BOND_CRTE_BY = c.BOND_CRTE_BY,
                    BOND_MOD_BY = c.BOND_MOD_BY,
                    BOND_STATUS = c.BOND_STATUS,
                    BOND_PERIOD_DAYS = c.BOND_PERIOD_DAYS,
                    BOND_UW_YEAR = c.BOND_UW_YEAR,
                    BOND_RI_SI_FC = c.BOND_RI_SI_FC,
                    BOND_RI_SI_BC = c.BOND_RI_SI_BC,
                    BOND_RI_PREM_FC = c.BOND_RI_PREM_FC,
                    BOND_RI_PREM_BC = c.BOND_RI_PREM_BC,
                    BOND_START_DATE = c.BOND_START_DATE,
                    BOND_END_DATE = c.BOND_END_DATE,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
예제 #7
0
        public static INS_UWD_FIRE_LOCINT get_fire_locint(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from v in db.INS_UWD_FIRE_LOCINT where v.LINT_SYS_ID == code select v).ToList().Select(v => new INS_UWD_FIRE_LOCINT
                {
                    LINT_SYS_ID = v.LINT_SYS_ID,
                    LINT_PLOC_SYS_ID = v.LINT_PLOC_SYS_ID,
                    LINT_POLH_SYS_ID = v.LINT_POLH_SYS_ID,
                    LINT_POLH_DOC_NO = v.LINT_POLH_DOC_NO,
                    LINT_POLH_END_NO = v.LINT_POLH_END_NO,
                    LINT_RISK_CODE = v.LINT_RISK_CODE,
                    LINT_RISK_NAME = v.LINT_RISK_NAME,
                    LINT_RISK_NO = v.LINT_RISK_NO,
                    LINT_DESC = v.LINT_DESC,
                    LINT_SI_FC = v.LINT_SI_FC,
                    LINT_SI_BC = v.LINT_SI_BC,
                    LINT_PRM_FC = v.LINT_PRM_FC,
                    LINT_PRM_BC = v.LINT_PRM_BC,
                    LINT_DISC_BC = v.LINT_DISC_BC,
                    LINT_DISC_FC = v.LINT_DISC_FC,
                    LINT_LOAD_BC = v.LINT_LOAD_BC,
                    LINT_LOAD_FC = v.LINT_LOAD_FC,
                    LINT_CONS_TYPE = v.LINT_CONS_TYPE,
                    LINT_EML_SI = v.LINT_EML_SI,
                    LINT_RI_EML = v.LINT_RI_EML,
                    LINT_SUBCONST = v.LINT_SUBCONST,
                    LINT_PLIN_FOUND = v.LINT_PLIN_FOUND,
                    LINT_PLIN_FOUND_AMT = v.LINT_PLIN_FOUND_AMT,
                    LINT_ESCALATION = v.LINT_ESCALATION,
                    LINT_ESC_PERC = v.LINT_ESC_PERC,
                    LINT_TXN_STATUS = v.LINT_TXN_STATUS,
                    LINT_RISK_STATE = v.LINT_RISK_STATE,
                    LINT_STATUS = v.LINT_STATUS,
                    INS_UWD_RISK_COVERS = v.INS_UWD_RISK_COVERS != null ? v.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
        public static INS_UWD_VEHICLE_RISK get_motor(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UWD_VEHICLE_RISK where c.VEH_SYS_ID == code select c).ToList().Select(c => new INS_UWD_VEHICLE_RISK
                {
                    VEH_SYS_ID = c.VEH_SYS_ID,
                    VEH_POLH_SYS_ID = c.VEH_POLH_SYS_ID,
                    VEH_POLH_DOC_NO = c.VEH_POLH_DOC_NO,
                    VEH_POLH_END_NO = c.VEH_POLH_END_NO,
                    VEH_RISK_NO = c.VEH_RISK_NO,
                    VEH_RISK_CODE = c.VEH_RISK_CODE,
                    VEH_ISSUE_DATE = c.VEH_ISSUE_DATE,
                    VEH_RETROS_DATE = c.VEH_RETROS_DATE,
                    VEH_START_DATE = c.VEH_START_DATE,
                    VEH_END_DATE = c.VEH_END_DATE,
                    VEH_PERIOD_DAYS = c.VEH_PERIOD_DAYS,

                    VEH_CURRENCY = c.VEH_CURRENCY,
                    VEH_CURR_RATE = c.VEH_CURR_RATE,
                    VEH_PRODUCT_CODE = c.VEH_PRODUCT_CODE,
                    VEH_COVER_CODE = c.VEH_COVER_CODE,
                    VEH_USAGE_CODE = c.VEH_USAGE_CODE,
                    VEH_VEH_REG_NO = c.VEH_VEH_REG_NO,
                    VEH_MAKE = c.VEH_MAKE,
                    VEH_MODEL = c.VEH_MODEL,
                    VEH_BODY_TYPE = c.VEH_BODY_TYPE,
                    VEH_MANUFACTURE_YR = c.VEH_MANUFACTURE_YR,

                    VEH_CHASSIS_NO = c.VEH_CHASSIS_NO,
                    VEH_CUBIC_CAP = c.VEH_CUBIC_CAP,
                    VEH_PASSENGERS = c.VEH_PASSENGERS,
                    VEH_EXCESS_APP = c.VEH_EXCESS_APP,
                    VEH_EXCESS_PERC = c.VEH_EXCESS_PERC,
                    VEH_EXCESS_MIN = c.VEH_EXCESS_MIN,
                    VEH_EXCESS_MAX = c.VEH_EXCESS_MAX,
                    VEH_EXCESS_FIX = c.VEH_EXCESS_FIX,
                    VEH_EXTRA_TPPD = c.VEH_EXTRA_TPPD,
                    VEH_TP_INTEREST = c.VEH_TP_INTEREST,

                    VEH_TP_DETAILS = c.VEH_TP_DETAILS,
                    VEH_PROP_DECLINED = c.VEH_PROP_DECLINED,
                    VEH_DECLINED_REASON = c.VEH_DECLINED_REASON,
                    VEH_POL_CANCELLED = c.VEH_POL_CANCELLED,
                    VEH_CANCELLED_REASON = c.VEH_CANCELLED_REASON,
                    VEH_SI_FC = c.VEH_SI_FC,
                    VEH_SI_BC = c.VEH_SI_BC,
                    VEH_TOT_PREM_FC = c.VEH_TOT_PREM_FC,
                    VEH_TOT_PREM_BC = c.VEH_TOT_PREM_BC,
                    VEH_RI_APPLICABLE = c.VEH_RI_APPLICABLE,

                    VEH_RI_EFF_DATE = c.VEH_RI_EFF_DATE,
                    VEH_RI_SI_FC = c.VEH_RI_SI_FC,
                    VEH_RI_SI_BC = c.VEH_RI_SI_BC,
                    VEH_RI_PREM_FC = c.VEH_RI_PREM_FC,
                    VEH_RI_PREM_BC = c.VEH_RI_PREM_BC,
                    VEH_RISK_PREM_FC = c.VEH_RISK_PREM_FC,
                    VEH_TP_PREM_BC = c.VEH_TP_PREM_BC,
                    VEH_ADJ_PREM_FC = c.VEH_ADJ_PREM_FC,
                    VEH_ADJ_PREM_BC = c.VEH_ADJ_PREM_BC,
                    VEH_DISC_FC = c.VEH_DISC_FC,
                    VEH_ADD_TPPD = c.VEH_ADD_TPPD,
                    VEH_UW_YEAR = c.VEH_UW_YEAR,
                    VEH_DISC_BC = c.VEH_DISC_BC,
                    VEH_LOAD_FC = c.VEH_LOAD_FC,
                    VEH_LOAD_BC = c.VEH_LOAD_BC,
                    VEH_COMP_FEE_FC = c.VEH_COMP_FEE_FC,
                    VEH_COMP_FEE_BC = c.VEH_COMP_FEE_BC,
                    VEH_COMMISSION_FC = c.VEH_COMMISSION_FC,
                    VEH_COMMISSION_BC = c.VEH_COMMISSION_BC,
                    VEH_TXN_STATUS = c.VEH_TXN_STATUS,
                    VEH_RISK_STATE = c.VEH_RISK_STATE,
                    VEH_RENEWAL_STATUS = c.VEH_RENEWAL_STATUS,

                    VEH_END_TYPE = c.VEH_END_TYPE,
                    VEH_APPROVE_DATE = c.VEH_APPROVE_DATE,
                    VEH_ACCT_DATE = c.VEH_ACCT_DATE,
                    VEH_CRTE_BY = c.VEH_CRTE_BY,
                    VEH_CRTE_DATE = c.VEH_CRTE_DATE,
                    VEH_MOD_BY = c.VEH_MOD_BY,
                    VEH_MOD_DATE = c.VEH_MOD_DATE,
                    VEH_STATUS = c.VEH_STATUS,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null,
                    MS_UDW_MOTOR_RISK = MotorRiskMdl.get_motor_risk(c.VEH_RISK_CODE.ToString()),
                    MS_UDW_MAKE = MakeMdl.get_make(c.VEH_MAKE.ToString()),
                    MS_UDW_MAKE_MODEL = MakeModelMdl.get_makemodel(c.VEH_MODEL.ToString())
                }).Single());
            }
            catch (Exception e)
            {
                var exception = e;
                return(null);
            }
        }
        public static INS_UDW_GA_TRANSIT get_ga(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_GA_TRANSIT where c.TRANS_SYS_ID == code select c).ToList().Select(c => new INS_UDW_GA_TRANSIT
                {
                    TRANS_SYS_ID = c.TRANS_SYS_ID,
                    TRANS_RISK_ID = c.TRANS_RISK_ID,
                    TRANS_POLH_SYS_ID = c.TRANS_POLH_SYS_ID,
                    TRANS_POLH_END_NO = c.TRANS_POLH_END_NO,
                    TRANS_AREA_CODE = c.TRANS_AREA_CODE,
                    TRANS_AREA_NAME = c.TRANS_AREA_NAME,
                    TRANS_REGION_CODE = c.TRANS_REGION_CODE,
                    TRANS_REGION_NAME = c.TRANS_REGION_NAME,
                    TRANS_LOC_CODE = c.TRANS_LOC_CODE,
                    TRANS_LOC_NAME = c.TRANS_LOC_NAME,
                    TRANS_LOC_ADDRS = c.TRANS_LOC_ADDRS,
                    TRANS_LOC_DESC = c.TRANS_LOC_DESC,
                    TRANS_ADJ_PREM_BC = c.TRANS_ADJ_PREM_BC,
                    TRANS_ADJ_PREM_FC = c.TRANS_ADJ_PREM_FC,
                    TRANS_ANN_TURNOVER_BC = c.TRANS_ANN_TURNOVER_BC,
                    TRANS_ANN_TURNOVER_FC = c.TRANS_ANN_TURNOVER_FC,
                    TRANS_COMMISSION_BC = c.TRANS_COMMISSION_BC,
                    TRANS_COMMISSION_FC = c.TRANS_COMMISSION_FC,
                    TRANS_CURRENCY = c.TRANS_CURRENCY,
                    TRANS_CURR_RATE = c.TRANS_CURR_RATE,
                    TRANS_CVR_CODE = c.TRANS_CVR_CODE,
                    TRANS_DISC_BC = c.TRANS_DISC_BC,
                    TRANS_DISC_FC = c.TRANS_DISC_FC,
                    TRANS_LOAD_BC = c.TRANS_LOAD_BC,
                    TRANS_LOAD_FC = c.TRANS_LOAD_FC,
                    TRANS_PERIOD_DAYS = c.TRANS_PERIOD_DAYS,
                    TRANS_POLH_DOC_NO = c.TRANS_POLH_DOC_NO,
                    TRANS_PREMIUM_BC = c.TRANS_PREMIUM_BC,
                    TRANS_PREMIUM_FC = c.TRANS_PREMIUM_FC,
                    TRANS_RISK_PREM_BC = c.TRANS_RISK_PREM_BC,
                    TRANS_RISK_PREM_FC = c.TRANS_RISK_PREM_FC,
                    TRANS_SI_BC = c.TRANS_SI_BC,
                    TRANS_SI_FC = c.TRANS_SI_FC,
                    TRANS_RI_SI_BC = c.TRANS_RI_SI_BC,
                    TRANS_RI_SI_FC = c.TRANS_RI_SI_FC,
                    TRANS_TOT_PREM_BC = c.TRANS_TOT_PREM_BC,
                    TRANS_TOT_PREM_FC = c.TRANS_TOT_PREM_FC,
                    TRANS_RENEWAL_STATUS = c.TRANS_RENEWAL_STATUS,
                    TRANS_RISK_NO = c.TRANS_RISK_NO,
                    TRANS_RISK_STATE = c.TRANS_RISK_STATE,
                    TRANS_RI_PREM_BC = c.TRANS_RI_PREM_BC,
                    TRANS_TXN_STATUS = c.TRANS_TXN_STATUS,
                    TRANS_START_DATE = c.TRANS_START_DATE,
                    TRANS_RISK_NAME = c.TRANS_RISK_NAME,
                    TRANS_DISTANCE = c.TRANS_DISTANCE,
                    TRANS_DENT_FROM = c.TRANS_DENT_FROM,
                    TRANS_DENT_T0 = c.TRANS_DENT_T0,
                    TRANS_EARTHQ_ZONE = c.TRANS_EARTHQ_ZONE,
                    TRANS_LIMIT_LOSS_BC = c.TRANS_LIMIT_LOSS_BC,
                    TRANS_LIMIT_LOSS_FC = c.TRANS_LIMIT_LOSS_FC,
                    TRANS_PDT_CODE = c.TRANS_PDT_CODE,
                    TRANS_COMP_FEE_BC = c.TRANS_COMP_FEE_BC,
                    TRANS_COMP_FEE_FC = c.TRANS_COMP_FEE_FC,
                    TRANS_RI_PREM_FC = c.TRANS_RI_PREM_FC,
                    TRANS_SUM_INSURED_BC = c.TRANS_SUM_INSURED_BC,
                    TRANS_SUM_INSURED_FC = c.TRANS_SUM_INSURED_FC,
                    TRANS_ACCT_DATE = c.TRANS_ACCT_DATE,
                    TRANS_UW_YEAR = c.TRANS_UW_YEAR,
                    TRANS_RISK_TYPE = c.TRANS_RISK_TYPE,
                    TRANS_END_DATE = c.TRANS_END_DATE,
                    TRANS_END_TYPE = c.TRANS_END_TYPE,
                    TRANS_CRTE_BY = c.TRANS_CRTE_BY,
                    TRANS_CRTE_DATE = c.TRANS_CRTE_DATE,
                    TRANS_STATUS = c.TRANS_STATUS,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
        public static INS_UDW_HOME_OWNERS get_homeowner(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_HOME_OWNERS where c.HOP_SYS_ID == code select c).ToList().Select(c => new INS_UDW_HOME_OWNERS
                {
                    HOP_SYS_ID = c.HOP_SYS_ID,
                    HOP_POLH_SYS_ID = c.HOP_POLH_SYS_ID,
                    HOP_SEC_CODE = c.HOP_SEC_CODE,
                    HOP_SEC_NAME = c.HOP_SEC_NAME,
                    HOP_DESC = c.HOP_DESC,
                    HOP_LOC_CODE = c.HOP_LOC_CODE,
                    HOP_LOC_NAME = c.HOP_LOC_NAME,
                    HOP_POLH_DOC_NO = c.HOP_POLH_DOC_NO,
                    HOP_GEO_LIM = c.HOP_GEO_LIM,
                    HOP_RIPML = c.HOP_RIPML,
                    HOP_PML = c.HOP_PML,
                    HOP_RISK_NO = c.HOP_RISK_NO,
                    HOP_ACCT_DATE = c.HOP_ACCT_DATE,
                    HOP_APPROVE_DATE = c.HOP_APPROVE_DATE,
                    HOP_SUM_INSURED_FC = c.HOP_SUM_INSURED_FC,
                    HOP_SUM_INSURED_BC = c.HOP_SUM_INSURED_BC,
                    HOP_PREMIUM_FC = c.HOP_PREMIUM_FC,
                    HOP_PREMIUM_BC = c.HOP_PREMIUM_BC,
                    HOP_CURRENCY = c.HOP_CURRENCY,
                    HOP_CURRENCY_RATE = c.HOP_CURRENCY_RATE,
                    HOP_TOT_PREM_FC = c.HOP_TOT_PREM_FC,
                    HOP_TOT_PREM_BC = c.HOP_TOT_PREM_BC,
                    HOP_SI_FC = c.HOP_SI_FC,
                    HOP_SI_BC = c.HOP_SI_BC,
                    HOP_RISK_PREM_FC = c.HOP_RISK_PREM_FC,
                    HOP_RISK_PREM_BC = c.HOP_RISK_PREM_BC,
                    HOP_ADJ_PREM_FC = c.HOP_ADJ_PREM_FC,
                    HOP_ADJ_PREM_BC = c.HOP_ADJ_PREM_BC,
                    HOP_DISC_FC = c.HOP_DISC_FC,
                    HOP_DISC_BC = c.HOP_DISC_BC,
                    HOP_LOAD_FC = c.HOP_LOAD_FC,
                    HOP_LOAD_BC = c.HOP_LOAD_BC,
                    HOP_COMP_FEE_FC = c.HOP_COMP_FEE_FC,
                    HOP_COMP_FEE_BC = c.HOP_COMP_FEE_BC,
                    HOP_COMMISSION_FC = c.HOP_COMMISSION_FC,
                    HOP_COMMISSION_BC = c.HOP_COMMISSION_BC,
                    HOP_TXN_STATUS = c.HOP_TXN_STATUS,
                    HOP_RISK_STATE = c.HOP_RISK_STATE,
                    HOP_RISK_ID = c.HOP_RISK_ID,
                    HOP_POLH_END_NO = c.HOP_POLH_END_NO,
                    HOP_PDT_CODE = c.HOP_PDT_CODE,
                    HOP_CVR_CODE = c.HOP_CVR_CODE,
                    HOP_RENEWAL_STATUS = c.HOP_RENEWAL_STATUS,
                    HOP_END_TYPE = c.HOP_END_TYPE,
                    HOP_CRTE_BY = c.HOP_CRTE_BY,
                    HOP_CRTE_DATE = c.HOP_CRTE_DATE,
                    HOP_MOD_BY = c.HOP_MOD_BY,
                    HOP_MOD_DATE = c.HOP_MOD_DATE,
                    HOP_STATUS = c.HOP_STATUS,
                    HOP_PERIOD_DAYS = c.HOP_PERIOD_DAYS,
                    HOP_UW_YEAR = c.HOP_UW_YEAR,
                    HOP_RI_SI_FC = c.HOP_RI_SI_FC,
                    HOP_RI_SI_BC = c.HOP_RI_SI_BC,
                    HOP_RI_PREM_FC = c.HOP_RI_PREM_FC,
                    HOP_RI_PREM_BC = c.HOP_RI_PREM_BC,
                    HOP_START_DATE = c.HOP_START_DATE,
                    HOP_END_DATE = c.HOP_END_DATE,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null,
                    INS_UDW_HOME_OWNERS_DETAILS = c.INS_UDW_HOME_OWNERS_DETAILS != null ? c.INS_UDW_HOME_OWNERS_DETAILS.Select(x => get_homeowners_details(x.HODT_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }
        public static INS_UDW_LIABILITY_WKS_COMP get_riskd(int code)
        {
            var db = new SibaModel();

            try
            {
                return((from c in db.INS_UDW_LIABILITY_WKS_COMP where c.LIAWOC_SYS_ID == code select c).ToList().Select(c => new INS_UDW_LIABILITY_WKS_COMP
                {
                    LIAWOC_SYS_ID = c.LIAWOC_SYS_ID,
                    LIAWOC_OBJECT = c.LIAWOC_OBJECT,
                    LIAWOC_OBJECT_NAME = c.LIAWOC_OBJECT_NAME,
                    LIAWOC_ADDRESS = c.LIAWOC_ADDRESS,
                    LIAWOC_FLOATER = c.LIAWOC_FLOATER,
                    LIAWOC_SAL_SLAB = c.LIAWOC_SAL_SLAB,
                    LIAWOC_GEO_LIM = c.LIAWOC_GEO_LIM,
                    LIAWOC_NO_PERSONS = c.LIAWOC_NO_PERSONS,
                    LIAWOC_NO_YEARS = c.LIAWOC_NO_YEARS,
                    LIAWOC_SAL_MONTH = c.LIAWOC_SAL_MONTH,
                    LIAWOC_ADD_MONTH_BENF = c.LIAWOC_ADD_MONTH_BENF,
                    LIAWOC_LABR_TYPE = c.LIAWOC_LABR_TYPE,
                    LIAWOC_ANN_WAGES_BC = c.LIAWOC_ANN_WAGES_BC,
                    LIAWOC_ANN_WAGES_FC = c.LIAWOC_ANN_WAGES_FC,
                    LIAWOC_PREMIUM_BC = c.LIAWOC_PREMIUM_BC,
                    LIAWOC_PREMIUM_FC = c.LIAWOC_PREMIUM_FC,
                    LIAWOC_CURRENCY = c.LIAWOC_CURRENCY,
                    LIAWOC_CURRENCY_RATE = c.LIAWOC_CURRENCY_RATE,
                    LIAWOC_TOT_PREM_BC = c.LIAWOC_TOT_PREM_BC,
                    LIAWOC_TOT_PREM_FC = c.LIAWOC_TOT_PREM_FC,
                    LIAWOC_SI_BC = c.LIAWOC_SI_BC,
                    LIAWOC_SI_FC = c.LIAWOC_SI_FC,
                    LIAWOC_RISK_PREM_BC = c.LIAWOC_RISK_PREM_BC,
                    LIAWOC_RISK_PREM_FC = c.LIAWOC_RISK_PREM_FC,
                    LIAWOC_ADJ_PREM_BC = c.LIAWOC_ADJ_PREM_BC,
                    LIAWOC_ADJ_PREM_FC = c.LIAWOC_ADJ_PREM_FC,
                    LIAWOC_DISC_BC = c.LIAWOC_DISC_BC,
                    LIAWOC_DISC_FC = c.LIAWOC_DISC_FC,
                    LIAWOC_LOAD_BC = c.LIAWOC_LOAD_BC,
                    LIAWOC_LOAD_FC = c.LIAWOC_LOAD_FC,
                    LIAWOC_COMP_FEE_BC = c.LIAWOC_COMP_FEE_BC,
                    LIAWOC_COMP_FEE_FC = c.LIAWOC_COMP_FEE_FC,
                    LIAWOC_COMMISSION_BC = c.LIAWOC_COMMISSION_BC,
                    LIAWOC_COMMISSION_FC = c.LIAWOC_COMMISSION_FC,
                    LIAWOC_TXN_STATUS = c.LIAWOC_TXN_STATUS,
                    LIAWOC_RISK_STATE = c.LIAWOC_RISK_STATE,
                    LIAWOC_RISK_ID = c.LIAWOC_RISK_ID,
                    LIAWOC_POLH_END_NO = c.LIAWOC_POLH_END_NO,
                    LIAWOC_PDT_CODE = c.LIAWOC_PDT_CODE,
                    LIAWOC_CVR_CODE = c.LIAWOC_CVR_CODE,
                    LIAWOC_RENEWAL_STATUS = c.LIAWOC_RENEWAL_STATUS,
                    LIAWOC_END_TYPE = c.LIAWOC_END_TYPE,
                    LIAWOC_CRTE_BY = c.LIAWOC_CRTE_BY,
                    LIAWOC_MOD_BY = c.LIAWOC_MOD_BY,
                    LIAWOC_STATUS = c.LIAWOC_STATUS,
                    LIAWOC_PERIOD_DAYS = c.LIAWOC_PERIOD_DAYS,
                    LIAWOC_UW_YEAR = c.LIAWOC_UW_YEAR,
                    LIAWOC_RI_SI_BC = c.LIAWOC_RI_SI_BC,
                    LIAWOC_RI_SI_FC = c.LIAWOC_RI_SI_FC,
                    LIAWOC_RI_PREM_BC = c.LIAWOC_RI_PREM_BC,
                    LIAWOC_RI_PREM_FC = c.LIAWOC_RI_PREM_FC,
                    LIAWOC_START_DATE = c.LIAWOC_START_DATE,
                    LIAWOC_END_DATE = c.LIAWOC_END_DATE,
                    INS_UWD_RISK_COVERS = c.INS_UWD_RISK_COVERS != null ? c.INS_UWD_RISK_COVERS.Select(x => PolicyRiskCovers.get_riskcovers(x.RCOV_SYS_ID)).ToList() : null
                }).Single());
            }
            catch (Exception)
            {
                return(null);
            }
        }