Example #1
0
        public async Task <ActionResult> NewKeyContact(KeyContact model)
        {
            if (ModelState.IsValid)
            {
                ClaimTeamLoginModel    login   = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                KeyContactDateServices service = new KeyContactDateServices();

                bool result;

                if (string.IsNullOrEmpty(model.H_Keycontactsid))
                {
                    result = await service.InsertKeyContact(model, login.UserId);
                }
                else
                {
                    result = await service.UpdateKeyContact(model, login.UserId);
                }

                if (result)
                {
                    string claimNoType = model.Claim_Ref_No;
                    string redirectUrl = GetRedirectUrl(claimNoType, model.H_Claimsid, "keycontact");
                    return(Redirect(redirectUrl));
                }
            }
            PicklistServicecs pickListServices = new PicklistServicecs();

            model.DescriptionList = pickListServices.GetPickListItems("Key Contact Description");

            return(View(model));
        }
Example #2
0
        public ActionResult _MyActivityTaskDetail()
        {
            ClaimServices       claimServices    = new ClaimServices();
            ClaimTeamLoginModel client           = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];
            ActivityTaskDetail  model            = new ActivityTaskDetail();
            DocumentService     documentService  = new DocumentService();
            PicklistServicecs   pickListServices = new PicklistServicecs();

            ViewBag.OwnerType     = pickListServices.GetPickListItems("Honan Task Owner Type");
            ViewBag.CurrentUser   = client.FirstName + " " + client.LastName;
            ViewBag.CurrentUserId = client.UserId;
            //ViewBag.Sequence = documentService.GetActivitySequences(claimId, true)
            //     .Select(x => new SelectListItem { Text = x.ToString(), Value = x.ToString() })
            //     .ToList();

            //ViewBag.Stage = documentService.GetStages();
            //model.H_Claimsid_Dtl = claimId;

            List <ActivityTask> activityTasks = new List <ActivityTask>();

            //activityTasks = documentService.GetActivityTasks(claimId, false, false, false, "");
            //ViewBag.MaxActDate = activityTasks.Max(o => o.CompletedDate_Act.HasValue ? o.CompletedDate_Act.Value.ToString("dd/MM/yyyy") : "");
            model.Last_Task_Completed_Dtl_String = !string.IsNullOrEmpty(ViewBag.MaxActDate) ? ViewBag.MaxActDate.ToString() : null;
            model.Last_Task_Completed_Dtl        = !string.IsNullOrEmpty(ViewBag.MaxActDate) ? DateTime.ParseExact(ViewBag.MaxActDate, "dd/MM/yyyy", null) : null;


            model.H_Claimsid_Dtl_List = claimServices.GetClaimsForUser(client.UserId);


            return(PartialView(model));
        }
Example #3
0
        public async Task <ActionResult> NewKeyDate(KeyDate model)
        {
            if (ModelState.IsValid)
            {
                ClaimTeamLoginModel    login   = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                KeyContactDateServices service = new KeyContactDateServices();

                bool result;

                if (string.IsNullOrEmpty(model.H_Keydatesid))
                {
                    result = await service.InsertKeyDate(model, login.UserId);
                }
                else
                {
                    result = await service.UpdateKeyDate(model, login.UserId);
                }

                if (result)
                {
                    return(Redirect(Session[SessionHelper.FromURL].ToString()));
                }
            }
            PicklistServicecs pickListServices = new PicklistServicecs();

            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(View(model));
        }
Example #4
0
        public async Task <ActionResult> _KeyDateDetail(KeyDate model)
        {
            if (ModelState.IsValid)
            {
                ClaimTeamLoginModel    login   = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                KeyContactDateServices service = new KeyContactDateServices();

                bool result;

                if (string.IsNullOrEmpty(model.H_Keydatesid))
                {
                    result = await service.InsertKeyDate(model, login.UserId);
                }
                else
                {
                    result = await service.UpdateKeyDate(model, login.UserId);
                }

                if (result)
                {
                    return(Json("success", JsonRequestBehavior.AllowGet));
                }
            }
            pickListServices = new PicklistServicecs();
            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(PartialView(model));
        }
Example #5
0
        public async Task <ActionResult> GetUsersAjaxHandler(string filter, string teamName)
        {
            PicklistServicecs      picklistService = new PicklistServicecs();
            List <CRMPicklistItem> list            = new List <CRMPicklistItem>();

            list = picklistService.GetTeamGetUserOfTeamAutoComplete(teamName, filter);
            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Example #6
0
        public ActionResult AssingToAjaxHandler(jQueryDataTableParamModel param, string teamName)
        {
            picklistServicecs = new PicklistServicecs();
            List <CRMPicklistItem> objectList = new List <CRMPicklistItem>();

            teamName = string.IsNullOrEmpty(teamName) ? "-" : teamName;
            //if (Session["PolicyobjectList"] == null)
            //{
            objectList =
                picklistServicecs.GetTeamGetUserOfTeam(teamName);
            //}
            //else
            //    objectList = Session["PolicyobjectList"] as List<PolicySimple>;


            IEnumerable <CRMPicklistItem> filteredRecords = objectList;

            var sortColumnIndex = Convert.ToInt32(Request["iSortCol_0"]);
            Func <CRMPicklistItem, string> orderingFunction = (c => sortColumnIndex == 1 ? c.Code :
                                                               c.Text);

            var sortDirection = Request["sSortDir_0"]; // asc or desc

            if (sortDirection == "asc")
            {
                filteredRecords = filteredRecords.OrderBy(orderingFunction);
            }
            else
            {
                filteredRecords = filteredRecords.OrderByDescending(orderingFunction);
            }

            if (!string.IsNullOrEmpty(param.sSearch))
            {
                filteredRecords = filteredRecords
                                  .Where(c => c.Text.ToUpper().Contains(param.sSearch.ToUpper()));
                //           c.Town.Contains(param.sSearch));
            }


            List <string[]> aData = new List <string[]>();

            foreach (CRMPicklistItem item in filteredRecords)
            {
                string[] arry = new string[] { item.Text, item.Code };
                aData.Add(arry);
            }

            return(Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = 97,
                iTotalDisplayRecords = 3,
                aaData = aData
            },

                        JsonRequestBehavior.AllowGet));
        }
