Exemplo n.º 1
0
 public object Searchest(string q)
 {
     try
     {
         return(PolicyHomeOwnersMdl.search_policys_est(q));
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 2
0
 public object Get()
 {
     try
     {
         return(PolicyHomeOwnersMdl.get_policys_est());
     }
     catch (Exception e)
     {
         return(new { state = false, message = "Server Error", exception = e });
     }
 }
Exemplo n.º 3
0
        public object ConfirmHomeOwners(int polId)
        {
            var db = new SibaModel();

            try
            {
                var polHead = PolicyHomeOwnersMdl.get_policy(polId);

                var premRegs = (from pr in db.INS_PREMIUM_REGISTER where pr.PR_POL_SYS_ID == polId select pr);
                if (premRegs.Any())
                {
                    var premReg = premRegs.Single();

                    var acntInts = (from a in db.MS_ACCTS_INTEGRATION where a.INT_PRODUCT == premReg.PR_COB && a.INT_TXN_SOURCE == premReg.PR_TXN_REF select a);
                    if (acntInts.Any())
                    {
                        var acntInt = acntInts.SingleOrDefault();

                        var polFees     = (from f in db.INS_UDW_POL_FEES where f.POL_FEE_POL_SYS_ID == polId select f).ToList();
                        var commissions = (from c in db.INS_UWD_INTERMEDIARY_COMM where c.CMM_POL_SYS_ID == polId select c).ToList();
                        var prodrisk    = (from u in db.INS_UDW_HOME_OWNERS where u.HOP_POLH_SYS_ID == polId select u).ToList();
                        var acntMod     = new PolicyHomeOwnersApprovalMdl();
                        var result      = acntMod.ForwardTransaction(polHead, prodrisk, premReg, acntInt, polFees, commissions);
                        return(result);
                    }

                    else
                    {
                        return new { state = false, message = "The Account is not properly setup" }
                    };
                }

                else
                {
                    return new { state = false, message = "No record found in the premium register" }
                };
            }
            catch (Exception e)
            {
                return(new { state = false, message = "Server Error", exception = e });
            }
        }
Exemplo n.º 4
0
        public object EndDeletionData(int polSysId, int endNo)
        {
            try
            {
                var risk = PolicyHistoryMdl.GetHPolicyHead(polSysId, endNo);
                risk.POLH_TXN_STATE = "P";
                var result = PolicyHomeOwnersMdl.SaveEndsmntCancl(risk);

                return(new
                {
                    state = true,
                    message = "Endorsement Successfully canceled",
                    //data = motor
                });
            }
            catch (Exception e)
            {
                return(new { state = false, message = "Server Error", exception = e });
            }
        }
Exemplo n.º 5
0
        public object Save([FromBody] INS_UWD_POLICY_HEAD policy)
        {
            try
            {
                var result = PolicyHomeOwnersMdl.save_policy(policy);

                return(new { state = true, message = "Home Owners Policy successfully Saved", result = new {
                                 result.POLH_SYS_ID,
                                 result.POLH_END_NO,
                                 result.POLH_STATUS,
                                 result.POLH_TXN_STATE,
                                 result.POLH_POL_STATE,
                                 result.POLH_DISPLAY_NO,
                                 result.POLH_QUT_SER_NO,
                             } });
            }
            catch (Exception e)
            {
                return(new { state = false, message = e });
            }
        }
Exemplo n.º 6
0
        public IEnumerable <object> get_estimate_risk(ProductsRisksCoversJSON riskJson)
        {
            var riskLst = PolicyHomeOwnersMdl.get_estimate_risk(riskJson.CLM_EST_RISK).ToList();

            return(riskLst);
        }