protected void Save(bool shouldReturn) { AUDIT_SCHEDULER scheduler = null; decimal auditScheduleId = 0; string result = "<h3>EHS Audit Scheduler " + ((IsEditContext) ? "Updated" : "Created") + ":</h3>"; if (shouldReturn == true) { divForm.Visible = false; pnlAddEdit.Visible = false; btnSaveReturn.Visible = false; RadCodeBlock rcbWarnNavigate = (RadCodeBlock)this.Parent.Parent.FindControl("rcbWarnNavigate"); if (rcbWarnNavigate != null) { rcbWarnNavigate.Visible = false; } lblResults.Visible = true; } if (!IsEditContext) { auditTypeId = SelectedTypeId; auditType = rddlAuditType.SelectedText; } else { auditTypeId = EditAuditTypeId; auditType = EHSAuditMgr.SelectAuditTypeByAuditScheduleId(EditAuditScheduleId); } if (!IsEditContext) { // Add context scheduler = CreateNewAuditScheduler(); auditScheduleId = scheduler.AUDIT_SCHEDULER_ID; } else { // Edit context auditScheduleId = EditAuditScheduleId; if (auditScheduleId > 0) { scheduler = UpdateAuditScheduler(auditScheduleId); } } if (shouldReturn) { SessionManager.ReturnStatus = false; SessionManager.ReturnObject = "DisplayAuditSchedules"; Response.Redirect("/EHS/EHS_Audit_Scheduler.aspx"); // mt - temporary } }