BExIS.Web.Shell.Areas.BAM.Controllers.PartyController.Edit C# (CSharp) Method

Edit() private method

private Edit ( PartyModel partyModel, string>.Dictionary partyCustomAttributeValues ) : System.Web.Mvc.ActionResult
partyModel BExIS.Web.Shell.Areas.BAM.Models.PartyModel
partyCustomAttributeValues string>.Dictionary
return System.Web.Mvc.ActionResult
        public ActionResult Edit(PartyModel partyModel, Dictionary<string, string> partyCustomAttributeValues)
        {
            using (IUnitOfWork uow = this.GetUnitOfWork())
            {
                PartyTypeManager partyTypeManager = new PartyTypeManager();
                PartyManager partyManager = new PartyManager();
                validateAttribute(partyModel);
                if (partyModel.Errors.Count > 0)
                    return View(partyModel);
                var party = partyManager.Repo.Reload(partyModel.Party);
                //Update some fields
                party.Description = partyModel.Party.Description;
                party.StartDate = partyModel.Party.StartDate;
                party.EndDate = partyModel.Party.EndDate;
                party.Name = partyModel.Party.Name;
                party = partyManager.Update(party);
                foreach (var partyCustomAttributeValueString in partyCustomAttributeValues)
                {
                    var partyCustomAttribute = partyTypeManager.RepoPartyCustomAttribute.Get(int.Parse(partyCustomAttributeValueString.Key));
                    partyManager.UpdatePartyCustomAttriuteValue(partyCustomAttribute, partyModel.Party, partyCustomAttributeValueString.Value);
                }
            }
            return RedirectToAction("Index");
        }

Same methods

PartyController::Edit ( int id ) : System.Web.Mvc.ActionResult