示例#1
0
        /// <summary>
        /// save the new Admin URL 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            if (ttDropDownList.SelectedIndex == 0)
            {
                // Show Error Message
                string jScript = "<script language='javascript'>" +
                    "alert('Please select a ticket type')" + "</script>";
                Page.RegisterStartupScript("Error Window", jScript);
                return;
            }

            if (txtURL == null || txtURL.Equals(""))
            {
                // URL Text box should be filled
                // Show Error Message
                string jScript = "<script language='javascript'>" +
                    "alert('Please provide a value for the URL')" + "</script>";
                Page.RegisterStartupScript("Error Window", jScript);
                return;
            }

            // create new Admin URL
            BrokerDB issuer = new BrokerDB();
            issuer.InsertAdminURL(paTag.id, txtURL.Text, ttDropDownList.SelectedItem.Value);

            // refresh repeater
            refreshUrlRepeater();

            // reset Gui
            ttDropDownList.SelectedIndex = 0;
            txtURL.Text = "";
        }