Example #1
0
        protected void wizard_finishClick(object sender, WizardNavigationEventArgs e)
        {
            if (CaptchaControl1.IsValid)
            {
                GetContactInfo();

                StibContactManager manager = new StibContactManager();

                if (manager.SaveContact(stibcontact))
                {
                    MailHelper mailhelper = new MailHelper();
                    String kamptype = String.Empty;
                    String stibnaam = String.Format("{0} {1} {2}", stibcontact.Voornaam, stibcontact.Tussenvoegsel, stibcontact.Achternaam);

                    List<String> emails = new List<String>();

                    if (stibcontact.Kamptype == "1")
                    {
                        emails = mailhelper.GetStibMailFromConfig(false);
                        kamptype = "Jongste kamp";
                    }
                    else
                    {
                        emails = mailhelper.GetStibMailFromConfig(true);
                        kamptype = "Oudste kamp";

                    }

                    String subject = String.Format("Stibkamp {0} vraag: {1}", GetKamptype(stibcontact.Kamptype), stibnaam);

                    mailhelper.Send(CreateBody(), emails, subject);
                }
            }
        }
Example #2
0
        protected void WizardQueue_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            Queue q = new Queue();

            if (Session["queueEdit"] != null) q = (Queue)Session["queueEdit"];

            q.Queue_Name = this.title.Text;
            q.Queue_Address = this.location.Text;
            q.Queue_Description = this.description.Text;
            q.Queue_OwnerName = this.initiatorAlias.Text;
            q.Queue_ResetAtMidnight = this.minuit.Checked;
            q.Queue_ResetAtMaxReached = this.ticketsmaxopt.Checked;
            if (!string.IsNullOrEmpty(this.handlingTime.Text)) q.Queue_ExpectedHandlingTime = int.Parse(this.handlingTime.Text);
            if (this.ticketsmaxopt.Checked) q.Queue_MaxLimit = int.Parse(this.ticketsmax.Text);
            if (this.desactiverqueue.Checked) q.Queue_ValidTillDate = DateTime.Parse(this.desactivateDate.Text);
            q.Queue_Next_Increment = 1;
            q.Queue_IsActive = true;
            q.Queue_UserID = (Guid)Membership.GetUser().ProviderUserKey;

            HelperClass_Queue hcq = new HelperClass_Queue();

            if (Session["queueEdit"] == null)
            {
                q.Queue_IsActive = true;
                q = hcq.CreateQueue(q);
            }
            else
                hcq.UpdateQueue(q);

            Session["NewQueue"] = q.Queue_ID;

            this.Response.Redirect(Page.ResolveUrl("~/Queues/Confirmation.aspx"));
        }
Example #3
0
        protected void wizard_finishClick(object sender, WizardNavigationEventArgs e)
        {
            if (CaptchaControl1.IsValid)
            {
                PersonInfoManager manager = new PersonInfoManager();

                if (manager.SaveFormRegistration(stibber))
                {
                    MailHelper mailhelper = new MailHelper();
                    String kamptype = String.Empty;
                    String stibnaam = String.Format("{0} {1} {2}", stibber.VoorNaam, stibber.TussenVoegsel, stibber.Achternaam);

                    List<String> emails = new List<String>();

                    if (stibber.Kamptype == "1")
                    {
                        emails = mailhelper.GetStibMailFromConfig(false);
                        kamptype = "Jongste kamp";
                    }
                    else
                    {
                        emails = mailhelper.GetStibMailFromConfig(true);
                        kamptype = "Oudste kamp";

                    }

                    String subject = String.Format("Stibkamp {0} registratie: {1}", kamptype, stibnaam);

                    mailhelper.Send(CreateBody(), emails,subject);
                }
            }
        }
 protected void Wizard_FinishButton_Click(object sender, WizardNavigationEventArgs e)
 {
     if (Page.User.IsInRole("ProjectAdministrator"))
     {
         AddUserToRole(CreateUserWizard1.UserName, GroupName.SelectedValue);
     }
 }
Example #5
0
 protected void RegisterUser_NextButtonClick(object sender, WizardNavigationEventArgs e)
 {
     lblMsg.Text = "";
     try
     {
         if (RegisterUser.UserName.IndexOf(" ") > -1)
         {
             lblMsg.Text = "Tài khoản không được để khoảng trắng (dấu cách)!";
             return;
         }
         //Response.Write("RegisterUser_NextButtonClick");
         TUSER newUser = new TUSER();
         using (tDBContext mainDB = new tDBContext())
         {
             if (mainDB.TUSERs.Exist(string.Format("USER_ID='{0}'", RegisterUser.UserName)) == true)
             {
                 lblMsg.Text = "Tài khoản đã tồn tại, vui lòng xử dụng tài khoản khác!";
                 return;
             }
             //Response.Write(mainDB.TUSERs.Count().ToString());
             newUser.USER_ID = RegisterUser.UserName;
             newUser.USER_PASSWORD = RegisterUser.Password;
             newUser.USER_ROLE = 0;
             mainDB.TUSERs.InsertOnSubmit(newUser);
             mainDB.SubmitAllChange();
         }
         Session[ct.USER_ID] = newUser.USER_ID;
         Session[ct.USER_ROLE] = newUser.USER_ROLE;
         Response.Redirect("~/");
     }
     catch (Exception ex)
     {
         lblMsg.Text = string.Format("Xảy ra lỗi: {0}", ex.Message);
     }
 }