Example #7
0
        public ActionResult _KeyContactDetail(string claimId, string keyContactId)
        {
            KeyContact model = new KeyContact();

            pickListServices      = new PicklistServicecs();
            model.DescriptionList = pickListServices.GetPickListItems("Key Contact Description");

            return(PartialView(model));
        }
Example #8
0
        public ActionResult _ActivityTasks(string claimId)
        {
            //ActivityTask model = new ActivityTask();
            pickListServices      = new PicklistServicecs();
            ViewData["OwnerType"] = pickListServices.GetPickListItems("Honan Task Owner Type");
            ViewData["claimId"]   = claimId;

            return(PartialView());
        }
Example #9
0
        public ActionResult GetKeyDateById(string keyDateId)
        {
            KeyContactDateServices service = new KeyContactDateServices();
            KeyDate model = service.GetKeyDate(keyDateId);

            pickListServices = new PicklistServicecs();
            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Example #10
0
        public ActionResult _KeyDateDetail(string claimId)
        {
            KeyDate model = new KeyDate();

            model.H_Claimsid = claimId;
            pickListServices = new PicklistServicecs();
            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(PartialView(model));
        }
Example #11
0
        // GET: PropertyClaim
        public ActionResult NewPropertyClaim()
        {
            if (TempData[TempDataHelper.NewClaimModel] == null)
            {
                return(RedirectToAction("Index", "NewClaim"));
            }

            NewClaimModel newClaimModel = TempData[TempDataHelper.NewClaimModel] as NewClaimModel;

            //login = Session[SessionHelper.LoginClient] as LoginClient;
            //Session[SessionHelper.StoreobjectList] = null;

            PropertyClaim claim = new PropertyClaim();

            pickListServices = new PicklistServicecs();
            claimServices    = new ClaimServices();



            claim.Claim_Team               = newClaimModel.Claim_Team;
            claim.Claim_Team_Name          = newClaimModel.Claim_Team;
            claim.Account_Name             = newClaimModel.Account_Name;
            claim.Accountid                = newClaimModel.Accountid;
            claim.Claim_Type               = newClaimModel.Claim_Type;
            claim.Oc_Id                    = newClaimModel.Oc_No;
            claim.Oc_Num                   = newClaimModel.Oc_Name;
            claim.Policy_No                = newClaimModel.Policy_No;
            claim.Assigned_User            = newClaimModel.Assigned_To_Id;
            claim.Property_Address_1       = newClaimModel.Property_Address_1;
            claim.Property_Address_2       = newClaimModel.Property_Address_2;
            claim.Property_Postalcode      = newClaimModel.Property_Postalcode;
            claim.Property_State           = newClaimModel.Property_State;
            claim.Property_Suburb          = newClaimModel.Property_Suburb;
            claim.Account_Manager_Property = newClaimModel.AccountManager;
            claim.Insurer                  = newClaimModel.Insurer;
            claim.InsurerName              = newClaimModel.InsurerName;
            claim.Insured_Name             = newClaimModel.Insured_Name;
            claim.Account_Manager_Property = newClaimModel.Account_Manager_Property;
            claim.Policy_Class             = newClaimModel.Policy_Class;
            claim.Policy_Id                = newClaimModel.Policy_Id;
            claim.Date_Of_Loss             = newClaimModel.Incident_Date;
            claim.Incident_Date            = newClaimModel.Incident_Date;

            //claim.Claim_Team = login.ClaimTeam;
            //claim.Claim_Type = string.IsNullOrEmpty(Request.QueryString[QueryStringHelper.PageType]) ? Session[SessionHelper.Page].ToString() : Request.QueryString[QueryStringHelper.PageType];

            //Get Claim Reference #
            claim.Claim_Reference_Num = claimServices.GenerateClaimRefNo(claim.Claim_Team);
            claim.Claim_Reference_Num = claim.Claim_Reference_Num.Replace("\"", "");


            InitializeModel(claim, claimServices);

            return(View(claim));
        }
Example #12
0
        public ActionResult NewKeyDate()
        {
            Session[SessionHelper.FromURL] = Request.UrlReferrer == null?Request.Url.AbsoluteUri.ToString() : Request.UrlReferrer.ToString();

            KeyDate           model            = new KeyDate();
            PicklistServicecs pickListServices = new PicklistServicecs();

            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(View(model));
        }
        // GET: NewContactAccount
        public async Task <ActionResult> Index(string FirstName, string LastName, string Phone, string EmailAddress, string portalRegRequestId, bool ajax = false, bool fromProtal = false)
        {
            ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];
            string UserId             = client.UserId;
            ContactAccountModel model = new ContactAccountModel();

            model.PickTitle = await GetPickListData("Title");

            model.PickTypes = await GetPickListData("Account Type");

            model.AccountManagerId = UserId;
            ViewBag.Message        = "";

            if (fromProtal)
            {
                model.Contact = FirstName + " " + LastName;

                if (Phone != null && Phone != "null")
                {
                    model.Phone = Phone;
                }
                if (EmailAddress != null && EmailAddress != "null")
                {
                    model.Email = EmailAddress;
                }
                if (portalRegRequestId != null && portalRegRequestId != "null")
                {
                    model.portalRegRequestId = portalRegRequestId;
                }
                model.FromProtal = true;
            }
            else
            {
                model.FromProtal = false;
            }
            if (ajax)
            {
                return(Json(new { Success = true }, JsonRequestBehavior.AllowGet));
            }

            //Get Suburbs
            pickListServices         = new PicklistServicecs();
            model.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs");
            model.PropertySuburbList.Insert(0, new PicklistItem());


            //Get Suburbs
            PropertyStateList       = new PicklistServicecs();
            model.PropertyStateList = pickListServices.GetPickListItems("H_State");
            model.PropertyStateList.Insert(0, new PicklistItem());

            return(View(model));
        }
