private void checkBoxEmbedWebsite_CheckedChanged(object sender, EventArgs e) { if (this.UserCheck && !this.HasVolunteeredForEmbeddedWeb) { try { VolunteerEffort effort; this.UserCheck = false; if (new QuazalQuery("GetVolunteerEffortByName", new object[] { this.EmbedWebEffortName }).GetObject<VolunteerEffort>(out effort)) { DlgVolunteer volunteer = new DlgVolunteer(effort); if (volunteer.ShowDialog() == DialogResult.OK) { this.mHasVolunteeredForEmbeddedWeb = true; } else { this.checkBoxEmbedWebsite.Checked = false; } } else { this.checkBoxEmbedWebsite.Checked = false; } } catch (Exception exception) { ErrorLog.WriteLine(exception); } finally { this.UserCheck = true; } } }
private void ShowUploadVolunteerEffort(object sender, EventArgs e) { VolunteerEffort effort; if (((this.SelectedUpload != null) && !this.SelectedUpload.ContentType.HasVolunteeredForUploads) && new QuazalQuery("GetVolunteerEffortByName", new object[] { this.SelectedUpload.ContentType.UploadVolunteerEffort }).GetObject<VolunteerEffort>(out effort)) { DlgVolunteer volunteer = new DlgVolunteer(effort); if (volunteer.ShowDialog() == DialogResult.OK) { this.SelectedUpload.ContentType.HasVolunteeredForUploads = true; this.BindToUploadContent(); } } }