Example #6
0
    protected void Wizard1_NextButtonClick(object sender, System.Web.UI.WebControls.WizardNavigationEventArgs e)
    {
        if (e.CurrentStepIndex == 0)
        {
            System.Web.UI.WebControls.Login l = (Login)Wizard1.FindControl("Login1");

            if (Membership.ValidateUser(l.UserName, l.Password))
            {
                FormsAuthentication.SetAuthCookie(l.UserName, l.RememberMeSet);
                e.Cancel = false;
            }
            else
            {
                l.InstructionText = "Your login attempt was not successful. Please try again.";
                l.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;

                e.Cancel = true;
            }
        }
        else
        {
            if (!User.Identity.IsAuthenticated)
            {
                e.Cancel = true;
                Wizard1.ActiveStepIndex = 0;
            }
        }
    }
Example #7
0
 protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
 {
     if (!ctvCheck.IsValid)
     {
         return;
     }
 }
 protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     result.Text = "User name: " + Namefield.Text;
     result.Text += "<br />Credit card type: " + Card.Text;
     result.Text += "<br />Expiration Date: " + Calendar1.SelectMonthText + "12:00:00 AM";
     result.Text += "<br />will be used for the payment.";
 }
        protected void CreateUserWizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            using (var datas = new DataLayer.StandartWebDataContext())
            {
                var u = (from a in datas.aspnet_Users
                         where a.UserName == CreateUserWizard1.UserName
                         select a).FirstOrDefault();
                if (u != null)
                {
                    u.TUserProfile.FirstName = tbFirstName.Text;
                    u.TUserProfile.LastName = tbLastName.Text;
                    u.TUserProfile.Gender = (byte)rblGender.SelectedIndex;
                    DateTime dt;
                    if (DateTime.TryParse(tbBirthDate.Text, out dt))
                    {
                        u.TUserProfile.BirthDate = dt;
                    }
                    else
                    {
                        u.TUserProfile.BirthDate = null;
                    }

                    datas.SubmitChanges();
                }
            }
        }
        protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            string tournamentName = this.txtTournamentName.Text;
            string tournamentAbstract = this.txtAbstract.Text;
            string locations = this.txtLocations.Text;
            int numberOfPlayersLimit = Convert.ToInt32(this.txtLimitNumberOfPlayers.Text);
            int gameId = int.Parse(this.rbGame.SelectedValue);
            char tournamentMode = char.Parse(this.rbTournamentMode.SelectedValue);
            string matchingAlog = this.rbMatchingAlog.SelectedValue;
            int gamesPerDay = int.Parse(Request.Form["amount"].ToString());
            string[] timeFrames = Request.Form["timeFrame"].ToString().Split('-');

            TimeSpan timeWindowStart = TimeSpan.Parse(timeFrames[0]);
            TimeSpan timeWindowEnd = TimeSpan.Parse(timeFrames[1]);

            bool isOpenAllDay = this.cbIsOpenAllDay.Checked;
            string firstPrize = this.txtFirstPrize.Text;
            string secondPrize = this.txtSecondPrize.Text;
            string thirdPrize = this.txtThirdPrize.Text;
            DateTime startDate = DateTime.Parse(this.txtStartDate.Text);
            DateTime lastRegistrationDate = DateTime.Parse(this.txtLastRegistrationDate.Text);
            string tournamentId = TournamentManager.BuildTournament(Master.OrgBasicInfo.Id, tournamentName, tournamentAbstract, locations, numberOfPlayersLimit, gameId,tournamentMode, matchingAlog,gamesPerDay, timeWindowStart,
                timeWindowEnd, isOpenAllDay, firstPrize, secondPrize, thirdPrize, startDate, lastRegistrationDate);
            //string emailTemplate = string.Format(joinTournamentTemplate, Master.OrgBasicInfo.Name, tournamentName,
            //                                        Master.OrgBasicInfo.Id.ToString(),tournamentId, timeWindowStart.ToString(), timeWindowEnd.ToString(),locations,
            //                                        this.txtFirstPrize.Text, this.txtSecondPrize.Text, this.txtThirdPrize.Text);
            //TournamentManager.UpdateEmailTemplate(tournamentId, emailTemplate);
            Response.Redirect(@"~/backoffice/InvitToTournament.aspx?TournamentId=" + tournamentId);
        }
