Beispiel #1
0
        private void saveFuneral()
        {
            Funeral funeral = null;

            if (IsCreateMode)
            {
                funeral = new Funeral()
                {
                    FuneralID = Guid.NewGuid()
                };
            }
            else
            {
                funeral = new FuneralService().getByID(this.FuneralID.ToString());
            }

            FuneralCompany      funeralCompany = new FuneralCompanyService().getByID(ddlFuneralCompany.SelectedValue);
            CemeteryStaffPerson cemeteryStaff  = new CemeteryStaffPersonService().getByID(ddlStaffPerson.SelectedValue);

            funeral.FuneralDate           = DateTime.ParseExact(txtFuneralDate.Text.Trim(), "dd.MM.yyyy", System.Globalization.CultureInfo.InvariantCulture);
            funeral.FuneralCompanyID      = funeralCompany.FuneralCompanyID;
            funeral.CemeteryStaffPersonID = cemeteryStaff.CemeteryStaffPersonID;
            // FuneralCompany company = new FuneralCompanyService().getByID(ddlFuneralCompany.SelectedValue);


            if (IsCreateMode)
            {
                new FuneralService().create(funeral);
                Response.Redirect(string.Format("/Pages/FuneralsDetails?FuneralID={0}", funeral.FuneralID.ToString()));
            }
            else
            {
                new FuneralService().update(funeral);
            }
        }
Beispiel #2
0
        public Funeral Create(Funeral model)
        {
            _ctx.Funerals.Add(model);
            _ctx.SaveChanges();

            return(model);
        }
        public TestPaymentService()
        {
            _mockDbRepo              = new Mock <IMunharaundaRepository>();
            _mockService             = new Mock <IServiceProvider>();
            _mockHttpContextAccessor = new Mock <IHttpContextAccessor>();
            _paymentService          = new PaymentService(_mockDbRepo.Object, _mockService.Object);
            funeralRec = new Funeral()
            {
                FuneralId = 1,
                DeceasedsProfileNumber = 5,
                AddressForFuneral      = "15 Albany Crescent Warren Park",
                StatusId  = 5,
                Created   = new DateTime(2021, 1, 1),
                CreatedBy = 1,
                Comment   = "Test Funeral"
            };
            addPaymentRequest = new Payment()
            {
                CartId        = "4547124",
                ProfileNumber = 1,
                Funeral       = funeralRec,
                Amount        = 100.00M,
                PaymentId     = 1,
                TransactionId = 1
            };

            paymentListWithRecord = new List <Payment>();
            paymentListWithRecord.Add(addPaymentRequest);
            emptyPaymentList = new List <Payment>();
            _mockDbRepo.Setup(x => x.AddPayment(It.IsAny <Payment>())).ReturnsAsync(true);
        }
 internal void delete(Funeral funeral)
 {
     using (ApplicationDbContext dbContext = new ApplicationDbContext())
     {
         new FuneralRepository(dbContext).delete(funeral);
         dbContext.SaveChanges();
     }
 }
 public void update(Funeral funeral)
 {
     try
     {
         using (ApplicationDbContext dbContext = new ApplicationDbContext())
         {
             new FuneralRepository(dbContext).update(funeral);
             dbContext.SaveChanges();
         }
     }
     catch (Exception ex) { }
 }
        public async Task <ResponseModel <Funeral> > UpdateFuneral(int id, Funeral funeral)
        {
            ResponseModel <Funeral> response = InitializeFuneral();


            _context.Entry(funeral).State = EntityState.Modified;

            response = await UpdateRecord(id, funeral, response);



            return(response);
        }
        public async Task <IActionResult> PutFuneral(int id, Funeral funeral)
        {
            if (id != funeral.FuneralId)
            {
                return(BadRequest());
            }

            var response = await _db.UpdateFuneral(id, funeral);



            return(_responsesService.PutResponse(response));
        }
 public Funeral getByID(string id)
 {
     try
     {
         Funeral funeral = null;
         using (ApplicationDbContext dbContext = new ApplicationDbContext())
         {
             funeral = new FuneralRepository(dbContext).getByID(id);
         }
         return(funeral);
     }
     catch (Exception ex) { }
     return(null);
 }
 public Funeral create(Funeral funeral)
 {
     try
     {
         using (ApplicationDbContext dbContext = new ApplicationDbContext())
         {
             new FuneralRepository(dbContext).create(funeral);
             dbContext.SaveChanges();
             return(funeral);
         }
     }
     catch (Exception ex) { }
     return(null);
 }
        private async Task <List <ActiveFuneralResponse> > GetFuneralDetails(Funeral funeral, bool contributed)
        {
            var response       = new List <ActiveFuneralResponse>();
            var funeralDetails = await GetFuneral(funeral.FuneralId);

            if (funeralDetails != null)
            {
                foreach (var i in funeralDetails.ResponseData)
                {
                    var activeFuneralResponse = new ActiveFuneralResponse();

                    var deceasedProfile = await _context.Profile.FindAsync(i.DeceasedsProfileNumber);

                    activeFuneralResponse.DeceasedFullName       = deceasedProfile.Name + " " + deceasedProfile.Surname;
                    activeFuneralResponse.DeceasedsProfileNumber = i.DeceasedsProfileNumber;
                    activeFuneralResponse.Created     = i.Created;
                    activeFuneralResponse.Contributed = contributed;
                    response.Add(activeFuneralResponse);
                }
            }

            return(response);
        }