Example #14
0
        // GET: NewClaim
        public ActionResult Index()
        {
            newClaimModel     = new NewClaimModel();
            lookupServices    = new LookupServices();
            picklistServicecs = new PicklistServicecs();

            InitializeModel(newClaimModel);

            //newClaimModel.Assigned_To_List = picklistServicecs.GetTeamGetUserOfTeam()


            return(View(newClaimModel));
        }
        public async Task <ActionResult> NewRisksmartPropertyClaim(RisksmartPropertyClaim claim, IEnumerable <string> Region, IEnumerable <string> Incident_Category, IEnumerable <HttpPostedFileBase> upfiles)
        {
            try
            {
                pickListServices = new PicklistServicecs();
                claimServices    = new ClaimServices();
                client           = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;

                if (claim.Region != null)
                {
                    claim.Region = String.Join(",", Region.Where(s => !string.IsNullOrEmpty(s)));
                }
                if (claim.Incident_Category != null)
                {
                    claim.Incident_Category = String.Join(",", Incident_Category.Where(s => !string.IsNullOrEmpty(s)));
                }

                Mapper.Initialize(cfg => cfg.CreateMap <RisksmartPropertyClaim, ClaimGeneral>());
                ClaimGeneral generalClaim = Mapper.Map <ClaimGeneral>(claim);

                if (ModelState.IsValid)
                {
                    claimServices = new ClaimServices();
                    generalClaim.Claim_Team_Name     = claim.Claim_Team;
                    generalClaim.Accountid           = claim.Accountid;
                    generalClaim.Account_Name        = claim.Account_Name;
                    generalClaim.Claim_Received      = true;
                    generalClaim.Claim_Received_Date = DateTime.Today;
                    var result = await claimServices.TeamInsertClaimNotification(generalClaim, client.UserId, upfiles);

                    if (result.IsSuccess)
                    {
                        TempData["SuccessMsg"] = Messages.successMessage;

                        return(RedirectToAction("index", "claimlist"));
                        //if (claim.Claim_Type == ClaimType.Claim.ToString())
                        //    return RedirectToAction("ViewClaims", "ViewPages");
                        //else
                        //    return RedirectToAction("ViewNotifications", "ViewPages");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            InitializeModel(claim, claimServices);

            return(View(claim));
        }
        public ActionResult GetPolicySectionData(string policyClass)
        {
            string pickListName = string.Empty;

            if (!string.IsNullOrEmpty(policyClass))
            {
                switch (policyClass)
                {
                case "Strata Title":
                case "Commercial (STR-COMM)":
                case "Residential (STR-RES)":
                case "Ancillary":
                case "New Development":
                case "Company Title":
                {
                    pickListName = "Risksmart Property Policy Section 1";
                    break;
                }

                case "Landlord Building":
                {
                    pickListName = "Risksmart Property Policy Section 2";
                    break;
                }

                case "Landlord Contents":
                {
                    pickListName = "Risksmart Property Policy Section 3";
                    break;
                }

                case "Community Association":
                case "Common Property Only":
                {
                    pickListName = "Risksmart Property Policy Section 4";
                    break;
                }

                default:
                {
                    return(Json(new List <PicklistItem>(), JsonRequestBehavior.AllowGet));
                }
                }

                PicklistServicecs services = new PicklistServicecs();
                return(Json(services.GetPickListItems(pickListName), JsonRequestBehavior.AllowGet));
            }

            return(Json(new List <PicklistItem>(), JsonRequestBehavior.AllowGet));
        }
        public async Task <ActionResult> Index(ContactAccountModel model)
        {
            ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];
            string             UserId  = client.UserId;
            ContactAccountRepo conrepo = new ContactAccountRepo();
            var result = await conrepo.AddContactAccount(model, UserId);

            ContactAccountModel rmodel = new ContactAccountModel();

            rmodel.PickTitle = await GetPickListData("Title");

            rmodel.PickTypes = await GetPickListData("Account Type");

            rmodel.AccountManagerId = UserId;

            pickListServices          = new PicklistServicecs();
            rmodel.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs");
            rmodel.PropertySuburbList.Insert(0, new PicklistItem());


            //Get Suburbs
            PropertyStateList        = new PicklistServicecs();
            rmodel.PropertyStateList = pickListServices.GetPickListItems("H_State");
            rmodel.PropertyStateList.Insert(0, new PicklistItem());

            if (result)
            {
                ViewBag.Message = "Success: Save successful";
            }
            else
            {
                ViewBag.Message = "Error: Save unsuccessful";
            }
            ModelState.Clear();

            if (model.FromProtal)
            {
                return(RedirectToAction("AdminList", "AdminList"));
            }
            else
            {
                return(RedirectToAction("Index", "AccountList"));
                //return View(rmodel);
            }

            //return RedirectToAction("Index");
        }
        public async Task <ActionResult> DetailRisksmartGccClaim(RisksmartGccClaim model, IEnumerable <string> Incident_Category, IEnumerable <string> Bodily_Location)
        {
            Session[SessionHelper.StoreobjectList] = null;
            PicklistServicecs picklistService = new PicklistServicecs();
            ClaimServices     claims          = new ClaimServices();

            if (Incident_Category != null)
            {
                model.Incident_Category = String.Join(", ", Incident_Category.Where(s => !string.IsNullOrEmpty(s)));
            }

            if (Bodily_Location != null)
            {
                model.Bodily_Location = String.Join(", ", Bodily_Location.Where(s => !string.IsNullOrEmpty(s)));
            }

            Mapper.Initialize(cfg => cfg.CreateMap <RisksmartGccClaim, ClaimGeneral>());
            ClaimGeneral generalClaim = Mapper.Map <ClaimGeneral>(model);

            generalClaim.Policy_Class = string.IsNullOrEmpty(model.Policy_Class) == true ? model.Policy_Class_Selection : model.Policy_Class;


            ClaimTeamLoginModel login = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;

            if (ModelState.IsValid)
            {
                claims = new ClaimServices();
                var result = await claims.TeamUpdateClaimNotification(generalClaim, login.UserId);

                if (result)
                {
                    //return RedirectToAction("Index", "ClaimList");
                    TempData["ClaimSaved"] = Messages.ClaimSaved;
                    return(Redirect(Request.UrlReferrer.ToString()));
                }
                else
                {
                    TempData["ErrorMsg"] = Messages.errorMessage;
                }
            }

            InitializeModel(model, claims);

            return(View(model));
        }
Example #19
0
        public async Task <ActionResult> AccountDetail(string AccountId)
        {
            AccountListRepo accountListRepo = new AccountListRepo();
            AccountModel    model           = new AccountModel();

            model = await accountListRepo.GetAccountDetail(AccountId);

            //Get Suburbs
            pickListServices         = new PicklistServicecs();
            model.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs");
            model.PropertySuburbList.Insert(0, new PicklistItem());


            //Get Suburbs
            PropertyStateList = new PicklistServicecs();
            //model.BillingMethods = pickListServices.GetPickListItems("Honan Billing Method");
            model.BillingMethods = new List <PicklistItem>();
            model.BillingMethods.Add(new PicklistItem()
            {
                Text = "Per Hour", Code = "Per Hour"
            });
            model.BillingMethods.Add(new PicklistItem()
            {
                Text = "Per Claim", Code = "Per Claim"
            });
            model.BillingMethods.Add(new PicklistItem()
            {
                Text = "Per Annum", Code = "Per Annum"
            });
            model.BillingMethods.Add(new PicklistItem()
            {
                Text = "No Billing", Code = "No Billing"
            });
            //model.BillingMethods.Insert(0, new PicklistItem());


            //Get Billing Methods
            PropertyStateList = new PicklistServicecs();
            model.AccountType = pickListServices.GetPickListItems("Account Type");
            model.AccountType.Insert(0, new PicklistItem());


            ViewBag.AccountId = AccountId;
            return(View(model));
        }
Example #20
0
        public ActionResult NewPayment()
        {
            //    Uri uri = new Uri(Request.Url.AbsoluteUri, UriKind.Relative);
            //    string url = uri.ToString();
            Session[SessionHelper.FromURL] = Request.UrlReferrer == null?Request.Url.AbsoluteUri.ToString() : Request.UrlReferrer.ToString();

            Payment           model            = new Payment();
            ClaimServices     claimServices    = new ClaimServices();
            PicklistServicecs pickListServices = new PicklistServicecs();

            ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];

            //model.ClaimRefNo_Payment_List = claimServices.GetClaimsForUser(client.UserId);
            model.Payee_Type_List     = pickListServices.GetPickListItems("Honan Payee type");
            model.Gst                 = "10";
            model.Gst_Included        = false;
            model.Payment_Status_List = pickListServices.GetPickListItems("Honan Payment Status");
            model.Payment_Type_List   = pickListServices.GetPickListItems("Honan Payment Type");
            model.Payment_Method_List = pickListServices.GetPickListItems("Honan Payment Method");
            model.IsNew               = true;

            return(View(model));
        }
Example #21
0
        public async Task <ActionResult> ContactDetail(string ContactId)
        {
            ContactRepo  contactRepo = new ContactRepo();
            ContactModel model       = new ContactModel();

            model = await contactRepo.GetAccount(ContactId);

            pickListServices = new PicklistServicecs();
            model.TitleList  = pickListServices.GetPickListItems("Title");
            model.TitleList.Insert(0, new PicklistItem());

            //Get Suburbs
            pickListServices         = new PicklistServicecs();
            model.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs");
            model.PropertySuburbList.Insert(0, new PicklistItem());

            //Get Suburbs
            PropertyStateList       = new PicklistServicecs();
            model.PropertyStateList = pickListServices.GetPickListItems("H_State");
            ViewBag.ContactId       = ContactId;

            return(View(model));
        }
Example #22
0
        public async Task <ActionResult> AdminDetail(string adminId = null)
        {
            var model = new CustomerPortalAdminModel();

            model.IsNew            = true;
            model.Manualclaim_Form = "Not set";
            if (adminId != null)
            {
                model = await AdminPortalRecord(adminId);

                model.IsNew = false;
                decimal Fee_Per_Hour;
                if (model.Fee_Per_Hour != null)
                {
                    if (Decimal.TryParse(model.Fee_Per_Hour, out Fee_Per_Hour))
                    {
                        model.Fee_Per_Hour = (decimal.Round(Fee_Per_Hour, 2)).ToString();//string.Format("0:0.00", Fee_Per_Hour);//Fee_Per_Hour.ToString("0.##");
                    }
                }

                decimal Fee_Per_Billing_Method;
                if (model.Fee_Per_Billing_Method != null)
                {
                    if (Decimal.TryParse(model.Fee_Per_Billing_Method, out Fee_Per_Billing_Method))
                    {
                        model.Fee_Per_Billing_Method = (decimal.Round(Fee_Per_Billing_Method, 2)).ToString();//string.Format("0:0.00", Fee_Per_Billing_Method);//Fee_Per_Billing_Method.ToString("0.##");
                    }
                }
            }

            PicklistServicecs pickListServices = new PicklistServicecs();

            model.BillingMethodList = pickListServices.GetPickListItems("Honan Billing Method");

            return(View(model));
        }
Example #23
0
        public ActionResult _PaymentDetail(string claimId, string Claim_Reference_Num)
        {
            Session[SessionHelper.PaymentAttachment] = null;

            Payment model = new Payment();

            claimServices    = new ClaimServices();
            pickListServices = new PicklistServicecs();

            ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];

            model.ClaimRefNo_Payment      = Claim_Reference_Num;
            model.ClaimRefNo_Payment_List = claimServices.GetClaimsForUser(client.UserId);
            model.Payee_Type_List         = pickListServices.GetPickListItems("Honan Payee type");
            model.Gst                 = "10";
            model.Gst_Included        = true;
            model.Payment_Status_List = pickListServices.GetPickListItems("Honan Payment Status");
            model.Payment_Type_List   = pickListServices.GetPickListItems("Honan Payment Type");
            model.Payment_Method_List = pickListServices.GetPickListItems("Honan Payment Method");
            model.H_Claimsid          = claimId;
            model.IsNew               = true;

            return(PartialView(model));
        }
        private void InitializeModel(RisksmartGccClaim model, ClaimServices claimServices)
        {
            pickListServices = new PicklistServicecs();

            if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartGCCManager))
            {
                model.Assigned_User_List = claimServices.GetUsers(new List <string>()
                {
                    "Risksmart GCC Manager"
                });
            }

            model.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status");

            //Get Reported By Types
            model.ReportedByTypeList = pickListServices.GetPickListItems("Risksmart GCC Reported By Type");

            //Get Regions
            //model.RegionList = pickListServices.GetPickListItems("H_StoreRegion");
            //model.RegionList = pickListServices.GetStoreRegions();

            model.RegionList = pickListServices.GetStoreRegionsByAccount(model.Accountid);
            if (model.RegionList == null)
            {
                model.RegionList = new List <PicklistItem>();
            }
            model.RegionList.Insert(0, new PicklistItem());

            // Add Juristiction list
            model.JuristictionList = new List <string>()
            {
                "", "NSW", "VIC", "QLD", "WA", "SA", "TAS"
            };

            // Add Gender list
            model.GenderList = new List <string>()
            {
                "", "Male", "Female"
            };

            //Get Incident categoris
            model.IncidentCategoryList = pickListServices.GetPickListItems("Risksmart GCC Incident Category");
            model.IncidentCategoryList.Insert(0, new PicklistItem());

            //Get Incident Party Types
            model.IncidentPartyTypeList = pickListServices.GetPickListItems("Risksmart GCC Incident Party Type");
            model.IncidentPartyTypeList.Insert(0, new PicklistItem());

            model.Policy_Section_List = pickListServices.GetPickListItems("Risksmart GCC Policy Section");
            model.Policy_Section_List.Insert(0, new PicklistItem());

            //Get Outcome List
            model.Outcome_List = pickListServices.GetPickListItems("Risksmart GCC Outcome");
            model.Outcome_List.Insert(0, new PicklistItem());

            model.Policy_Class_List = pickListServices.GetPickListItems("Risksmart GCC Policy Class");
            model.Policy_Class_List.Insert(0, new PicklistItem());

            model.Client_Group_List = pickListServices.GetPickListItems("Risksmart GCC Client Group");
            model.Client_Group_List.Insert(0, new PicklistItem());

            model.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status");
            model.Notification_Status_List.Insert(0, new PicklistItem());

            model.Bodily_Location_List = pickListServices.GetPickListItems("Honan Claims Bodily Location");
            model.Bodily_Location_List.Insert(0, new PicklistItem());

            if (model.Reported_Time != null)
            {
                string time = DateTime.Parse(model.Reported_Time.ToString()).ToString("HH:mm");
                model.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0');
                model.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            if (model.Incident_Time != null)
            {
                string time = DateTime.Parse(model.Incident_Time.ToString()).ToString("HH:mm");
                model.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0');
                model.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            // Add CCTV available list
            model.CCTVAvailableList = new List <string>()
            {
                "", "Yes", "No"
            };

            // Add CCTV viewed list
            model.CCTVViewedList = new List <string>()
            {
                "", "Yes", "No"
            };

            model.PanelLawyersRetainedList = new List <string>()
            {
                "", "Yes", "No"
            };



            model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence;

            model.Liability_Reserve = model.Liability_Res_Source;
            model.Defence_Reserve   = model.Defence_Res_Source;

            PaymentServices paymentServices = new PaymentServices();
            decimal         val, liabilityReserveGross = 0, defenceReserveGross = 0;


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", false), out val))
            {
                model.Net_Paid_Liability = val;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", false), out val))
            {
                model.Net_Paid_Defence = val;
            }


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", true), out val))
            {
                liabilityReserveGross   = val;
                model.Liability_Reserve = model.Liability_Reserve - model.Net_Paid_Liability;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", true), out val))
            {
                defenceReserveGross   = val;
                model.Defence_Reserve = model.Defence_Reserve - model.Net_Paid_Defence;
            }

            model.Total_Reserve = model.Liability_Reserve + model.Defence_Reserve;


            model.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross;

            model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence;

            if (model.Total_Reserve < model.Excess)
            {
                model.Current_Exposure = model.Total_Reserve;
            }
            else
            {
                model.Current_Exposure = model.Excess - model.Net_Paid_Liability - model.Net_Paid_Defence;
            }

            decimal totalNet = model.Net_Paid_Liability + model.Net_Paid_Defence;

            if (totalNet > model.Excess)
            {
                model.Over_Excess_Paid = totalNet - model.Excess;
            }
            else
            {
                model.Over_Excess_Paid = 0;
            }

            model.Claim_Received     = model.Claim_Received == null || model.Claim_Received == false ? false : true;
            model.Claim_Acknowledged = model.Claim_Acknowledged == null || model.Claim_Acknowledged == false ? false : true;
            model.Review             = model.Review == null || model.Review == false ? false : true;
            model.Outcome_Settlement = model.Outcome_Settlement == null || model.Outcome_Settlement == false ? false : true;
            model.Outcome_Declined   = model.Outcome_Declined == null || model.Outcome_Declined == false ? false : true;
            model.Litigated          = model.Litigated == null || model.Litigated == false ? false : true;
            model.Claim_Closed       = model.Claim_Closed == null || model.Claim_Closed == false ? false : true;

            model.IncidentTypeList = pickListServices.GetPickListItems("Risksmart GCC Incident Type");
            model.YesNoList        = new List <string>()
            {
                "", "Yes", "No"
            };

            model.Bodily_Location_List = pickListServices.GetPickListItems("Honan Claims Bodily Location");
            model.Bodily_Location_List.Insert(0, new PicklistItem());
        }
Example #25
0
        private void InitializeModel(PropertyClaim model, ClaimServices claimServices)
        {
            // Add Gender list
            model.GenderList = new List <string>()
            {
                "", "Male", "Female"
            };

            pickListServices = new PicklistServicecs();

            model.Policy_Section_List = pickListServices.GetPickListItems("Property Claims Policy Section");
            model.Policy_Section_List.Insert(0, new PicklistItem());

            //Get Suburbs
            model.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs");
            model.PropertySuburbList.Insert(0, new PicklistItem());

            //Get States
            model.PropertyStateList = pickListServices.GetPickListItems("H_State");
            model.PropertyStateList.Insert(0, new PicklistItem());

            model.Policy_Class_List = pickListServices.GetPickListItems("Honan Policy Classes");
            model.Policy_Class_List.Insert(0, new PicklistItem());

            model.Causation_List = pickListServices.GetPickListItems("Property Claims Causation");
            model.Causation_List.Insert(0, new PicklistItem());

            model.YesNoList = new List <string>()
            {
                "", "Yes", "No"
            };

            model.ComplexityList = new List <string>()
            {
                "", "High", "Med", "Low"
            };

            model.Liability_Reserve = model.Liability_Res_Source;
            model.Defence_Reserve   = model.Defence_Res_Source;

            if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.PropertyClaimsManager))
            {
                model.Assigned_User_List = claimServices.GetUsers(new List <string>()
                {
                    "Property Claims Manager"
                });
            }

            model.Outcome_List = pickListServices.GetPickListItems("Property Claims Outcome");
            model.Outcome_List.Insert(0, new PicklistItem());

            model.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status");

            model.IncidentCategoryList = pickListServices.GetPickListItems("Property Claims Incident Category");
            model.IncidentCategoryList.Insert(0, new PicklistItem());

            model.Policy_Section_List = pickListServices.GetPickListItems("Property Claims Policy Section");
            model.Policy_Section_List.Insert(0, new PicklistItem());

            model.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status");
            model.Notification_Status_List.Insert(0, new PicklistItem());


            model.Claim_Received     = model.Claim_Received == null || model.Claim_Received == false ? false : true;
            model.Claim_Acknowledged = model.Claim_Acknowledged == null || model.Claim_Acknowledged == false ? false : true;
            model.Review             = model.Review == null || model.Review == false ? false : true;
            model.Outcome_Settlement = model.Outcome_Settlement == null || model.Outcome_Settlement == false ? false : true;
            model.Outcome_Declined   = model.Outcome_Declined == null || model.Outcome_Declined == false ? false : true;
            model.Claim_Closed       = model.Claim_Closed == null || model.Claim_Closed == false ? false : true;
            model.Litigated          = model.Litigated == null || model.Litigated == false ? false : true;
            model.Claim_Lodged       = model.Claim_Lodged == null || model.Claim_Lodged == false ? false : true;
            model.Claim_Not_Lodged   = model.Claim_Not_Lodged == null || model.Claim_Not_Lodged == false ? false : true;
            model.Claim_Approved     = model.Claim_Approved == null || model.Claim_Approved == false ? false : true;
            model.Claim_Declined     = model.Claim_Declined == null || model.Claim_Declined == false ? false : true;

            //Calculations
            PaymentServices paymentServices = new PaymentServices();
            decimal         val, liabilityReserveGross = 0, defenceReserveGross = 0;


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", false), out val))
            {
                model.Net_Paid_Liability = val;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", false), out val))
            {
                model.Net_Paid_Defence = val;
            }


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Liability Reserve", true), out val))
            {
                liabilityReserveGross   = val;
                model.Liability_Reserve = model.Liability_Reserve - model.Net_Paid_Liability;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(model.H_Claimsid, "Defence Reserve", true), out val))
            {
                defenceReserveGross   = val;
                model.Defence_Reserve = model.Defence_Reserve - model.Net_Paid_Defence;
            }

            model.Total_Reserve = model.Liability_Reserve + model.Defence_Reserve;


            model.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross;

            model.Total_Incurred = model.Total_Reserve + model.Net_Paid_Liability + model.Net_Paid_Defence;

            if (model.Total_Reserve < model.Excess)
            {
                model.Current_Exposure = model.Total_Reserve;
            }
            else
            {
                model.Current_Exposure = model.Excess - model.Net_Paid_Liability - model.Net_Paid_Defence;
            }


            decimal totalNet = model.Net_Paid_Liability + model.Net_Paid_Defence;

            if (totalNet > model.Excess)
            {
                model.Over_Excess_Paid = totalNet - model.Excess;
            }
            else
            {
                model.Over_Excess_Paid = 0;
            }


            if (model.Reported_Time != null)
            {
                string time = DateTime.Parse(model.Reported_Time.ToString()).ToString("HH:mm");
                model.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0');
                model.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            if (model.Incident_Time != null)
            {
                string time = DateTime.Parse(model.Incident_Time.ToString()).ToString("HH:mm");
                model.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0');
                model.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            model.IncidentTypeList = pickListServices.GetPickListItems("Property Claims Incident Type");
        }
Example #26
0
        private void InitializeModel(GccClaim claim, ClaimServices claimServices)
        {
            pickListServices = new PicklistServicecs();

            //Get Incident categoris
            claim.IncidentCategoryList = pickListServices.GetPickListItems("GCC Incident Category");
            claim.IncidentCategoryList.Insert(0, new PicklistItem());

            claim.IncidentPartyTypeList = pickListServices.GetPickListItems("GCC Incident Type");
            claim.IncidentPartyTypeList.Insert(0, new PicklistItem());

            claim.Policy_Class_List = pickListServices.GetPickListItems("GCC Policy Class");
            claim.Policy_Class_List.Insert(0, new PicklistItem());

            claim.YesNoList = new List <string>()
            {
                "", "Yes", "No"
            };

            if (ClaimHelper.IsManager(HonanClaimsPortal.Helpers.ClaimTeamManagers.RisksmartGCCManager))
            {
                claim.Assigned_User_List = claimServices.GetUsers(new List <string>()
                {
                    "GCC Claims Manager"
                });
            }

            claim.Claim_Status_List = pickListServices.GetPickListItems("Honan Claim Status");

            //Get Reported By Types
            //claim.ReportedByTypeList = pickListServices.GetPickListItems("Risksmart GCC Reported By Type");

            //Get Regions
            claim.RegionList = pickListServices.GetPickListItems("H_StoreRegion");

            // Add Juristiction list
            claim.JuristictionList = new List <string>()
            {
                "", "NSW", "VIC", "QLD", "WA", "SA", "TAS"
            };

            // Add Gender list
            claim.GenderList = new List <string>()
            {
                "", "Male", "Female"
            };


            //Get Incident Party Types
            claim.IncidentPartyTypeList = pickListServices.GetPickListItems("GCC Incident Type");
            claim.IncidentPartyTypeList.Insert(0, new PicklistItem());

            //claim.Policy_Section_List = pickListServices.GetPickListItems("Risksmart GCC Policy Section");
            //claim.Policy_Section_List.Insert(0, new PicklistItem());

            //Get Outcome List
            claim.Outcome_List = pickListServices.GetPickListItems("Risksmart GCC Outcome");
            claim.Outcome_List.Insert(0, new PicklistItem());

            claim.Policy_Class_List = pickListServices.GetPickListItems("Honan Policy Classes");
            claim.Policy_Class_List.Insert(0, new PicklistItem());

            claim.Client_Group_List = pickListServices.GetPickListItems("Honan Claims Client Group");
            claim.Client_Group_List.Insert(0, new PicklistItem());

            claim.Notification_Status_List = pickListServices.GetPickListItems("Honan Notification Status");
            claim.Notification_Status_List.Insert(0, new PicklistItem());

            if (claim.Reported_Time != null)
            {
                string time = DateTime.Parse(claim.Reported_Time.ToString()).ToString("HH:mm");
                claim.Reported_TimeH = time.Split(':')[0].PadLeft(2, '0');
                claim.Reported_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            if (claim.Incident_Time != null)
            {
                string time = DateTime.Parse(claim.Incident_Time.ToString()).ToString("HH:mm");
                claim.Incident_TimeH = time.Split(':')[0].PadLeft(2, '0');
                claim.Incident_TimeM = time.Split(':')[1].PadLeft(2, '0');
            }

            // Add CCTV available list
            claim.CCTVAvailableList = new List <string>()
            {
                "", "Yes", "No"
            };

            // Add CCTV viewed list
            claim.CCTVViewedList = new List <string>()
            {
                "", "Yes", "No"
            };

            //claim.PanelLawyersRetainedList = new List<string>() { "", "Yes", "No" };


            claim.Total_Incurred = claim.Total_Reserve + claim.Net_Paid_Liability + claim.Net_Paid_Defence;

            claim.Liability_Reserve = claim.Liability_Res_Source;
            claim.Defence_Reserve   = claim.Defence_Res_Source;

            PaymentServices paymentServices = new PaymentServices();
            decimal         val, liabilityReserveGross = 0, defenceReserveGross = 0;


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Liability Reserve", false), out val))
            {
                claim.Net_Paid_Liability = val;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Defence Reserve", false), out val))
            {
                claim.Net_Paid_Defence = val;
            }


            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Liability Reserve", true), out val))
            {
                liabilityReserveGross   = val;
                claim.Liability_Reserve = claim.Liability_Reserve - claim.Net_Paid_Liability;
            }

            if (decimal.TryParse(paymentServices.GetClaimReservePaymentAmount(claim.H_Claimsid, "Defence Reserve", true), out val))
            {
                defenceReserveGross   = val;
                claim.Defence_Reserve = claim.Defence_Reserve - claim.Net_Paid_Defence;
            }

            claim.Total_Reserve = claim.Liability_Reserve + claim.Defence_Reserve;

            claim.Gross_Paid_To_Date = liabilityReserveGross + defenceReserveGross;

            claim.Total_Incurred = claim.Total_Reserve + claim.Net_Paid_Liability + claim.Net_Paid_Defence;

            if (claim.Total_Reserve < claim.Excess)
            {
                claim.Current_Exposure = claim.Total_Reserve;
            }
            else
            {
                claim.Current_Exposure = claim.Excess - claim.Net_Paid_Liability - claim.Net_Paid_Defence;
            }

            decimal totalNet = claim.Net_Paid_Liability - claim.Net_Paid_Defence;

            if (totalNet > claim.Excess)
            {
                claim.Over_Excess_Paid = totalNet - claim.Excess;
            }
            else
            {
                claim.Over_Excess_Paid = 0;
            }

            claim.Claim_Closed              = claim.Claim_Closed == null || claim.Claim_Closed == false ? false : true;
            claim.Claim_Declined            = claim.Claim_Declined == null || claim.Claim_Declined == false ? false : true;
            claim.Partial_Indemnity_Granted = claim.Partial_Indemnity_Granted == null || claim.Partial_Indemnity_Granted == false ? false : true;
            claim.Indemnity_Granted         = claim.Indemnity_Granted == null || claim.Indemnity_Granted == false ? false : true;
            claim.Expert_Appointed          = claim.Expert_Appointed == null || claim.Expert_Appointed == false ? false : true;
            claim.Claim_Acknowledged        = claim.Claim_Acknowledged == null || claim.Claim_Acknowledged == false ? false : true;
            claim.Claim_Lodged              = claim.Claim_Lodged == null || claim.Claim_Lodged == false ? false : true;
            claim.Claim_Not_Lodged          = claim.Claim_Not_Lodged == null || claim.Claim_Not_Lodged == false ? false : true;
        }
Example #27
0
        public async Task <ActionResult> NewPayment(Payment model, IEnumerable <System.Web.HttpPostedFileBase> files)
        {
            ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin];

            if (model.Is_Settlement)
            {
                if (ModelState.ContainsKey("Payee_Type"))
                {
                    ModelState["Payee_Type"].Errors.Clear();
                }

                if (ModelState.ContainsKey("Payee_Contact_Name"))
                {
                    ModelState["Payee_Contact_Name"].Errors.Clear();
                }

                if (ModelState.ContainsKey("Date_Invoice_Received"))
                {
                    ModelState["Date_Invoice_Received"].Errors.Clear();
                }

                if (ModelState.ContainsKey("Payee_Account_Name"))
                {
                    ModelState["Payee_Account_Name"].Errors.Clear();
                }
            }
            else
            {
                if (ModelState.ContainsKey("Payment_Amount"))
                {
                    ModelState["Payment_Amount"].Errors.Clear();
                }

                if (ModelState.ContainsKey("Payment_Date"))
                {
                    ModelState["Payment_Date"].Errors.Clear();
                }
            }


            if (ModelState.IsValid)
            {
                DocumentService documentService = new DocumentService();

                if (Session[SessionHelper.PaymentAttachment] != null)
                {
                    files = (IEnumerable <HttpPostedFileBase>)Session[SessionHelper.PaymentAttachment];
                }

                if (model.Is_Settlement && model.Payment_Amount.HasValue)
                {
                    model.Total_Gross = (decimal)model.Payment_Amount;
                    model.Total_Net   = (decimal)model.Payment_Amount;
                }

                var t = await documentService.CreatePaymentDetailRecord(model, client.UserId, files);

                if (t.IsSuccess)
                {
                    Session[SessionHelper.PaymentAttachment] = null;
                    //return Redirect(Session[SessionHelper.FromURL].ToString());
                    string claimNoType = model.ClaimRefNo_Payment;
                    string redirectUrl = GetRedirectUrl(claimNoType, model.H_Claimsid, "payment");
                    return(Redirect(redirectUrl));
                }
            }

            ClaimServices     claimServices    = new ClaimServices();
            PicklistServicecs pickListServices = new PicklistServicecs();

            model.Payee_Type_List     = pickListServices.GetPickListItems("Honan Payee type");
            model.Gst                 = "10";
            model.Gst_Included        = true;
            model.Payment_Status_List = pickListServices.GetPickListItems("Honan Payment Status");
            model.Payment_Type_List   = pickListServices.GetPickListItems("Honan Payment Type");
            model.Payment_Method_List = pickListServices.GetPickListItems("Honan Payment Method");
            //model.ClaimRefNo_Payment_List = claimServices.GetClaimsForUser(client.UserId);
            return(View(model));
            //return Json(new { success = true });
        }