Example #11
0
        /// <summary>
        /// Process the order
        /// </summary>
        protected void wzdCheckOut_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            if (Profile.ShoppingCart.CartItems.Count > 0) {
                if (Profile.ShoppingCart.Count > 0) {

                    // display ordered items
                    CartListOrdered.Bind(Profile.ShoppingCart.CartItems);

                    // display total and credit card information
                    ltlTotalComplete.Text = ltlTotal.Text;
                    ltlCreditCardComplete.Text = ltlCreditCard.Text;

                    // create order
                    OrderInfo order = new OrderInfo(int.MinValue, DateTime.Now, User.Identity.Name, GetCreditCardInfo(), billingForm.Address, shippingForm.Address, Profile.ShoppingCart.Total, Profile.ShoppingCart.GetOrderLineItems(), null);

                    // insert
                    Order newOrder = new Order();
                    newOrder.Insert(order);

                    // destroy cart
                    Profile.ShoppingCart.Clear();
                    Profile.Save();
                }
            }
            else {
                lblMsg.Text = "<p><br>Can not process the order. Your cart is empty.</p><p class=SignUpLabel><a class=linkNewUser href=Default.aspx>Continue shopping</a></p>";
                wzdCheckOut.Visible = false;
            }
        }
Example #12
0
        protected void CoachWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            SqlCommand cmd = new SqlCommand("Insert Into Coach (UserName,Password,FirstName,SurName,EmailAddres,UserLogo,EnglandCoachID,ver_code,Is_Approved) VALUES(@UserName,@Password,@FirstName,@LastName,@EmailAdd,'~/Images/User-icon128.png',@EnglandCoachID,newid(),0)", con);
            cmd.CommandType = System.Data.CommandType.Text;
            cmd.Parameters.AddWithValue("@UserName", tbcoachusername.Text);
            cmd.Parameters.AddWithValue("@Password", tbpw1.Text);
            cmd.Parameters.AddWithValue("@FirstName", tbcfirstname.Text);
            cmd.Parameters.AddWithValue("@LastName", tbclastname.Text);
            cmd.Parameters.AddWithValue("@EmailAdd", tbceadd.Text);
            cmd.Parameters.AddWithValue("@EnglandCoachID", tbcengid.Text);
            con.Open();
            try
            {
                cmd.ExecuteNonQuery();
                con.Close();
                //Response.Redirect("~/CoachLogin.aspx");
                Sendemail();
                lber.Text = ("Thank you " + tbcfirstname.Text.ToString() + " for Registering. You will need to Activate your account to access the site fully.");
                clear();
            }

            catch (Exception er)
            {
                Response.Write("<h2>Something went wrong</h2> Please Try Again.");
                lber.Text = er.Message;

            }
            finally
            {
                //Any Special Action we want to Add.
            }
        }
