Exemplo n.º 1
0
//INSTANT C# WARNING: Strict 'Handles' conversion only applies to 'WithEvents' fields declared in the same class - the event will be wired in 'SubscribeToEvents':
//ORIGINAL LINE: Protected Sub btnSaveChanges_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveChanges.Click
    protected void btnSaveChanges_Click(object sender, System.EventArgs e)
    {
        if (b.DemoMode == false)
        {
            LanguageFile b = new LanguageFile();
            b.BacktoGuestbook         = this.inBacktoGuestbook.Text;
            b.BadLanguage             = this.inBadLanguage.Text;
            b.BlockedIP               = this.inBlockedIP.Text;
            b.Boldfield               = this.inBoldFields.Text;
            b.Cancel                  = this.inCancel.Text;
            b.CompleteThisForm        = this.inCompleteForm.Text;
            b.Country                 = this.inCountry.Text;
            b.Email                   = this.inEmail.Text;
            b.EnterEmailAddress       = this.inEnterEmailAddress.Text;
            b.EnterFullName           = this.inEnterFullName.Text;
            b.EnterGuestbook          = this.inEnterGuestbook.Text;
            b.EnterHomepage           = this.inEnterHomepage.Text;
            b.EnterMessage            = this.inEnterMessage.Text;
            b.EnterNosHere            = this.inEnterNos.Text;
            b.EnterVerificationImage  = this.inEnterVerificationText.Text;
            b.Female                  = this.inFemale.Text;
            b.FullName                = this.inFullName.Text;
            b.Guestbook               = this.inGuestbook.Text;
            b.Gender                  = this.inGender.Text;
            b.Homepage                = this.inHomepage.Text;
            b.VerificationDidNotMatch = this.inInvalidVerification.Text;
            b.Male              = this.inMale.Text;
            b.Message           = this.inMessage.Text;
            b.SelectCountry     = this.inSelectCountry.Text;
            b.SelectState       = this.inSelectState.Text;
            b.SignOurGuestbook  = this.inSignBook.Text;
            b.State             = this.inState.Text;
            b.SubmissionDate    = this.inSubmissionDate.Text;
            b.SubmissionMessage = this.inSubmissionMessage.Text;
            b.Submit            = this.inSubmit.Text;
            b.Unspecified       = this.inUnspecified.Text;
            b.ValidEmailAddress = this.inValidEmail.Text;
            b.ValidGuestbookURL = this.inValidGuestbook.Text;
            b.ValidHomepageURL  = this.inValidHomepage.Text;
            b.VerificationImage = this.inVerificationImage.Text;
            b.YourGuestbook     = this.inYourGuestbook.Text;
            b.YourHomepage      = this.inYourHomepage.Text;

            DataLayer.SQLDataProvider data = new DataLayer.SQLDataProvider();
            if (data.UpdateLanguageFile(b) == true)
            {
                Cache["LanguageFile"] = b;
                Response.Redirect("LanguageFile.aspx");
            }
            else
            {
                lblerror.Text = "Error while updating lanaguage file.";
            }
        }
        else
        {
            lblerror.Text = "You are not allowed to change these settings in demo mode.";
        }
    }