private void setNextPrevBtnLbls(int stepNumber) { Button myPreviousBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); Button myNextBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepNextButton"); if (stepNumber == 0) { myPreviousBtn.Text = "View Questions of Assessment"; myNextBtn.Text = "Search Questions"; } else if (stepNumber == 1) { myNextBtn.Text = "Pick Selected Question"; myPreviousBtn.Text = "Back to Search Criteria"; } else if (stepNumber == 2) { Button myFinishBtn = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$Button1"); bool editMode = Request.QueryString["editMode"] == null ? false : bool.Parse(Request.QueryString["editMode"]); if (editMode) { myFinishBtn.Text = "Update Assessment"; } else { myFinishBtn.Text = "Add Assessment"; } } }
protected void Wizard1_PreRender(object sender, EventArgs e) { Repeater SideBarList = Wizard1.FindControl("HeaderContainer").FindControl("SideBarList") as Repeater; SideBarList.DataSource = Wizard1.WizardSteps; SideBarList.DataBind(); }
protected void Wizard1_PreRender(object sender, EventArgs e) { Repeater steps = Wizard1.FindControl("HeaderContainer").FindControl("rptSteps") as Repeater; steps.DataSource = Wizard1.WizardSteps; steps.DataBind(); }
protected void Wizard1_PreviousButtonClick(object sender, WizardNavigationEventArgs e) { setNextPrevBtnLbls(Wizard1.ActiveStepIndex-2); Button myPreviousBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); if (Wizard1.ActiveStepIndex == 2) { } bool editMode = Request.QueryString["editMode"] == null ? false : bool.Parse(Request.QueryString["editMode"]); if (Wizard1.ActiveStepIndex == 2 || (editMode && Wizard1.ActiveStepIndex == 1)) { if (myPreviousBtn != null) { //LogUtils.myLog.Info("My Previous Button is not null"); myPreviousBtn.Visible = false; } } else { if (myPreviousBtn != null) { //LogUtils.myLog.Info("My Previous Button is not null"); myPreviousBtn.Visible = true; } } }
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; } } }
private void LocalizeWizard() { Wizard1.WizardSteps[0].Title = Localize("Shop.QuoteCreationWizard.stepContactInfo", "Contact Information"); Wizard1.WizardSteps[1].Title = Localize("Shop.QuoteCreationWizard.stepSubmit", "Confirm and Submit"); Wizard1.WizardSteps[2].Title = Localize("Shop.QuoteCreationWizard.stepComplete", "Complete"); Button btnStartNext = (Button)Wizard1.FindControl("StartNavigationTemplateContainerID$StartNextButton"); btnStartNext.Text = Localize("Shop.QuoteCreationWizard.btnStartNext", "Next >>"); Button btnStepNext = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepNextButton"); btnStepNext.Text = Localize("Shop.QuoteCreationWizard.btnStepNext", "Next >>"); Button btnStepPrevious = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); btnStepPrevious.Text = Localize("Shop.QuoteCreationWizard.btnStepPrevious", "<< Previous"); Button btnFinishPrevious = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishPreviousButton"); btnFinishPrevious.Text = Localize("Shop.QuoteCreationWizard.btnFinishPrevious", "<< Previous"); Button btnFinish = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishButton"); btnFinish.Text = Localize("Shop.QuoteCreationWizard.btnFinish", "Submit to contact us"); }
private int addOrder() { using (SqlConnection cn = new SqlConnection((ConfigurationManager.ConnectionStrings["orders"].ConnectionString))) { cn.Open(); using (SqlTransaction tr = cn.BeginTransaction()) { cmd = new SqlCommand(); cmd.Connection = cn; // set the order details cmd.CommandText = "INSERT INTO Orders (OrderDate, Name, Address, PostCode, County, Total)" + "VALUES (@OrderDate, @Name, @Address, @PostCode, @Country, @Total)" + "SELECT CAST(scope_identity() AS int)"; // Add parameter definitions cmd.Parameters.Add("@OrderDate", SqlDbType.DateTime); cmd.Parameters.Add("@Name", SqlDbType.VarChar, 50); cmd.Parameters.Add("@Address", SqlDbType.VarChar, 255); cmd.Parameters.Add("@PostCode", SqlDbType.VarChar, 5); cmd.Parameters.Add("@Country", SqlDbType.VarChar, 50); cmd.Parameters.Add("@Total", SqlDbType.VarChar, 50); // Add parameters cmd.Parameters["@OrderDate"].Value = DateTime.Now; cmd.Parameters["@Name"].Value = User.Identity.Name.ToString(); cmd.Parameters["@Address"].Value = ((TextBox)Wizard1.FindControl("txtAddress")).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.ToString(); cmd.Transaction = tr; int s = Convert.ToInt32(cmd.ExecuteScalar()); tr.Commit(); return(s); } } }
/// <summary> /// The wizard 1 pre render. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void Wizard1PreRender(object sender, EventArgs e) { var sideBarList = Wizard1.FindControl("HeaderContainer").FindControl("SideBarList") as Repeater; if (sideBarList == null) { return; } sideBarList.DataSource = Wizard1.WizardSteps; sideBarList.DataBind(); //При вводе заявления по клавише ентер должен вызываться "продолжить",а на последнем шаге на "Сохранить заявление" if (Wizard1.ActiveStep.ID == "WizardStep1") { //Page.Master.Page.Form.DefaultButton = Wizard1.ActiveStep.FindControl("StartNavigationTemplateContainerID").FindControl("btnNext").UniqueID; //Page.Master.Page.Form.DefaultFocus = Wizard1.ActiveStep.FindControl("StartNavigationTemplateContainerID").FindControl("btnNext").ClientID; } else if (Wizard1.ActiveStep.ID == "WizardStep6") { //Page.Master.Page.Form.DefaultButton = Wizard1.ActiveStep.FindControl("FinishNavigationTemplateContainerID").FindControl("btnSaveStatement").UniqueID; //Page.Master.Page.Form.DefaultFocus = Wizard1.ActiveStep.FindControl("FinishNavigationTemplateContainerID").FindControl("btnSaveStatement").ClientID; } else { //Page.Master.Page.Form.DefaultButton = Wizard1.ActiveStep.FindControl("StepNavigationTemplateContainerID").FindControl("btnNext").UniqueID; //Page.Master.Page.Form.DefaultFocus = Wizard1.ActiveStep.FindControl("StepNavigationTemplateContainerID").FindControl("btnNext").ClientID; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Wizard1.MoveTo(stpCreateItem); } }
private void LocalizeWizard() { Wizard1.WizardSteps[0].Title = Localize("Shop.CheckoutWizard.stepShipInfo", "Shipping Information"); Wizard1.WizardSteps[1].Title = Localize("Shop.CheckoutWizard.stepPreview", "Preview"); Wizard1.WizardSteps[2].Title = Localize("Shop.CheckoutWizard.stepPayment", "Payment and Submit"); Wizard1.WizardSteps[3].Title = Localize("Shop.CheckoutWizard.stepComplete", "Complete"); Button btnStartNext = (Button)Wizard1.FindControl("StartNavigationTemplateContainerID$StartNextButton"); btnStartNext.Text = Localize("Shop.CheckoutWizard.btnStartNext", "Next >>"); Button btnStepNext = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepNextButton"); btnStepNext.Text = Localize("Shop.CheckoutWizard.btnStepNext", "Next >>"); Button btnStepPrevious = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); btnStepPrevious.Text = Localize("Shop.CheckoutWizard.btnStepPrevious", "<< Previous"); Button btnFinishPrevious = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishPreviousButton"); btnFinishPrevious.Text = Localize("Shop.CheckoutWizard.btnFinishPrevious", "<< Previous"); Button btnFinish = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishButton"); btnFinish.Text = Localize("Shop.CheckoutWizard.btnFinish", "Submit"); }
protected void Wizard1_ActiveStepChanged(object sender, EventArgs e) { //get the listview in the wizard System.Web.UI.WebControls.ListView list = (Wizard1.FindControl("sideBarList") as System.Web.UI.WebControls.ListView); //get the ul in the listview and change its cssclass according to the activestepindex of wizard HtmlGenericControl ul = list.FindControl("ul") as HtmlGenericControl; if (Wizard1.ActiveStepIndex == 0) { ul.Attributes.Add("class", "sidebar1"); Wizard wizard = Wizard1; //get the wizardstep WizardStep wizardStep1 = Wizard1.FindControl("WizardStep1") as WizardStep; //get the div control in the wizardstep and change its class HtmlGenericControl step1 = wizardStep1.FindControl("step1") as HtmlGenericControl; step1.Attributes.Add("class", "step1 "); } else { ul.Attributes.Add("class", "sidebar2"); WizardStep wizardStep2 = Wizard1.FindControl("WizardStep2") as WizardStep; HtmlGenericControl step2 = wizardStep2.FindControl("step2") as HtmlGenericControl; step2.Attributes.Add("class", "step2"); } }
protected void Unnamed1_FinishButtonClick(object sender, EventArgs e) { if (verified == false) { string res = wizService.get_forget_account(txt_forget_email.Text); if (res.Contains("success")) { // Response.Redirect("../temp.aspx"); lbl_msg.Text = "Email is Found and Code is sent to your Email for Reset the Password!!!"; //code Generator to reset password //lbl_msg.Text = n.ToString(); string sendEmail = ConfigurationManager.AppSettings["SendEmail"]; if (sendEmail.ToLower() == "true") { SendEmail(lbl_msg.ToString()); Wizard1.MoveTo(this.step2); } } else { //clearform(); lbl_msg.Text = "email is wrong"; Wizard1.MoveTo(this.Step1); } } if (verified == true) { Wizard1.MoveTo(this.step3); } }
protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { if (e.NextStepIndex == 2) { lblName.Text = TextBox1.Text + " " + TextBox2.Text + " " + TextBox3.Text; lblCity.Text = DropDownList3.SelectedValue; lblMobile.Text = TextBox7.Text; lblEmail.Text = TextBox6.Text; lblAdd.Text = TextBox4.Text; lblId.Text = TextBox8.Text; GridView2.DataBind(); System.Text.RegularExpressions.Regex mobile = new System.Text.RegularExpressions.Regex("^[789]\\d{9}$"); System.Text.RegularExpressions.Regex email = new System.Text.RegularExpressions.Regex("^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$"); if (string.IsNullOrWhiteSpace(this.TextBox1.Text) || string.IsNullOrWhiteSpace(this.TextBox2.Text) || string.IsNullOrWhiteSpace(this.TextBox3.Text) || !email.IsMatch(TextBox6.Text) || !mobile.IsMatch(TextBox7.Text) || DropDownList3.SelectedValue == "--SELECT--") { erlbl.Visible = true; erlbl.Text = "Step1-Invalid Credential"; } else { Button b = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishButton"); b.Enabled = true; } } if (e.NextStepIndex == 1) { TextBox9.Text = TextBox1.Text + " " + TextBox2.Text + " " + TextBox3.Text; } }
private void LocalizeWizard() { Wizard1.WizardSteps[0].Title = Localize("Common.UserControls.ExcelImport.stepUpload", "Upload File"); Wizard1.WizardSteps[1].Title = Localize("Common.UserControls.ExcelImport.stepPickup", "Pickup Sheet"); Wizard1.WizardSteps[2].Title = Localize("Common.UserControls.ExcelImport.stepSetHeader", "Set Header Row"); Wizard1.WizardSteps[3].Title = Localize("Common.UserControls.ExcelImport.stepMap", "Map Fields"); Wizard1.WizardSteps[4].Title = Localize("Common.UserControls.ExcelImport.stepPreview", "Preview Data"); Wizard1.WizardSteps[5].Title = Localize("Common.UserControls.ExcelImport.stepComplete", "Complete"); Button btnStartNext = (Button)Wizard1.FindControl("StartNavigationTemplateContainerID$StartNextButton"); btnStartNext.Text = Localize("Common.UserControls.ExcelImport.btnStartNext", "Next >>"); Button btnStepNext = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepNextButton"); btnStepNext.Text = Localize("Common.UserControls.ExcelImport.btnStepNext", "Next >>"); Button btnStepPrevious = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); btnStepPrevious.Text = Localize("Common.UserControls.ExcelImport.btnStepPrevious", "<< Previous"); Button btnFinishPrevious = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishPreviousButton"); btnFinishPrevious.Text = Localize("Common.UserControls.ExcelImport.btnFinishPrevious", "<< Previous"); Button btnFinish = (Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishButton"); btnFinish.Text = Localize("Common.UserControls.ExcelImport.btnFinish", "Submit"); }
private void GetActivityDefault() { try { InitQueryBlock(ActivityID.ToString()); //取得活動資訊 ACMS.DAO.ActivatyDAO myActivatyDAO = new ACMS.DAO.ActivatyDAO(); ACMS.VO.ActivatyVO myActivatyVO = myActivatyDAO.SelectActivatyByID(ActivityID); //報名截止日後要唯讀 if (myActivatyVO.regist_deadline < DateTime.Today) { MyFormMode = FormViewMode.ReadOnly; //GridView_RegisterPeoplinfo.Enabled = false; PanelCustomFieldA1.Enabled = false; } if (MyFormMode == FormViewMode.Edit) { Wizard1.FindControl("FinishNavigationTemplateContainerID$btnHome").Visible = true; ((Button)Wizard1.FindControl("FinishNavigationTemplateContainerID$FinishButton")).Text = "儲存並發送確認信"; } //活動海報訊息 Literal1.Text = myActivatyVO.activity_info; //活動相關訊息 ObjectDataSource_ActivatyDetails.SelectParameters["id"].DefaultValue = ActivityID.ToString(); ObjectDataSource_UpFiles.SelectParameters["dirName"].DefaultValue = Server.MapPath(Path.Combine("~/UpFiles", ActivityID.ToString())); //報名者資訊 ObjectDataSource_RegisterPersonInfo.SelectParameters["emp_id"].DefaultValue = clsAuth.ID;//預設登入者 //所有報名者資訊 ObjectDataSource_RegisterPeoplenfo.SelectParameters["activity_id"].DefaultValue = ActivityID.ToString(); ObjectDataSource_RegisterPeoplenfo.SelectParameters["emp_id"].DefaultValue = RegistBy;//由登入者所報名(含登入者本人) //注意事項 Literal_notice.Text = myActivatyVO.notice.Replace("\r\n", "<br />"); FormView_fixA.DataBind(); ACMS.BO.CustomFieldBO myCustFieldBo = new ACMS.BO.CustomFieldBO(); if (myCustFieldBo.SelectByActivity_id(ActivityID).Count > 0) { Session["ShowPanel"] = true; } } catch (Exception ex) { WriteErrorLog("GetDefault", ex.Message, "0"); } //FormView_fixA.FindControl("tr_person_fix1").Visible = (myActivatyVO.is_showperson_fix1 == "Y"); //FormView_fixA.FindControl("tr_person_fix2").Visible = (myActivatyVO.is_showperson_fix2 == "Y"); //(FormView_fixA.FindControl("tr_person_fix2").FindControl("lblAf2Start") as Label).Text = myActivatyVO.personextcount_min.ToString(); //(FormView_fixA.FindControl("tr_person_fix2").FindControl("lblAf2End") as Label).Text = myActivatyVO.personextcount_max.ToString(); //RangeValidator myRangeValidator = (FormView_fixA.FindControl("tr_person_fix2").FindControl("chk_txtperson_fix2_3") as RangeValidator); //myRangeValidator.MinimumValue = myActivatyVO.personextcount_min.ToString(); //myRangeValidator.MaximumValue = myActivatyVO.personextcount_max.ToString(); }
protected void Page_Load(object sender, EventArgs e) { //Writing javascript code.Programaticaly calling the javascript. //we had done the same thing by calling javascript function in HTML tag. Button nxtBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID").FindControl("StepNextButton"); nxtBtn.OnClientClick = "return confirm('Are You sure,want to goto next step')"; }
protected void Wizard1_CancelButtonClick(object sender, EventArgs e) { //清除Session信息,并导航到步骤一 Session["RealName"] = ""; Session["Email"] = ""; Session["UserName"] = ""; Session["Password"] = ""; Wizard1.MoveTo(this.Step1); }
protected void Page_Load(object sender, EventArgs e) { //To add the javascript using code for the Next button, in a wizard step to get confirmation //In addition to using Onclient Click button property for injecting javascript , can inject the same in Code behind using the Button ID -[which is not directly available so need to obtain by hierarchy] //OnClientClick = "return confirm('Are you sure to Cancel?')" //using Code behind Button bt = (Button)Wizard1.FindControl("StartNavigationTemplateContainerID").FindControl("StartNextButton"); bt.OnClientClick = "return confirm('Are you sure to Cancel?')"; }
protected void rdoList1_SelectedIndexChanged(object sender, EventArgs e) { RadioButtonList rbl = (RadioButtonList)sender; Panel ccp = (Panel)Wizard1.FindControl("CreditCardPayment"); if (rbl.SelectedValue == "CC") { //ccp.Visible = true; } else { //ccp.Visible = false; } }
protected void Step_DP_SelectedIndexChanged(object sender, EventArgs e) { DropDownList dp = (DropDownList)sender; string index = dp.SelectedValue; Step_DP.SelectedValue = index; Step2_DP.SelectedValue = index; Step3_DP.SelectedValue = index; Step4_DP.SelectedValue = index; WizardStepBase step = Wizard1.WizardSteps[DataConvert.CLng(index)]; Wizard1.MoveTo(step); DoByStepIndex(); }
protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { if (Wizard1.ActiveStepIndex == 1) { //Wizard1.ActiveStepIndex = 1; Button myPreviousBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton"); if (myPreviousBtn != null) { LogUtils.myLog.Info("My Previous Button is not null"); myPreviousBtn.Visible = false; } LogUtils.myLog.Info("I am inside 1st tab. Input Value is: " + TextBox1.Text); } }
protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { if (e.CurrentStepIndex == 0) { if (dgCarrito.Rows.Count == 0) { e.Cancel = true; } else { Wizard1.MoveTo(WizardStep2); } } }
protected void Page_Load(object sender, EventArgs e) { this.Master.ContentPageName = "LOANS"; string subpage = string.Empty; Wizard1.PreRender += new EventHandler(Wizard1_PreRender); if (!Page.IsPostBack) { for (int y = DateTime.Now.Year - 2; y > (DateTime.Now.Year - 65); y--) { hire_year.Items.Add(new ListItem(y.ToString(), y.ToString())); } } else { if (TextBox1.Text != "") { int yearsofservice = 0; DateTime d1 = Convert.ToDateTime(TextBox1.Text); // hire date DateTime d = DateTime.Now; yearsofservice = calculateYearSpan(d1, d); TextBox2.Text = yearsofservice.ToString(); if (yearsofservice < 2) { RangeValidator2.MinimumValue = "2"; Wizard1.MoveTo(WizardStep1); } } if (contributions.Text == "") { return; } double cntrs = Convert.ToDouble(contributions.Text); double max = cntrs * .75; RangeValidator1.MaximumValue = (max).ToString(); RangeValidator1.ErrorMessage = string.Format("{0:C}", max) + " Max Allowed!"; } }
protected void btn_step2_veriCode_Click(object sender, EventArgs e) { Console.WriteLine(n); if (txt_step2_veriCode.Text == n.ToString()) { verified = true; Wizard1.MoveTo(this.step3); txt_username_retrive.Text = txt_forget_email.Text; } else { lbl_step2_veriCode.Text = "Verification code does not match."; Wizard1.MoveTo(this.step2); } }
protected void OnFinishButtonClick(Object sender, WizardNavigationEventArgs e) { // The OnFinishButtonClick method is a good place to collect all // the data from the completed pages and persist it to the data store. // For this example, write a confirmation message to the Complete page // of the Wizard control. Label tempLabel = (Label)Wizard1.FindControl("CompleteMessageLabel"); if (tempLabel != null) { tempLabel.Text = "Your order has been placed. An email confirmation will be sent to " + (EmailAddress.Text.Length == 0 ? "your email address" : EmailAddress.Text) + "."; } }
private void LocalizePage() { labelError.Text = Resources.Resources.ResourceBibtextimportError; LabelMessage.Text = Resources.Resources.ResourceBibtextimportMessage; ParserErrorsLabel.Text = Resources.Resources.ResourceBibtextimportParseerror; MappingErrorsLabel.Text = Resources.Resources.ResourceBibtextimportMappingerror; Label2.Text = Resources.Resources.ResourceBibtextimportSuccesspareseentries; ResourceWithCitationLabel.Text = Resources.Resources.ResourceBibtextimportResourcewithcitations; ResourceWithoutCitationLabel.Text = Resources.Resources.ResourceBibtextimportResourcewithoutcitations; NewResourcesLabel.Text = Resources.Resources.ResourceBibtextimportNewresource; RequiredFieldValidatorFileUPload.ErrorMessage = Resources.Resources.ResourceBibtextimportFileuploadmessage; ragularExpBibTeXFile.ErrorMessage = Resources.Resources.ResourceBibtextimportFileuploadmessage; // Get reference of buttons "Step2BackButton" and "Step2ImportButton" from template "StepNavigationTemplateContainerID" and // set their text property. Control stepNavigationTemplate = Wizard1.FindControl(_stepNavTemplateContainerID) as Control; if (stepNavigationTemplate != null) { Button step2BackButton = stepNavigationTemplate.FindControl(_step2BackButton) as Button; if (step2BackButton != null) { step2BackButton.Text = Resources.Resources.BibTexImportStep2BackButtonText; } Button step2ImportButton = stepNavigationTemplate.FindControl(_step2ImportButton) as Button; if (step2ImportButton != null) { step2ImportButton.Text = Resources.Resources.BibTexImportStep2ButtonText; } } // Get reference of button "Step3FinishButton" from template "FinishNavigationTemplate" and // assign it's text property. Control finishNavigationTemplate = Wizard1.FindControl(_finishNavTemplateContainerID) as Control; if (finishNavigationTemplate != null) { Button step3Button = finishNavigationTemplate.FindControl(_step2FinishButton) as Button; if (step3Button != null) { step3Button.Text = Resources.Resources.BibTexImportStep3ButtonText; } } }
protected void chkUseProfileAddress_CheckChanged(object sender, System.EventArgs e) { if (chkUseProfileAddress.Checked) { ((TextBox)Wizard1.FindControl("txtName")).Text = Profile.Name; ((TextBox)Wizard1.FindControl("txtAddress")).Text = Profile.Address; ((TextBox)Wizard1.FindControl("txtCity")).Text = Profile.City; ((TextBox)Wizard1.FindControl("txtPostCode")).Text = Profile.PostCode; ((TextBox)Wizard1.FindControl("txtCountry")).Text = Profile.Country; ((TextBox)Wizard1.FindControl("txtName")).DataBind(); ((TextBox)Wizard1.FindControl("txtAddress")).DataBind(); ((TextBox)Wizard1.FindControl("txtCity")).DataBind(); ((TextBox)Wizard1.FindControl("txtPostCode")).DataBind(); ((TextBox)Wizard1.FindControl("txtCountry")).DataBind(); } }
protected void OnActiveStepChanged(object sender, EventArgs e) { // If the ActiveStep is changing to Step3, check to see whether the // SeparateShippingCheckBox is selected. If it is not, skip to the // Finish step. if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.Step3)) { if (this.SeparateShippingCheckBox.Checked) { Wizard1.MoveTo(this.Step3); } else { Wizard1.MoveTo(this.Finish); } } }
protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { if (e.CurrentStepIndex == 0) { Login l = (Login)Wizard1.FindControl("Login1"); if (Membership.ValidateUser(l.UserName, l.Password)) { 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; } } }
//新增報名 protected void GoSecondStep_Click(object sender, RegistGoSecondEventArgs e) { try { Wizard1.MoveTo(Wizard1.WizardSteps[0]); RegistActivity_Query1.Visible = false; Wizard1.Visible = true; //必要屬性 MyFormMode = FormViewMode.Insert; ActivityID = e.activity_id; EmpID = clsAuth.ID; //預設是登入者 RegistBy = clsAuth.ID; //執行是登入者 PanelRegisterInfoA.Visible = true; PanelRegisterInfoB.Visible = false; MyHiddenField.Value = ActivityID.ToString(); //載入活動資訊 GetActivityDefault(); ((Label)FormView_ActivatyDetails.FindControl("activity_startdateLabel")).Text = ((Label)FormView_ActivatyDetails.FindControl("activity_startdateLabel")).Text.Replace("-", "/").Replace("T", " "); ((Label)FormView_ActivatyDetails.FindControl("activity_enddateLabel")).Text = ((Label)FormView_ActivatyDetails.FindControl("activity_enddateLabel")).Text.Replace("-", "/").Replace("T", " "); //if (((Label)FormView_ActivatyDetails.FindControl("limit_countLabel")).Text == "999999") //{ // ((Label)FormView_ActivatyDetails.FindControl("limit_countLabel")).Text = "無上限"; //} //if (((Label)FormView_ActivatyDetails.FindControl("limit2_countLabel")).Text == "0") //{ // ((Label)FormView_ActivatyDetails.FindControl("limit2_countLabel")).Text = "無"; //} } catch (Exception ex) { WriteErrorLog("SecondStep", ex.Message, "0"); } }