Example #13
0
        protected void Donation_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            //insert stuff into session
            Session["donor_first_name"] = this.firstNameTBox.Text;
            Session["donor_last_name"] = this.lastNameTBox.Text;
            Session["donor_email"] = this.emailTBox.Text;

                //Donation
                String donation = "0.00";
                if (this._5.Checked)
                    donation = this._5.Text;
                else if (this._10.Checked)
                    donation = this._10.Text;
                else if (this._15.Checked)
                    donation = this._15.Text;
                else if (this._20.Checked)
                    donation = this._20.Text;
                else if (this._25.Checked)
                    donation = this._25.Text;
                else if (this.other.Checked)
                    donation = this.donationAmountTxb.Text;

                Session["donation_amount"] = donation;

            //insert stuff into DB
                controller.insertDonation(this.firstNameTBox.Text, this.lastNameTBox.Text,
                    this.emailTBox.Text, double.Parse(donation));
        }
 protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     try
     {
         StringBuilder eBody = new StringBuilder();
         eBody.Append(string.Format("From  : {0} \r\n", this.txtEmail.Text));
         eBody.Append(string.Format("Name  : {0} \r\n", this.txtName.Text));
         eBody.Append(string.Format("Phone : {0} \r\n", this.txtPhoneNo.Text));
         eBody.Append(string.Format("Address  : {0} \r\n", this.txtAddress.Text));
         eBody.Append("======================================================\r\n\r\n");
         eBody.Append(string.Format("Referrer  : {0}\r\n\r\n", this.txtReferrer.Text));
         eBody.Append(string.Format("First time contact?  : {0}\r\n\r\n", this.rdbFirstTimeYes.Checked ? "Yes" : "No"));
         eBody.Append(string.Format("Product or feature interests  : \r\n{0}\r\n\r\n", this.txtInterests.Text));
         eBody.Append(string.Format("Feedback or message : \r\n{0}\r\n\r\n", this.txtMessage.Text));
         
         Exception ex = null;
         if (!MailControl.SendMail("Site Customer Feedback", eBody.ToString(), ref ex))
         {
             throw ex;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
 {
     Response.Write("CurrentStepIndex = "+e.CurrentStepIndex.ToString() + "<br/>");
     Response.Write("NextStepIndex = " + e.NextStepIndex.ToString() + "<br/>");
     //e.Cancel = true;
     e.Cancel = CheckBox1.Checked;
 }
        protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            //prepare empty string for facility
            string strFacilities = string.Empty;

            //loop for constructing facilities.
            foreach (ListItem li in CheckBoxList1.Items)
            {
                if (li.Selected)
                    strFacilities += li.Text + "<br/>";
            }

            //display output result
            lblFinished.Text = string.Format("Thank you {0} {1} <br/>"+
                                            "Your details are: <br/>" +
                                            "Phone:{2} <br/>"+
                                            "Email:{3} <br/>"+
                                            "Address:{4} <br/>"+
                                            "Date of stay: {5} <br/>"+
                                            "Length of stay: {6} <br/>"+
                                            "Number of people staying: {7} <br/>"+
                                            "Type of room: {8} <br/>" +
                                            "Facilities: {9} <br/>",

                                            txtFname.Text, txtLname.Text,
                                            txtContactNumber.Text,
                                            txtEmail.Text,
                                            txtAddress.Text,
                                            Calendar1.SelectedDate.ToShortDateString(),
                                            txtStayLength.Text,
                                            txtNumOfPeople.Text,
                                            DropDownList1.SelectedItem.Text,
                                            strFacilities);
        }
Example #17
0
        protected void emailWizard_NextButtonClick( object sender, WizardNavigationEventArgs e )
        {
            string userName = null;
              string newEmail = null;
              try
              {
            newEmail = Email.Text;
            if ( !IsValidEmail( Email.Text ) )
            {
              throw new ApplicationException( "Please provide a valid email." );
            }

            MembershipUser user = Membership.GetUser();
            userName = user.UserName;
            if ( !Membership.ValidateUser( userName, PasswordForEmail.Text ) )
            {
              throw new ApplicationException( "Password is incorrect." );
            }

            user.Email = Email.Text;
            Membership.UpdateUser( user );
              }
              catch ( ApplicationException exc )
              {
            EmailChangeFailureText.Text = exc.Message;
              }
              catch ( Exception exc )
              {
            log.FatalFormat( "Can't change email from to {0} for {1}: {2}", userName, newEmail, exc );
            EmailChangeFailureText.Text = exc.Message;
              }

              e.Cancel = EmailChangeFailureText.Text != "";
        }
Example #18
0
        protected void CreateSessionWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["J15dbConnectionString1"].ConnectionString);
            SqlCommand cmd = new SqlCommand("Insert Into Session (SessionName,SessionPlan,SessionRest,TotalSessionMilage,CoachID) VALUES(@SessionName,@SessionPlan,@SessionRest,@TotalSessionMilage,@CoachID)", conn);
            cmd.CommandType = System.Data.CommandType.Text;
            cmd.Parameters.AddWithValue("@SessionName", tbsessionname.Text);
            cmd.Parameters.AddWithValue("@SessionPlan", tbsessionplan.Text);
            cmd.Parameters.AddWithValue("@SessionRest", tbsessionrest.Text);
            cmd.Parameters.AddWithValue("@TotalSessionMilage", tbtotalsessmilage.Text);
            cmd.Parameters.AddWithValue("@CoachID", lbcid.Text);
            conn.Open();

            try
            {
                cmd.ExecuteNonQuery();
                conn.Close();
                lbsessionsaved.Text = ("Session " + tbsessionname.Text.ToString()+ " has been saved");
            }

            catch (Exception er)
            {
                Response.Write("<h2>Something went wrong</h2> Please Try Again.");
                lbsessionsaved.Text = er.Message;

            }
            finally
            {
                //Any Special Action we want to Add.
            }
        }
