//private void ListUnboxedSpecimens(int colId) //{ // SpecimenManagerDa da = new SpecimenManagerDa(); // DataTable dt = da.GetUnboxedSpecimensByCollectionId(colId); // this.unboxedSpecList.DataSource = dt.DefaultView; // this.unboxedSpecList.DataBind(); //} private void BindOriginSelectBoxes() { if (QueryBoxId > 0) { SpecimenManagerDa da = new SpecimenManagerDa(); DataSet resultsDataSet = da.GetBoxAndAncestors(QueryBoxId); SpecimenBox box = new SpecimenBox(); box.Get(QueryBoxId); DataTable boxesDT = resultsDataSet.Tables[0]; Boxes.DataSource = boxesDT; Boxes.DataBind(); Boxes.Value = box[SpecimenBox.BoxId].ToString(); DataTable containersDT = resultsDataSet.Tables[1]; Containers.DataSource = containersDT; Containers.DataBind(); Containers.Value = boxesDT.Rows[0][SpecimenBox.ContainerId].ToString(); DataTable storagesDT = resultsDataSet.Tables[2]; Storages.DataSource = storagesDT; Storages.DataBind(); Storages.Value = containersDT.Rows[0][SpecimenContainer.StorageId].ToString(); string siteId = resultsDataSet.Tables[3].Rows[0][SpecimenSite.SiteId].ToString(); Sites.Value = siteId; } }
private void SetStorageItems(string siteId) { if (PageUtil.IsInteger(siteId)) { //SpecimenStorage s = new SpecimenStorage(); //s.GetByParent(int.Parse(siteId)); //Storages.DataSource = s.DataSourceView; Storages.DataSource = BusinessObject.GetByParentAsDataView <SpecimenStorage>(int.Parse(siteId)); Storages.DataTextField = SpecimenStorage.StorageName; // need to display storage type? Storages.DataValueField = SpecimenStorage.StorageId; Storages.DataBind(); } else { Storages.Items.Clear(); Containers.Items.Clear(); Boxes.Items.Clear(); } }