Beispiel #11
0
        protected override OptionResult Run(GameHitParameters <GameObject> parameters)
        {
            //if (!UIUtils.IsOkayToStartModalDialog()) return false;

            bool hasExclusiveAccess;
            Lot  partyVenue = GetVenue(parameters.mActor, out hasExclusiveAccess);

            float            num2;
            OutfitCategories formalwear;

            Sims3.Gameplay.Situations.Party party = null;
            bool isPartyAtHome = (partyVenue == parameters.mActor.LotHome);

            if (partyVenue == null)
            {
                return(OptionResult.Failure);
            }
            if (!parameters.mActor.IsSelectable)
            {
                return(OptionResult.Failure);
            }

            PartyPickerDialog.PartyType partyTypes = PartyPickerDialog.PartyType.kAll;

            // Keep as GameUtils
            if (GameUtils.IsOnVacation())
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kBirthday;
            }

            if (partyVenue.LastDiedSim == null)
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kFuneral;
            }

            Sim actorSim = parameters.mActor as Sim;

            Political job = actorSim.Occupation as Political;

            if ((job == null) || (!job.HasCampaignMoneyMetric()))
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kCampaign;
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kWedding;

            foreach (Sim sim in CommonSpace.Helpers.Households.AllSims(parameters.mActor.Household))
            {
                if (sim.IsEngaged)
                {
                    partyTypes |= PartyPickerDialog.PartyType.kWedding;
                    break;
                }
            }

            if (!GameUtils.IsInstalled(ProductVersion.EP4))
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kBachelorParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
            }
            else
            {
                if (isPartyAtHome)
                {
                    if (!actorSim.SimDescription.Child)
                    {
                        partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                    }

                    if (!actorSim.SimDescription.Teen)
                    {
                        partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                        partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
                    }
                }
                else
                {
                    partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                    partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                    partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
                }
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kPoolParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kFeastParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kCostumeParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kGiftGivingParty;
            if (GameUtils.IsInstalled(ProductVersion.EP8) /*&& isPartyAtHome*/)
            {
                partyTypes |= PartyPickerDialog.PartyType.kFeastParty;
                partyTypes |= PartyPickerDialog.PartyType.kCostumeParty;
                partyTypes |= PartyPickerDialog.PartyType.kGiftGivingParty;
                //if (PoolParty.CanSimThrowPoolParty(actorSim))
                if (partyVenue.GetSwimmingPoolCount() > 0)
                {
                    partyTypes |= PartyPickerDialog.PartyType.kPoolParty;
                }
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kJuiceKeggerParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kBonfire;
            partyTypes &= ~PartyPickerDialog.PartyType.kTailgatingParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kVideoGameLANParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kMasqueradeBall;
            partyTypes &= ~PartyPickerDialog.PartyType.kVictoryParty;

            if (GameUtils.IsInstalled(ProductVersion.EP9))
            {
                partyTypes |= PartyPickerDialog.PartyType.kTailgatingParty;
                partyTypes |= PartyPickerDialog.PartyType.kVideoGameLANParty;
                partyTypes |= PartyPickerDialog.PartyType.kMasqueradeBall;
                partyTypes |= PartyPickerDialog.PartyType.kVictoryParty;

                if (JuiceKeggerParty.CanSimThrowJuiceKeggerParty(actorSim))
                {
                    partyTypes |= PartyPickerDialog.PartyType.kJuiceKeggerParty;
                }

                if (BonfireParty.CanSimThrowBonfire(actorSim))
                {
                    partyTypes |= PartyPickerDialog.PartyType.kBonfire;
                }
            }

            bool         criteriaCanceled;
            SimSelection list = SimSelection.Create(Common.Localize("Party:SelectTitle"), actorSim.SimDescription, this, GetCriteria(parameters), false, false, out criteriaCanceled);

            if (list.IsEmpty)
            {
                SimpleMessageDialog.Show(Common.LocalizeEAString("Gameplay/Objects/Electronics/Phone/CallThrowParty:NoSimsWT"), Common.LocalizeEAString(parameters.mActor.IsFemale, "Gameplay/Objects/Electronics/Phone/CallThrowParty:NoSims", new object[] { parameters.mActor }), ModalDialog.PauseMode.PauseSimulator);
                return(OptionResult.Failure);
            }

            float openHour    = -1f;
            float closingHour = -1f;

            PartyPickerDialog.PartyInfo info = PartyPickerDialogEx.Show(partyTypes, list.GetPickerInfo(), parameters.mActor.GetThumbnailKey(), isPartyAtHome, 25, -1, openHour, closingHour, PartyPickerDialog.ClothingType.kNone, actorSim.IsFemale);
            if ((info == null) || (info.PartyType == PartyPickerDialog.PartyType.kNone))
            {
                return(OptionResult.Failure);
            }

            float hoursPassedOfDay = SimClock.HoursPassedOfDay;

            if (hoursPassedOfDay > info.Time)
            {
                num2 = 24f - (hoursPassedOfDay - info.Time);
            }
            else
            {
                num2 = info.Time - hoursPassedOfDay;
            }
            if (num2 < 1f)
            {
                num2 += 24f;
            }
            long        ticks            = SimClock.ConvertToTicks(num2, TimeUnit.Hours);
            DateAndTime startTime        = SimClock.CurrentTime() + new DateAndTime(ticks);
            bool        bHostIsLegendary = actorSim.HasTrait(TraitNames.LegendaryHost);
            float       fMaxLTR          = 0f;
            LTRData     data             = LTRData.Get(LongTermRelationshipTypes.Friend);

            if (data != null)
            {
                fMaxLTR = data.Liking - 1;
            }
            List <SimDescription> simList = new List <SimDescription>();

            foreach (object obj2 in info.SimList)
            {
                SimDescription simDescription = obj2 as SimDescription;
                if ((simDescription != null) && CanSimBeInvitedToParty(simDescription, partyVenue, actorSim, fMaxLTR, bHostIsLegendary, true))
                {
                    if (!simList.Contains(simDescription))
                    {
                        simList.Add(simDescription);
                        if (simDescription.TraitManager.HasElement(TraitNames.PartyAnimal))
                        {
                            Sim createdSim = simDescription.CreatedSim;
                            if (createdSim != null)
                            {
                                TraitTipsManager.ShowTraitTip(13271263770231522640L, createdSim, TraitTipsManager.TraitTipCounterIndex.PartyAnimal, TraitTipsManager.kPartyAnimalCountOfParties);
                            }
                        }
                        if (simDescription.IsCelebrity)
                        {
                            EventTracker.SendEvent(EventTypeId.kPartyInviteCeleb, parameters.mActor);
                        }
                    }

                    bool bShouldMatchAge = (simDescription.Age == actorSim.SimDescription.Age) && ((simDescription.Teen) || (simDescription.Child));
                    if (!hasExclusiveAccess && RandomUtil.RandomChance(HouseParty.HousePartyParams.PercentageChanceOfBringingAFriend))
                    {
                        SimDescription friend = SocialComponent.FindFriendNotInList(simDescription, simList, parameters.mActor.LotHome, bShouldMatchAge);
                        if ((friend != null) && CanSimBeInvitedToParty(friend, partyVenue, null, 0f, false, false))
                        {
                            simList.Add(friend);
                        }
                    }
                }
            }

            DateAndTime time = startTime;

            time.Ticks -= SimClock.ConvertToTicks(Sims3.Gameplay.Situations.Party.HoursToStartRentBeforePartyStart, TimeUnit.Hours);
            if (time.CompareTo(SimClock.CurrentTime()) < 0)
            {
                time = SimClock.Add(SimClock.CurrentTime(), TimeUnit.Minutes, 2f);
            }

            if ((partyVenue != parameters.mActor.LotHome) && !RentScheduler.Instance.RentLot(partyVenue, actorSim, time, simList, hasExclusiveAccess))
            {
                SimpleMessageDialog.Show(string.Empty, Phone.Call.LocalizeCallString("ThrowParty", "CantRent", new object[] { parameters.mActor }), ModalDialog.PauseMode.PauseSimulator);
                return(OptionResult.Failure);
            }

            switch (info.ClothingType)
            {
            case PartyPickerDialog.ClothingType.kFormal:
                formalwear = OutfitCategories.Formalwear;
                break;

            case PartyPickerDialog.ClothingType.kCasual:
                formalwear = OutfitCategories.Everyday;
                break;

            case PartyPickerDialog.ClothingType.kSwimwear:
                formalwear = OutfitCategories.Swimwear;
                break;

            case PartyPickerDialog.ClothingType.kCostumes:
                formalwear = OutfitCategories.Everyday;
                break;

            default:
                formalwear = OutfitCategories.Everyday;
                break;
            }

            float infoTime = info.Time;

            switch (info.PartyType)
            {
            case PartyPickerDialog.PartyType.kCampaign:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FundraiserTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FundraiserStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new CampaignFundraiser(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewFundraiser, parameters.mActor);
                break;

            case PartyPickerDialog.PartyType.kBirthday:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BirthdayTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BirthdayStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new BirthdayParty(partyVenue, actorSim, simList, formalwear, startTime);
                break;

            case PartyPickerDialog.PartyType.kWedding:
                string messageText = string.Empty;
                if (GameUtils.IsInstalled(ProductVersion.EP4))
                {
                    messageText = Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingStartWithArch", new object[] { infoTime });
                }
                else
                {
                    messageText = Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingStart", new object[] { infoTime });
                }

                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingTitle"), messageText, ModalDialog.PauseMode.PauseSimulator);

                EnsureFianceeIsInvitedToWeddingParty(actorSim, simList);

                party = new WeddingParty(partyVenue, actorSim, simList, formalwear, startTime);
                break;

            case PartyPickerDialog.PartyType.kFuneral:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FuneralTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FuneralStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new Funeral(partyVenue, actorSim, simList, formalwear, startTime);
                break;

            case PartyPickerDialog.PartyType.kBachelorParty:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BachelorPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BachelorStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new BachelorParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewBachelorParty, actorSim);
                actorSim.SimDescription.SetHadBachelorParty();
                break;

            case PartyPickerDialog.PartyType.kTeenParty:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:TeenPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:TeenStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new TeenParty(partyVenue, actorSim, simList, formalwear, startTime);
                break;

            case PartyPickerDialog.PartyType.kChildSlumberParty:
            case PartyPickerDialog.PartyType.kTeenSlumberParty:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:SlumberPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:SlumberStart", new object[] { infoTime, actorSim }), ModalDialog.PauseMode.PauseSimulator);
                party = new SlumberParty(partyVenue, actorSim, simList, formalwear, startTime);
                break;

            case PartyPickerDialog.PartyType.kCostumeParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:CostumePartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:CostumePartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new CostumeParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kCostumePartyScheduled, actorSim);
                break;

            case PartyPickerDialog.PartyType.kGiftGivingParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:GiftGivingPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:GiftGivingPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new GiftGivingParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kGiftGivingPartyScheduled, actorSim);
                break;

            case PartyPickerDialog.PartyType.kPoolParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:PoolPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:PoolPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new PoolParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kSchedulePoolParty, actorSim);
                break;

            case PartyPickerDialog.PartyType.kFeastParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:FeastPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:FeastPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new FeastParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kFeastPartyScheduled, actorSim);
                break;

            case PartyPickerDialog.PartyType.kJuiceKeggerParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:JuiceKeggerPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:JuiceKeggerStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new JuiceKeggerParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewJuiceKeggerParty, actorSim);
                break;

            case PartyPickerDialog.PartyType.kTailgatingParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:TailgatingPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:TailgatingStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new TailgatingParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewTailgatingParty, actorSim);
                break;

            case PartyPickerDialog.PartyType.kBonfire:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:BonfireTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:BonfireStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new BonfireParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewBonfireParty, actorSim);
                break;

            case PartyPickerDialog.PartyType.kVideoGameLANParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VideoGameLANPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VideoGameLANStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new VideoGameLANParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewVideoGameLANParty, actorSim);
                break;

            case PartyPickerDialog.PartyType.kMasqueradeBall:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:MasqueradeBallTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:MasqueradeStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new MasqueradeBall(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewMasqueradeBall, actorSim);
                break;

            case PartyPickerDialog.PartyType.kVictoryParty:
                SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VictoryPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VictoryStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new VictoryParty(partyVenue, actorSim, simList, formalwear, startTime);
                EventTracker.SendEvent(EventTypeId.kThrewVictoryParty, actorSim);
                break;

            default:
                SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:GenericTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:HouseStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                party = new HouseParty(partyVenue, actorSim, simList, formalwear, startTime);
                break;
            }

            if (party == null)
            {
                return(OptionResult.Failure);
            }

            foreach (SimDescription sim in party.GuestDescriptions)
            {
                Instantiation.EnsureInstantiate(sim, party.Lot);
            }

            EventTracker.SendEvent(new PartyEvent(EventTypeId.kThrewParty, actorSim, actorSim.SimDescription, party));
            if (actorSim.HasTrait(TraitNames.PartyAnimal))
            {
                TraitTipsManager.ShowTraitTip(13271263770231522640L, actorSim, TraitTipsManager.TraitTipCounterIndex.PartyAnimal, TraitTipsManager.kPartyAnimalCountOfParties);
            }
            return(OptionResult.SuccessClose);
        }