Example #19
0
    protected void Wizard1_FinishButtonClick(object sender, System.Web.UI.WebControls.WizardNavigationEventArgs e)
    {
        try
        {
            string strConnString = ConfigurationManager.ConnectionStrings["LocalSQLServer3"].ConnectionString;

            SqlConnection con = new SqlConnection(strConnString);
            SqlCommand    cmd = new SqlCommand();
            cmd.Connection  = con;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "dbo.sp_addnewapplication";
            cmd.Parameters.Add("@OppID", SqlDbType.Int).Value                   = DDLadv.SelectedValue;
            cmd.Parameters.Add("@schlid", SqlDbType.Int).Value                  = DDLschl.SelectedValue;
            cmd.Parameters.Add("@First", SqlDbType.NVarChar, 50).Value          = TBfirst.Text;
            cmd.Parameters.Add("@Middle", SqlDbType.NVarChar, 50).Value         = TBsecond.Text;
            cmd.Parameters.Add("@Last", SqlDbType.NVarChar, 50).Value           = TBlast.Text;
            cmd.Parameters.Add("@Birthdate", SqlDbType.NVarChar, 50).Value      = TBbirthdate.Text;
            cmd.Parameters.Add("@Birthplace", SqlDbType.NVarChar, 50).Value     = TBbirthplace.Text;
            cmd.Parameters.Add("@Address", SqlDbType.NVarChar, 50).Value        = TBaddress.Text;
            cmd.Parameters.Add("@City", SqlDbType.NVarChar, 50).Value           = TBcity.Text;
            cmd.Parameters.Add("@Hphone", SqlDbType.NVarChar, 50).Value         = TBphone.Text;
            cmd.Parameters.Add("@Mobile", SqlDbType.NVarChar, 50).Value         = TBmobile.Text;
            cmd.Parameters.Add("@SSN", SqlDbType.NVarChar, 50).Value            = TBssn.Text;
            cmd.Parameters.Add("@SSPlace", SqlDbType.NVarChar, 50).Value        = TBssplace.Text;
            cmd.Parameters.Add("@MaritalStatus", SqlDbType.Int).Value           = DDLmart.SelectedValue;
            cmd.Parameters.Add("@MilitarySituation", SqlDbType.Int).Value       = DDLmilitary.SelectedValue;
            cmd.Parameters.Add("@BachelorDegID", SqlDbType.NVarChar, 50).Value  = TBeducertif.Text;
            cmd.Parameters.Add("@teaappjobsid", SqlDbType.Int).Value            = DropDownList2.SelectedValue;
            cmd.Parameters.Add("@teaacknwayid", SqlDbType.Int).Value            = DropDownList1.SelectedValue;
            cmd.Parameters.Add("@Gradutionyear", SqlDbType.Int).Value           = DropDownList3.SelectedValue;
            cmd.Parameters.Add("@collegeid", SqlDbType.Int).Value               = DropDownList4.SelectedValue;
            cmd.Parameters.Add("@Uni", SqlDbType.NVarChar, 50).Value            = TBuni.Text;
            cmd.Parameters.Add("@Gradscore", SqlDbType.NVarChar, 50).Value      = TBscore.Text;
            cmd.Parameters.Add("@PreviousExp1", SqlDbType.NVarChar, 50).Value   = TBexp1.Text;
            cmd.Parameters.Add("@datefrom1", SqlDbType.NVarChar, 50).Value      = TBfrom1.Text;
            cmd.Parameters.Add("@dateto1", SqlDbType.NVarChar, 50).Value        = TBto1.Text;
            cmd.Parameters.Add("@PreviousExp2", SqlDbType.NVarChar, 50).Value   = TBexp2.Text;
            cmd.Parameters.Add("@datefrom2", SqlDbType.NVarChar, 50).Value      = TBfrom2.Text;
            cmd.Parameters.Add("@dateto2", SqlDbType.NVarChar, 50).Value        = TBto2.Text;
            cmd.Parameters.Add("@PreviousExp3", SqlDbType.NVarChar, 50).Value   = TBexp3.Text;
            cmd.Parameters.Add("@datefrom3", SqlDbType.NVarChar, 50).Value      = TBfrom3.Text;
            cmd.Parameters.Add("@dateto3", SqlDbType.NVarChar, 50).Value        = TBto3.Text;
            cmd.Parameters.Add("@PreviousExp4", SqlDbType.NVarChar, 50).Value   = TBexp4.Text;
            cmd.Parameters.Add("@datefrom4", SqlDbType.NVarChar, 50).Value      = TBfrom4.Text;
            cmd.Parameters.Add("@dateto4", SqlDbType.NVarChar, 50).Value        = TBto4.Text;
            cmd.Parameters.Add("@reasonforleave", SqlDbType.NVarChar, 50).Value = TBReson.Text;
            cmd.Parameters.Add("@lastjobpay", SqlDbType.NVarChar, 50).Value     = TBlastsal.Text;
            cmd.Parameters.Add("@expectedpay", SqlDbType.NVarChar, 50).Value    = TBexpectedsal.Text;
            cmd.Parameters.Add("@extracourses", SqlDbType.NVarChar, 50).Value   = extracourses.Text;
            cmd.Parameters.Add("@empname", SqlDbType.NVarChar, 50).Value        = empname.Text;
            con.Open();
            cmd.ExecuteNonQuery();
            Response.Redirect("printapp.aspx");
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
Example #20
0
 protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     Result.Text = "<h3>Summary of input</h3>";
     Result.Text += "<br/> User name: " + YourName.Text;
     Result.Text += "<br/> Credit card type: " + CardType.Text;
     Result.Text += "<br/> Expiration date: " + Expiration.SelectedDate;
     Result.Text += "<br/>will be used for the payment";
 }
Example #21
0
        /// <summary>
        /// Fires when finish button is pressed
        /// </summary>
        protected void WelcomeWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            // Cookie only
            //Response.Redirect("~/lobby");

            // QueryString
            Response.Redirect("~/lobby/" + LblAccessCode.Text);
        }
