protected void MoveBoxToNewContainer() { int boxId = int.Parse(Request.Form["boxId"]); int newContainerId = int.Parse(Request.Form["newContainerId"]); SpecimenBox box = new SpecimenBox(); box.Get(boxId); box[SpecimenBox.ContainerId] = newContainerId; box.Save(); }
protected void Save_Click(object sender, CommandEventArgs e) { bool isNewRecord = this._containerId == 0 ? false : true; SpecimenBox box = new SpecimenBox(); box.Get(this._boxId); CICHelper.SetBOValues(Page.FindControl("inputControlsRow").Controls, box, 0); // set parent id for new record if (isNewRecord) { box[SpecimenBox.ContainerId] = _containerId; } box.Save(); //Gets BoxId & reloads _boxId = int.Parse(box[SpecimenBox.BoxId].ToString()); ReloadSpecimenStorageManager(_boxId, false); CloseThisPage(); }