Beispiel #12
0
 public async Task <ResponseModel <Funeral> > CreateFuneral(Funeral funeral)
 {
     return(await CallCreate <Funeral>(funeral));
 }
Beispiel #13
0
 public async Task <ResponseModel <Funeral> > UpdateFuneral(int id, Funeral funeral)
 {
     return(await CallUpdate <Funeral>(id, funeral));
 }
        private void saveDeadPerson()
        {
            Funeral funeral = null;

            DeadPerson deadPerson = null;

            if (IsCreateMode)
            {
                funeral = new Funeral()
                {
                    FuneralID = Guid.NewGuid()
                };

                deadPerson = new DeadPerson()
                {
                    DeadPersonID = Guid.NewGuid()
                };
            }
            else
            {
                deadPerson = new DeadPersonService().getByID(this.DeadPersonID.ToString());
                funeral    = new FuneralService().getByID(deadPerson.FuneralID.ToString());
            }

            FuneralCompany      funeralCompany = new FuneralCompanyService().getByID(ddlFuneralCompany.SelectedValue);
            CemeteryStaffPerson cemeteryStaff  = new CemeteryStaffPersonService().getByID(ddlStaffPerson.SelectedValue);

            funeral.FuneralDate           = DateTime.ParseExact(txtFuneralDate.Text.Trim(), "dd.MM.yyyy", System.Globalization.CultureInfo.InvariantCulture);
            funeral.FuneralCompanyID      = funeralCompany.FuneralCompanyID;
            funeral.CemeteryStaffPersonID = cemeteryStaff.CemeteryStaffPersonID;

            BurialPlace burialPlace = new BurialPlaceService().getByID(ddlGraveNumber.SelectedValue);

            deadPerson.FirstName     = txtFirstName.Text;
            deadPerson.LastName      = txtLastName.Text;
            deadPerson.PESEL         = txtPesel.Text;
            deadPerson.Gender        = (EnumGender)int.Parse(ddlGender.SelectedValue);
            deadPerson.BurialPlaceID = burialPlace.BurialPlaceID;
            deadPerson.FuneralID     = funeral.FuneralID;

            try
            {
                Guid familyMemberID = Guid.Parse(ddlFamilyMember.SelectedValue);

                if (familyMemberID == Guid.Empty)
                {
                    deadPerson.FamilyMemberID = null;
                    deadPerson.FamilyMember   = null;
                }
                else
                {
                    if (!IsCreateMode)
                    {
                        deadPerson.FamilyMember = new FamilyMemberService().getBy(x => x.FamilyMemberID.Equals(familyMemberID))[0];
                    }

                    deadPerson.FamilyMemberID = familyMemberID;
                }
            }
            catch (Exception ex) { }

            if (IsCreateMode)
            {
                new FuneralService().create(funeral);

                new DeadPersonService().create(deadPerson);
                Response.Redirect(string.Format("/Pages/DeadPersonsDetails?DeadPersonID={0}", deadPerson.DeadPersonID.ToString()));
            }
            else
            {
                new DeadPersonService().update(deadPerson);
            }
        }
        public async Task <ResponseModel <Funeral> > CreateFuneral(Funeral funeral)
        {
            ResponseModel <Funeral> response = InitializeFuneral();

            return(await CreateRecord(funeral, response));
        }