Example #22
0
        void wzdAccount_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            DataAccess.Security.DAccountProfile daProfile = new DataAccess.Security.DAccountProfile();
            DataAccess.Security.DAccounts daAccount = new DataAccess.Security.DAccounts();

            DataAccess.AccountProfile profileEntity = new DataAccess.AccountProfile();

            //Profile
            profileEntity.Id = Guid.NewGuid();
            profileEntity.FirstName = txtFname.Text;
            profileEntity.LastName = txtLname.Text;
            profileEntity.FirstName = string.Format("{0} {1}", txtFname.Text, txtLname.Text);
            profileEntity.Title = txtTitle.Text;
            profileEntity.JobTitle = txtJobTitle.Text;
            profileEntity.IsMale = bool.Parse(ddlSex.SelectedValue);
            profileEntity.IsDeleted = false;

            //Account
            if (txtPassword.Text != txtConfirmPassword.Text)
            {
                return;
            }
            DataAccess.Account acctEntity = new DataAccess.Account();
            acctEntity.Id = Guid.NewGuid();
            acctEntity.UserName = txtUserName.Text;
            acctEntity.Email = txtEmail.Text;
            acctEntity.Password = txtConfirmPassword.Text;
            acctEntity.IsDeleted = false;
            acctEntity.ChangePasswordOnFirstLogon = true;
            acctEntity.CreatedDate = DateTime.Now;

            //Roles
            List<string> roleCode = new List<string>();
            roleCode = chkRoles.Items.Cast<ListItem>().Where(x => x.Selected).Select(x => x.Value).ToList();

                try
                {
                    daProfile.CreateAccountProfile(profileEntity);
                    acctEntity.ProfileId = profileEntity.Id;
                    daAccount.CreateAccount(acctEntity);
                    daAccount.AddRoles(acctEntity.Id, roleCode);
                    SetMessage(MessageType.Succes, "Saving Successfull",true);
                }
                catch (System.Transactions.TransactionAbortedException ex)
                {
                    SetMessage(MessageType.Error, ex.Message,true);
                }
                catch (Exception ex)
                {
                    SetMessage(MessageType.Error, ex.Message, true);
                }

                RedirectToReferrerUrl();

            //daProfile.DeleteAccountProfile(profId.Value, false);
            //throw (ex);
        }
Example #23
0
        protected void OnFinish(object sender, WizardNavigationEventArgs e)
        {
            // Add the employee
            // TODO:: add ADO.NET code here

            // Show a message

            FinalMsg.Text = "La Operación ha sido completada exitosamente";
        }
    protected void carWizard_FinishButtonClick(object sender, System.Web.UI.WebControls.WizardNavigationEventArgs e)
    {
        // Get each value.
        string order = string.Format("{0}, your {1} {2} will arrive on {3}.",
                                     txtCarPetName.Text, ListBoxColors.SelectedValue, txtCarModel.Text,
                                     carCalendar.SelectedDate.ToShortDateString());

        // Assign to label
        lblOrder.Text = order;
    }
        protected void wizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            if (!Page.IsValid)
                return;

            try
            {
                VirtualMachine virtualMachine = new VirtualMachine();

                // the user controls
                this.SaveSettingsControls(ref virtualMachine);

                // collect and prepare data
                string hostname = String.Format("{0}.{1}", txtHostname.Text.Trim(), txtDomain.Text.Trim());

                string adminPassword = (string)ViewState["Password"];

                // external IPs
                List<int> extIps = new List<int>();
                foreach (ListItem li in listExternalAddresses.Items)
                    if (li.Selected) extIps.Add(Utils.ParseInt(li.Value));

                // private IPs
                string[] privIps = Utils.ParseDelimitedString(txtPrivateAddressesList.Text, '\n', '\r', ' ', '\t');

                string summaryEmail = chkSendSummary.Checked ? txtSummaryEmail.Text.Trim() : null;

                // create virtual machine
                IntResult res = ES.Services.VPS2012.CreateVirtualMachine(PanelSecurity.PackageId,
                    hostname, listOperatingSystems.SelectedValue, adminPassword, summaryEmail,
                    Utils.ParseInt(ddlCpu.SelectedValue), Utils.ParseInt(txtRam.Text.Trim()),
                    Utils.ParseInt(txtHdd.Text.Trim()), Utils.ParseInt(txtHddIOPSmin.Text.Trim()),
                    Utils.ParseInt(txtHddIOPSmax.Text.Trim()), Utils.ParseInt(txtSnapshots.Text.Trim()),
                    chkDvdInstalled.Checked, chkBootFromCd.Checked, chkNumLock.Checked,
                    chkStartShutdown.Checked, chkPauseResume.Checked, chkReboot.Checked, chkReset.Checked, chkReinstall.Checked,
                    chkExternalNetworkEnabled.Checked, Utils.ParseInt(txtExternalAddressesNumber.Text.Trim()), radioExternalRandom.Checked, extIps.ToArray(),
                    chkPrivateNetworkEnabled.Checked, Utils.ParseInt(txtPrivateAddressesNumber.Text.Trim()), radioPrivateRandom.Checked, privIps,
                    virtualMachine);

                if (res.IsSuccess)
                {
                    Response.Redirect(EditUrl("ItemID", res.Value.ToString(), "vps_general",
                        "SpaceID=" + PanelSecurity.PackageId.ToString()));
                }
                else
                {
                    messageBox.ShowMessage(res, "VPS_ERROR_CREATE", "VPS");
                }
            }
            catch (Exception ex)
            {
                messageBox.ShowErrorMessage("VPS_ERROR_CREATE", ex);
            }
        }
 protected void wzdForgetPassword_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     try
     {
         GotoLoginPage();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
        protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
        {
            if (e.NextStepIndex == 2)
            {
                lblFirstName.Text = txtFirstName.Text;
                lblLastName.Text = txtLastName.Text;
                lblGender.Text = ddlGender.SelectedValue;

                lblMobile.Text = txtMobile.Text;
                lblEmail.Text = txtEmail.Text;
            }
        }
Example #28
0
 protected void _importWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     ImportMode mode = ImportMode.Smart;
     if (_ddlCsvFormat.SelectedValue == ImportFacade.PricesFormatName)
         mode = (ImportMode)Enum.Parse(typeof(ImportMode), _rblImportMode.SelectedValue, true);
     var report = ImportFacade.ImportData(
         _ddlCsvFormat.SelectedValue,
         mode,
         _fileUpload.FileContent,
         _fileUpload.FileName);
     _importReportView.BindReportData(report);
 }
