Esempio n. 1
0
        //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;
            }
        }
Esempio n. 2
0
 private void SetContainerItems(string storageId)
 {
     if (PageUtil.IsInteger(storageId))
     {
         //SpecimenContainer c = new SpecimenContainer();
         //c.GetByParent(int.Parse(storageId));
         //Containers.DataSource = c.DataSourceView;
         Containers.DataSource     = BusinessObject.GetByParentAsDataView <SpecimenContainer>(int.Parse(storageId));
         Containers.DataTextField  = SpecimenContainer.ContainerName; // need to display storage type?
         Containers.DataValueField = SpecimenContainer.ContainerId;
         Containers.DataBind();
     }
     else
     {
         Containers.Items.Clear();
         Boxes.Items.Clear();
     }
 }