Exemple #1
0
 protected void OnStorageChange(string storageId)
 {
     SetStorageItems(SiteId.Value);
     SetContainerItems(storageId);
     RptBoxes.DataBind();
     SetAddRowImageStates();
 }
Exemple #2
0
    private void SetContainerItems(string storageId)
    {
        StorageId.Value   = storageId;
        ContainerId.Value = string.Empty;
        BoxId.Value       = string.Empty;
        if (PageUtil.IsInteger(storageId))
        {
            int _storageId = int.Parse(storageId);

            //SpecimenContainer c = new SpecimenContainer();
            //c.GetByParent(_storageId);
            //if (c.RecordCount > 0)
            DataView view = BusinessObject.GetByParentAsDataView <SpecimenContainer>(_storageId);
            if (view.Count > 0)
            {
                //RptContainer.DataSource = c.DataSourceView;
                RptContainer.DataSource = view;
                RptContainer.DataBind();
            }
            else
            {
                RptContainer.DataBind();
                RptBoxes.DataBind();
            }
        }
    }
Exemple #3
0
    private void SetStorageItems(string siteId)
    {
        SiteId.Value      = siteId;
        StorageId.Value   = string.Empty;
        ContainerId.Value = string.Empty;
        BoxId.Value       = string.Empty;
        if (PageUtil.IsInteger(siteId))
        {
            int _siteId = int.Parse(siteId);

            DataView view = BusinessObject.GetByParentAsDataView <SpecimenStorage>(_siteId);

            //SpecimenStorage s = new SpecimenStorage();
            //s.GetByParent(_siteId);
            //if (s.RecordCount > 0)
            if (view.Count > 0)
            {
                //RptStorage.DataSource = s.DataSourceView;
                RptStorage.DataSource = view;
                RptStorage.DataBind();
            }
            else
            {
                RptStorage.DataBind();
                RptContainer.DataBind();
                RptBoxes.DataBind();
            }
        }
    }
Exemple #4
0
 protected void OnSiteChange(string siteId)
 {
     SetSiteItems();
     SetStorageItems(siteId);
     RptContainer.DataBind();
     RptBoxes.DataBind();
     SetAddRowImageStates();
 }
        protected void OnCollectionChange(string colId)
        {
            if (PageUtil.IsInteger(colId))
            {
                int _colId           = int.Parse(colId);
                SpecimenManagerDa da = new SpecimenManagerDa();
                DataTable         dt = da.GetBoxesByCollectionId(_colId);
                RptBoxes.DataSource = dt.DefaultView;
                RptBoxes.DataBind();

                // change style of div for current collection
                string s = "highlightItem('Collection', '" + colId + "');";
                Page.RegisterStartupScript("xyz", "<script language=javascript>" + s + "</script>");
            }
        }
Exemple #6
0
    private void SetBoxItems(string containerId)
    {
        ContainerId.Value = containerId;
        BoxId.Value       = string.Empty;
        if (PageUtil.IsInteger(containerId))
        {
            int _containerId = int.Parse(containerId);

            //SpecimenBox b = new SpecimenBox();
            //b.GetByParent(_containerId);
            //if (b.RecordCount > 0)
            DataView view = BusinessObject.GetByParentAsDataView <SpecimenBox>(_containerId);
            if (view.Count > 0)
            {
                //RptBoxes.DataSource = b.DataSourceView;
                RptBoxes.DataSource = view;
                RptBoxes.DataBind();
            }
            else
            {
                RptBoxes.DataBind();
            }
        }
    }