Beispiel #16
0
        protected override OptionResult Run(GameHitParameters<GameObject> parameters)
        {
            //if (!UIUtils.IsOkayToStartModalDialog()) return false;

            bool hasExclusiveAccess;
            Lot partyVenue = GetVenue(parameters.mActor, out hasExclusiveAccess);

            float num2;
            OutfitCategories formalwear;
            Sims3.Gameplay.Situations.Party party = null;
            bool isPartyAtHome = (partyVenue == parameters.mActor.LotHome);
            if (partyVenue == null)
            {
                return OptionResult.Failure;
            }
            if (!parameters.mActor.IsSelectable)
            {
                return OptionResult.Failure;
            }

            PartyPickerDialog.PartyType partyTypes = PartyPickerDialog.PartyType.kAll;

            // Keep as GameUtils
            if (GameUtils.IsOnVacation())
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kBirthday;
            }

            if (partyVenue.LastDiedSim == null)
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kFuneral;
            }

            Sim actorSim = parameters.mActor as Sim;

            Political job = actorSim.Occupation as Political;
            if ((job == null) || (!job.HasCampaignMoneyMetric()))
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kCampaign;
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kWedding;

            foreach (Sim sim in CommonSpace.Helpers.Households.AllSims(parameters.mActor.Household))
            {
                if (sim.IsEngaged)
                {
                    partyTypes |= PartyPickerDialog.PartyType.kWedding;
                    break;
                }
            }

            if (!GameUtils.IsInstalled(ProductVersion.EP4))
            {
                partyTypes &= ~PartyPickerDialog.PartyType.kBachelorParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
            }
            else
            {
                if (isPartyAtHome)
                {
                    if (!actorSim.SimDescription.Child)
                    {
                        partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                    }

                    if (!actorSim.SimDescription.Teen)
                    {
                        partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                        partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
                    }
                }
                else
                {
                    partyTypes &= ~PartyPickerDialog.PartyType.kChildSlumberParty;
                    partyTypes &= ~PartyPickerDialog.PartyType.kTeenParty;
                    partyTypes &= ~PartyPickerDialog.PartyType.kTeenSlumberParty;
                }
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kPoolParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kFeastParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kCostumeParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kGiftGivingParty;
            if (GameUtils.IsInstalled(ProductVersion.EP8) /*&& isPartyAtHome*/)
            {
                partyTypes |= PartyPickerDialog.PartyType.kFeastParty;
                partyTypes |= PartyPickerDialog.PartyType.kCostumeParty;
                partyTypes |= PartyPickerDialog.PartyType.kGiftGivingParty;
                //if (PoolParty.CanSimThrowPoolParty(actorSim))
                if (partyVenue.GetSwimmingPoolCount() > 0)
                {
                    partyTypes |= PartyPickerDialog.PartyType.kPoolParty;
                }
            }

            partyTypes &= ~PartyPickerDialog.PartyType.kJuiceKeggerParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kBonfire;
            partyTypes &= ~PartyPickerDialog.PartyType.kTailgatingParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kVideoGameLANParty;
            partyTypes &= ~PartyPickerDialog.PartyType.kMasqueradeBall;
            partyTypes &= ~PartyPickerDialog.PartyType.kVictoryParty;

            if (GameUtils.IsInstalled(ProductVersion.EP9))
            {
                partyTypes |= PartyPickerDialog.PartyType.kTailgatingParty;
                partyTypes |= PartyPickerDialog.PartyType.kVideoGameLANParty;
                partyTypes |= PartyPickerDialog.PartyType.kMasqueradeBall;
                partyTypes |= PartyPickerDialog.PartyType.kVictoryParty;

                if (JuiceKeggerParty.CanSimThrowJuiceKeggerParty(actorSim))
                {
                    partyTypes |= PartyPickerDialog.PartyType.kJuiceKeggerParty;
                }

                if (BonfireParty.CanSimThrowBonfire(actorSim))
                {
                    partyTypes |= PartyPickerDialog.PartyType.kBonfire;
                }
            }

            bool criteriaCanceled;
            SimSelection list = SimSelection.Create(Common.Localize("Party:SelectTitle"), actorSim.SimDescription, this, GetCriteria(parameters), false, false, out criteriaCanceled);

            if (list.IsEmpty)
            {
                SimpleMessageDialog.Show(Common.LocalizeEAString("Gameplay/Objects/Electronics/Phone/CallThrowParty:NoSimsWT"), Common.LocalizeEAString(parameters.mActor.IsFemale, "Gameplay/Objects/Electronics/Phone/CallThrowParty:NoSims", new object[] { parameters.mActor }), ModalDialog.PauseMode.PauseSimulator);
                return OptionResult.Failure;
            }

            float openHour = -1f;
            float closingHour = -1f;

            PartyPickerDialog.PartyInfo info = PartyPickerDialogEx.Show(partyTypes, list.GetPickerInfo(), parameters.mActor.GetThumbnailKey(), isPartyAtHome, 25, -1, openHour, closingHour, PartyPickerDialog.ClothingType.kNone, actorSim.IsFemale);
            if ((info == null) || (info.PartyType == PartyPickerDialog.PartyType.kNone))
            {
                return OptionResult.Failure;
            }

            float hoursPassedOfDay = SimClock.HoursPassedOfDay;
            if (hoursPassedOfDay > info.Time)
            {
                num2 = 24f - (hoursPassedOfDay - info.Time);
            }
            else
            {
                num2 = info.Time - hoursPassedOfDay;
            }
            if (num2 < 1f)
            {
                num2 += 24f;
            }
            long ticks = SimClock.ConvertToTicks(num2, TimeUnit.Hours);
            DateAndTime startTime = SimClock.CurrentTime() + new DateAndTime(ticks);
            bool bHostIsLegendary = actorSim.HasTrait(TraitNames.LegendaryHost);
            float fMaxLTR = 0f;
            LTRData data = LTRData.Get(LongTermRelationshipTypes.Friend);
            if (data != null)
            {
                fMaxLTR = data.Liking - 1;
            }
            List<SimDescription> simList = new List<SimDescription>();
            foreach (object obj2 in info.SimList)
            {
                SimDescription simDescription = obj2 as SimDescription;
                if ((simDescription != null) && CanSimBeInvitedToParty(simDescription, partyVenue, actorSim, fMaxLTR, bHostIsLegendary, true))
                {
                    if (!simList.Contains(simDescription))
                    {
                        simList.Add(simDescription);
                        if (simDescription.TraitManager.HasElement(TraitNames.PartyAnimal))
                        {
                            Sim createdSim = simDescription.CreatedSim;
                            if (createdSim != null)
                            {
                                TraitTipsManager.ShowTraitTip(13271263770231522640L, createdSim, TraitTipsManager.TraitTipCounterIndex.PartyAnimal, TraitTipsManager.kPartyAnimalCountOfParties);
                            }
                        }
                        if (simDescription.IsCelebrity)
                        {
                            EventTracker.SendEvent(EventTypeId.kPartyInviteCeleb, parameters.mActor);
                        }
                    }

                    bool bShouldMatchAge = (simDescription.Age == actorSim.SimDescription.Age) && ((simDescription.Teen) || (simDescription.Child));
                    if (!hasExclusiveAccess && RandomUtil.RandomChance(HouseParty.HousePartyParams.PercentageChanceOfBringingAFriend))
                    {
                        SimDescription friend = SocialComponent.FindFriendNotInList(simDescription, simList, parameters.mActor.LotHome, bShouldMatchAge);
                        if ((friend != null) && CanSimBeInvitedToParty(friend, partyVenue, null, 0f, false, false))
                        {
                            simList.Add(friend);
                        }
                    }
                }
            }

            DateAndTime time = startTime;
            time.Ticks -= SimClock.ConvertToTicks(Sims3.Gameplay.Situations.Party.HoursToStartRentBeforePartyStart, TimeUnit.Hours);
            if (time.CompareTo(SimClock.CurrentTime()) < 0)
            {
                time = SimClock.Add(SimClock.CurrentTime(), TimeUnit.Minutes, 2f);
            }

            if ((partyVenue != parameters.mActor.LotHome) && !RentScheduler.Instance.RentLot(partyVenue, actorSim, time, simList, hasExclusiveAccess))
            {
                SimpleMessageDialog.Show(string.Empty, Phone.Call.LocalizeCallString("ThrowParty", "CantRent", new object[] { parameters.mActor }), ModalDialog.PauseMode.PauseSimulator);
                return OptionResult.Failure;
            }

            switch (info.ClothingType)
            {
                case PartyPickerDialog.ClothingType.kFormal:
                    formalwear = OutfitCategories.Formalwear;
                    break;

                case PartyPickerDialog.ClothingType.kCasual:
                    formalwear = OutfitCategories.Everyday;
                    break;

                case PartyPickerDialog.ClothingType.kSwimwear:
                    formalwear = OutfitCategories.Swimwear;
                    break;

                case PartyPickerDialog.ClothingType.kCostumes:
                    formalwear = OutfitCategories.Everyday;
                    break;

                default:
                    formalwear = OutfitCategories.Everyday;
                    break;
            }

            float infoTime = info.Time;

            switch (info.PartyType)
            {
                case PartyPickerDialog.PartyType.kCampaign:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FundraiserTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FundraiserStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new CampaignFundraiser(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewFundraiser, parameters.mActor);
                    break;
                case PartyPickerDialog.PartyType.kBirthday:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BirthdayTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BirthdayStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new BirthdayParty(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
                case PartyPickerDialog.PartyType.kWedding:
                    string messageText = string.Empty;
                    if (GameUtils.IsInstalled(ProductVersion.EP4))
                    {
                        messageText = Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingStartWithArch", new object[] { infoTime });
                    }
                    else
                    {
                        messageText = Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingStart", new object[] { infoTime });
                    }

                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:WeddingTitle"), messageText, ModalDialog.PauseMode.PauseSimulator);

                    EnsureFianceeIsInvitedToWeddingParty(actorSim, simList);

                    party = new WeddingParty(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
                case PartyPickerDialog.PartyType.kFuneral:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FuneralTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:FuneralStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new Funeral(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
                case PartyPickerDialog.PartyType.kBachelorParty:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BachelorPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:BachelorStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new BachelorParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewBachelorParty, actorSim);
                    actorSim.SimDescription.SetHadBachelorParty();
                    break;
                case PartyPickerDialog.PartyType.kTeenParty:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:TeenPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:TeenStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new TeenParty(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
                case PartyPickerDialog.PartyType.kChildSlumberParty:
                case PartyPickerDialog.PartyType.kTeenSlumberParty:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:SlumberPartyTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:SlumberStart", new object[] { infoTime, actorSim }), ModalDialog.PauseMode.PauseSimulator);
                    party = new SlumberParty(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
                case PartyPickerDialog.PartyType.kCostumeParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:CostumePartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:CostumePartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new CostumeParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kCostumePartyScheduled, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kGiftGivingParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:GiftGivingPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:GiftGivingPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new GiftGivingParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kGiftGivingPartyScheduled, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kPoolParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:PoolPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:PoolPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new PoolParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kSchedulePoolParty, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kFeastParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:FeastPartyTitle", new object[0x0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situation/Party:FeastPartyStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new FeastParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kFeastPartyScheduled, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kJuiceKeggerParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:JuiceKeggerPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:JuiceKeggerStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new JuiceKeggerParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewJuiceKeggerParty, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kTailgatingParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:TailgatingPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:TailgatingStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new TailgatingParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewTailgatingParty, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kBonfire:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:BonfireTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:BonfireStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new BonfireParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewBonfireParty, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kVideoGameLANParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VideoGameLANPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VideoGameLANStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new VideoGameLANParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewVideoGameLANParty, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kMasqueradeBall:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:MasqueradeBallTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:MasqueradeStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new MasqueradeBall(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewMasqueradeBall, actorSim);
                    break;

                case PartyPickerDialog.PartyType.kVictoryParty:
                    SimpleMessageDialog.Show(Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VictoryPartyTitle", new object[0]), Localization.LocalizeString(actorSim.IsFemale, "Gameplay/Situations/Party:VictoryStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new VictoryParty(partyVenue, actorSim, simList, formalwear, startTime);
                    EventTracker.SendEvent(EventTypeId.kThrewVictoryParty, actorSim);
                    break;

                default:
                    SimpleMessageDialog.Show(Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:GenericTitle"), Common.LocalizeEAString(actorSim.IsFemale, "Gameplay/Situations/Party:HouseStart", new object[] { infoTime }), ModalDialog.PauseMode.PauseSimulator);
                    party = new HouseParty(partyVenue, actorSim, simList, formalwear, startTime);
                    break;
            }

            if (party == null) return OptionResult.Failure;

            foreach (SimDescription sim in party.GuestDescriptions)
            {
                Instantiation.EnsureInstantiate(sim, party.Lot);
            }

            EventTracker.SendEvent(new PartyEvent(EventTypeId.kThrewParty, actorSim, actorSim.SimDescription, party));
            if (actorSim.HasTrait(TraitNames.PartyAnimal))
            {
                TraitTipsManager.ShowTraitTip(13271263770231522640L, actorSim, TraitTipsManager.TraitTipCounterIndex.PartyAnimal, TraitTipsManager.kPartyAnimalCountOfParties);
            }
            return OptionResult.SuccessClose;
        }
        public async Task <IActionResult> PostFuneral(Funeral funeral)
        {
            var response = await _db.CreateFuneral(funeral);

            return(_responsesService.PostResponse(response));
        }
Beispiel #18
0
 public FuneralViewModel(Funeral funeral, DeadPerson deadPerson)
 {
     this.Funeral    = funeral;
     this.DeadPerson = deadPerson;
 }