Пример #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));
        }
Пример #2
0
        public async Task <ActionResult> _KeyContactDetail(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)
                {
                    return(Json("success", JsonRequestBehavior.AllowGet));
                }
            }
            pickListServices      = new PicklistServicecs();
            model.DescriptionList = pickListServices.GetPickListItems("Key Contact Description");

            return(PartialView(model));
        }