protected void Save_Click(object sender, CommandEventArgs e) { SpecimenContainer container = new SpecimenContainer(); container.Get(this._containerId); bool isNewRecord = this._storageId == 0 ? false : true; CICHelper.SetBOValues(Page.FindControl("inputControlsRow").Controls, container, 0); // set parent id for new record if (isNewRecord) { container[SpecimenContainer.StorageId] = _storageId; } container.Save(); // Closes the modal window, and signal main page to either update the text when updating a record // to or resubmit the form to reflect the new record //ClientScript.RegisterClientScriptBlock(Page.GetType(), "x1", "<script language=\"javascript\">if(top.updatePage) { top.updatePage('" + Name.Value + "'," + (this._containerId == 0 ? "true" : "false") + "); }hideModal();</script>"); CloseThisPage(false); }