Example #1
0
    protected void WizardCreateConference_Finish(object sender, WizardNavigationEventArgs e)
    {
        Parley newParley = Parley.Create(Organization.FromIdentity(Int32.Parse(this.DropOrganizations.SelectedValue)),
                                         _currentUser,
                                         this.DropBudgets.SelectedFinancialAccount,
                                         this.TextConferenceName.Text, this.DropGeographies.SelectedGeography,
                                         this.TextDescription.Text, this.TextConferenceUrl.Text,
                                         (DateTime)this.DateStart.SelectedDate,
                                         ((DateTime)this.DateStart.SelectedDate).AddDays(
                                             Int32.Parse(this.TextDateCount.Text) - 1),
                                         Int32.Parse(this.TextBudgetRequested.Text) * 100L,
                                         Int32.Parse(this.TextGuaranteeRequested.Text) * 100L,
                                         Int32.Parse(this.TextAttendanceFee.Text) * 100L);

        string currentItems = (string)ViewState["Options"];

        string[] itemsArray = currentItems.Split('|');

        for (int index = 0; index < itemsArray.Length; index += 2)
        {
            double localAmount = Double.Parse(itemsArray[index + 1], CultureInfo.InvariantCulture);
            newParley.CreateOption(itemsArray[index], (Int64)(localAmount * 100L));
        }
    }