Example #29
0
		protected void wzrdOrderHosting_NextButtonClick(object sender, WizardNavigationEventArgs e)
		{
			if (!Page.IsValid)
				return;
			// 1. Save contract account
			if (wzrdOrderHosting.ActiveStep == Step1)
			{
				// Unable to save contract account and then cancel switch to the next step
				if (!ctlUserAccount.SaveContractAccount())
					e.Cancel = true;
				//
				return;
			}
		}
Example #30
0
        // method to handle "Next" sstep button
        protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
        {
            lblMessage.Text = string.Empty;
            lblMessage.CssClass = "";

            switch (e.CurrentStepIndex) {
                case 1:	// user selected file to upload and clicked next

                    loadFieldsFromCSVFile();
                    break;

                default:
                    break;
            }
        }
        protected void InitProposalWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            List<string> excludedTables = (List<string>)Session["excludedTables"];
            Dictionary<string, string> displayColumnPreferences = (Dictionary<string, string>)Session["displayColumnPreferences"];
            List<M2NMapping> finMappingsList = (List<M2NMapping>)Session["finMappingList"];

            mm.Architect.mappings = finMappingsList;
            mm.Architect.excludedTables = excludedTables;
            mm.Stats.SetDisplayPreferences(displayColumnPreferences);
            mm.Architect.hierarchies = (List<string>)Session["goodHierarchies"];
            _min.Models.Panel proposal = mm.Architect.propose();       // saved within proposing
            //sysDriver.AddPanel(proposal);
            string projectName = Page.RouteData.Values["projectName"] as string;
            Response.RedirectToRoute("ArchitectShowRoute", new { projectName = CE.project.Name });
        }
Example #32
0
 protected void AddShoeWiz_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["J1500ConnectionString"].ConnectionString);
     //SqlCommand showuserid = new SqlCommand("Select UserID from Users where UserName='******'", con);
     SqlCommand cmd = new SqlCommand("Insert Into Shoes (ShoeName,Startdate,AspNetUserID,ShoeRetired,ShoeType) VALUES(@ShoeName,@Startdate,@UserID,@ShoeRetired,@ShoeType)", con);
     con.Open();
     cmd.CommandType = System.Data.CommandType.Text;
     cmd.Parameters.AddWithValue("@ShoeName", txtShoeName.Text);
     cmd.Parameters.AddWithValue("@Startdate", txtStartDate.Text);
     cmd.Parameters.AddWithValue("@UserID", User.Identity.GetUserId());
     cmd.Parameters.AddWithValue("@ShoeRetired", "False");
     cmd.Parameters.AddWithValue("@ShoeType", DDLShoeType.SelectedValue);
     cmd.ExecuteNonQuery();
     Label1.Text = ("Update Completed");
     Response.AddHeader("REFRESH", "2;URL=Shoes.aspx");
 }
Example #33
0
        protected void OnFinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            BookingSystem bs = new BookingSystem();
                                    Appointment appointment = new Appointment();

                                    //Set current user values
                                    appointment.username = this.User.Identity.Name;
                                    MembershipUser user = Membership.GetUser(appointment.username);
                                    if (user != null)
                                    {
                                                appointment.email = user.Email;
                                    }
                                    Int32 BookingObjectId = Convert.ToInt32(Session["bookingObject"]);
                                    DateTime StartTime = Calendar1.SelectedDate.Date.Add(TimeSpan.Parse(startTimeDDL.SelectedItem.Text));
                                    //Set form values
                                    appointment.bookingObject = BookingObjectId;
                                    appointment.startDate = StartTime;
                                    appointment.endDate = appointment.startDate.Add(bs.AppointmentLength);
                                    appointment.comments = Comments.Text;

                                    Int32 rowReturned = 0;

                                    DataTable days = bs.GetBookingObjectWorkingDays(BookingObjectId);
                                    DataTable BookingObjects = bs.GetBookingObjects(BookingObjectId);
                                    DataRow row = BookingObjects.Rows[0];
                                    DateTime openTime = DateTime.Parse(row["StartTime"].ToString());
                                    DateTime closeTime = DateTime.Parse(row["EndTime"].ToString());

                                    //Check to See Room is open
                                    if (!bs.RoomClosed(BookingObjectId, StartTime, openTime.TimeOfDay,
                                                closeTime.TimeOfDay, days))
                                    {
                                                //Check for Existing Booking
                                                if (bs.RoomBooked(appointment.bookingObject, appointment.startDate))
                                                {
                                                            rowReturned = bs.AddAppointment(appointment);
                                                }
                                    }

                                    if (rowReturned == 1)
                                    {
                                                Error.Text = "Appointment Succesfully Added.";
                                    } else {
                                                Error.Text = "Error adding row.";
                                    }
        }
