/// <summary> /// Handles the Click event of the btnSubmit control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void btnSubmit_Click(object sender, EventArgs e) { if (!StopProcessing) { if (!IsValid) { return; } ucCompanyDetails.SaveCompanyDetails(true); if (CompanyId == 0) { CompanyId = ucCompanyDetails.Company.CompanyId; //Add media content. DocumentMedia media = CompanyHeaderDetails.GetMedia(); if (media != null) { media.RelatedId = CompanyId; DataContext.SaveChanges(); } //Notification email to StageBitzAdmins.Get the [email protected] StageBitz.Common.EmailSender.SendCompanyRegistrationMailToStageBitzAdmin(Support.GetSystemValue("AdminEmail"), Support.GetAdminPortalCompanyDetailsLink(CompanyId), ucCompanyDetails.Company.CompanyName, Support.UserFullName); } Response.Redirect(string.Format("~/Company/CompanyDashboard.aspx?CompanyId={0}", CompanyId)); } }
/// <summary> /// Intializes the controls. /// </summary> private void IntializeControls() { ucCompanyDetails.InitializeControls(IsReadOnly); CompanyHeaderDetails.IntializeHeaderControls(); btnSubmit.Visible = !IsReadOnly; }