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(); } } }
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(); } } }
protected void OnSiteChange(string siteId) { SetSiteItems(); SetStorageItems(siteId); RptContainer.DataBind(); RptBoxes.DataBind(); SetAddRowImageStates(); }