Example #34
0
    protected void Wizard1_FinishButtonClick(object sender, System.Web.UI.WebControls.WizardNavigationEventArgs e)
    {
        // Insert the order and order lines into the database
        SqlConnection  conn  = null;
        SqlTransaction trans = null;
        SqlCommand     cmd;

        try
        {
            conn = new SqlConnection(ConfigurationManager.ConnectionStrings["WroxUnited"].ConnectionString);
            conn.Open();

            trans = conn.BeginTransaction();

            cmd             = new SqlCommand();
            cmd.Connection  = conn;
            cmd.Transaction = trans;

            // set the order details
            cmd.CommandText = "INSERT INTO Orders(MemberName, OrderDate, Name, Address, County, PostCode, Country, SubTotal, Discount, Total) " + "VALUES (@MemberName, @OrderDate, @Name, @Address, @County, @PostCode, @Country, @SubTotal, @Discount, @Total)";
            cmd.Parameters.Add("@MemberName", SqlDbType.VarChar, 50);
            cmd.Parameters.Add("@OrderDate", SqlDbType.DateTime);
            cmd.Parameters.Add("@Name", SqlDbType.VarChar, 50);
            cmd.Parameters.Add("@Address", SqlDbType.VarChar, 255);
            cmd.Parameters.Add("@County", SqlDbType.VarChar, 50);
            cmd.Parameters.Add("@PostCode", SqlDbType.VarChar, 15);
            cmd.Parameters.Add("@Country", SqlDbType.VarChar, 50);
            cmd.Parameters.Add("@SubTotal", SqlDbType.Money);
            cmd.Parameters.Add("@Discount", SqlDbType.Money);
            cmd.Parameters.Add("@Total", SqlDbType.Money);

            cmd.Parameters["@MemberName"].Value = User.Identity.Name;
            cmd.Parameters["@OrderDate"].Value  = DateTime.Now;
            cmd.Parameters["@Name"].Value       = ((TextBox)Wizard1.FindControl("txtName")).Text;
            cmd.Parameters["@Address"].Value    = ((TextBox)Wizard1.FindControl("txtAddress")).Text;
            cmd.Parameters["@County"].Value     = ((TextBox)Wizard1.FindControl("txtCounty")).Text;
            cmd.Parameters["@PostCode"].Value   = ((TextBox)Wizard1.FindControl("txtPostCode")).Text;
            cmd.Parameters["@Country"].Value    = ((TextBox)Wizard1.FindControl("txtCountry")).Text;
            cmd.Parameters["@Total"].Value      = Profile.Cart.Total;

            int OrderID = Convert.ToInt32(cmd.ExecuteScalar());

            // change the query and parameters for the order lines
            cmd.CommandText = "INSERT INTO OrderLines(OrderID, ProductID, Quantity, Price) " +
                              "VALUES (@OrderID, @ProductID, @Quantity, @Price)";
            cmd.Parameters.Clear();
            cmd.Parameters.Add("@OrderID", SqlDbType.Int);
            cmd.Parameters.Add("@ProductID", SqlDbType.Int);
            cmd.Parameters.Add("@Quantity", SqlDbType.Int);
            cmd.Parameters.Add("@Price", SqlDbType.Money);

            cmd.Parameters["@OrderID"].Value = OrderID;
            foreach (CartItem item in Profile.Cart.Items)
            {
                cmd.Parameters["@ProductID"].Value = item.ProductID;
                cmd.Parameters["@Quantity"].Value  = item.Quantity;
                cmd.Parameters["@Price"].Value     = item.Price;

                cmd.ExecuteNonQuery();
            }

            // commit the transaction
            trans.Commit();
        }
        catch (SqlException SqlEx)
        {
            // some form of error - rollback the transaction
            // and rethrow the exception
            if (trans != null)
            {
                trans.Rollback();
            }



            // Log the exception
            // Tools.log("An error occurred while creating the order", SqlEx)
            throw new Exception("An error occurred while creating the order", SqlEx);
        }
        finally
        {
            if (conn != null)
            {
                conn.Close();
            }
        }

        // we will only reach here if the order has been created sucessfully
        // so clear the cart
        Profile.Cart.Items.Clear();
    }