コード例 #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;
            }
        }
コード例 #2
0
 private void SetBoxItems(string containerId)
 {
     if (PageUtil.IsInteger(containerId))
     {
         //SpecimenBox b = new SpecimenBox();
         //b.GetByParent(int.Parse(containerId));
         //Boxes.DataSource = b.DataSourceView;
         Boxes.DataSource     = BusinessObject.GetByParentAsDataView <SpecimenBox>(int.Parse(containerId));
         Boxes.DataTextField  = SpecimenBox.BoxName; // need to display box type?
         Boxes.DataValueField = SpecimenBox.BoxId;
         Boxes.DataBind();
     }
     else
     {
         Boxes.Items.Clear();
     }
 }