Example #1
0
        /// <summary>Handles the <see cref="Button.Click"/> event of the <see cref="SaveNewStatusButton"/> control.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void SaveNewStatusButton_Click(object sender, EventArgs e)
        {
            if (!this.Page.IsValid)
            {
                return;
            }

            if (!this.IsStatusNameUnique(null, this.txtNewStatus.Text))
            {
                this.cvDuplicateStatus.IsValid = false;
                return;
            }

            ApplicationStatus.InsertStatus(this.txtNewStatus.Text, this.PortalId);
            this.HideAndClearNewStatusPanel();
            this.BindData();
        }