protected override void OnInit(EventArgs e) { base.OnInit(e); var theController = new FileSystemsConfigurationController(); var criteria = new FilesystemSelectCriteria(); criteria.FilesystemTierEnum.SortAsc(0); criteria.Description.SortAsc(1); FileSystems = theController.GetFileSystems(criteria); TheGrid = FSGridView; GridPagerTop.InitializeGridPager(SR.GridPagerFileSystemSingleItem, SR.GridPagerFileSystemMultipleItems, TheGrid, () => FileSystems.Count, ImageServerConstants.GridViewPagerPosition.Top); Pager = GridPagerTop; GridPagerTop.Reset(); // Set up the grid if (Height != Unit.Empty) { ContainerTable.Height = _height; } DataBind(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); // initialize the controller _theController = new FileSystemsConfigurationController(); // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerFileSystemSingleItem, SR.GridPagerFileSystemMultipleItems, FileSystemsGridView1.TheGrid, delegate { return(FileSystemsGridView1.FileSystems.Count); }, ImageServerConstants.GridViewPagerPosition.Top); FileSystemsGridView1.Pager = GridPagerTop; GridPagerTop.Reset(); Tiers = _theController.GetFileSystemTiers(); int prevSelectIndex = TiersDropDownList.SelectedIndex; if (TiersDropDownList.Items.Count == 0) { TiersDropDownList.Items.Add(new ListItem(SR.All)); foreach (FilesystemTierEnum tier in Tiers) { TiersDropDownList.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(tier), tier.Lookup)); } } TiersDropDownList.SelectedIndex = prevSelectIndex; }
protected override void OnInit(EventArgs e) { base.OnInit(e); // initialize the controller _theController = new DeviceConfigurationController(); // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems, DeviceGridPanel.TheGrid, delegate { return(DeviceGridPanel.Devices.Count); }, ImageServerConstants.GridViewPagerPosition.Top); DeviceGridPanel.Pager = GridPagerTop; MoveConfirmation.Confirmed += delegate(object data) { IList <Device> devices = data as IList <Device>; StudyController studyController = new StudyController(); foreach (Study study in StudyGridView.StudyList) { foreach (Device device in devices) { studyController.MoveStudy(study, device); } } }; }
protected override void OnInit(EventArgs e) { base.OnInit(e); IList <ServiceLockTypeEnum> types = ServiceLockTypeEnum.GetAll(); TypeDropDownList.Items.Add(new ListItem(SR.All)); foreach (ServiceLockTypeEnum t in types) { TypeDropDownList.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(t), t.Lookup)); } EditServiceLockDialog.ServiceLockUpdated += AddEditServiceLockDialog_ServiceLockUpdated; // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerServiceSingleItem, SR.GridPagerServiceMultipleItems, ServiceLockGridViewControl.TheGrid, delegate { return(ServiceLockGridViewControl.ServiceLocks != null ? ServiceLockGridViewControl.ServiceLocks.Count : 0); }, ImageServerConstants.GridViewPagerPosition.Top); ServiceLockGridViewControl.Pager = GridPagerTop; StatusFilter.Items.Add(new ListItem(SR.All)); StatusFilter.Items.Add(new ListItem(SR.Enabled)); StatusFilter.Items.Add(new ListItem(SR.Disabled)); FileSystemsConfigurationController fileSystemController = new FileSystemsConfigurationController(); IList <Model.Filesystem> fileSystems = fileSystemController.GetAllFileSystems(); foreach (Model.Filesystem fs in fileSystems) { FileSystemFilter.Items.Add(new ListItem(fs.Description, fs.Key.ToString())); } ConfirmEditDialog.Confirmed += ConfirmEditDialog_Confirmed; }
protected override void OnInit(EventArgs e) { base.OnInit(e); var criteria = new ServerPartitionSelectCriteria(); criteria.AeTitle.SortAsc(0); if (!Thread.CurrentPrincipal.IsInRole(AuthorityTokens.Vfs.ViewPartitions)) { criteria.ServerPartitionTypeEnum.EqualTo(ServerPartitionTypeEnum.Standard); } Partitions = _theController.GetPartitions(criteria); TheGrid = PartitionGridView; GridPagerTop.InitializeGridPager(SR.GridPagerPartitionSingleItem, SR.GridPagerPartitionMultipleItems, TheGrid, () => Partitions.Count, ImageServerConstants.GridViewPagerPosition.Top); Pager = GridPagerTop; GridPagerTop.Reset(); if (Height != Unit.Empty) { ContainerTable.Height = _height; } DataBind(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearScheduleDateButton.OnClientClick = ScriptHelper.ClearDate(ScheduleDate.ClientID, ScheduleDateCalendarExtender.ClientID); // setup child controls GridPagerTop.InitializeGridPager(Labels.GridPagerQueueSingleItem, Labels.GridPagerQueueMultipleItems, RestoreQueueItemList.RestoreQueueGrid, () => RestoreQueueItemList.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); RestoreQueueItemList.Pager = GridPagerTop; MessageBox.Confirmed += delegate(object data) { if (data is IList <Model.RestoreQueue> ) { var items = data as IList <Model.RestoreQueue>; foreach (Model.RestoreQueue item in items) { _controller.DeleteRestoreQueueItem(item); } } else if (data is Model.RestoreQueue) { var item = data as Model.RestoreQueue; _controller.DeleteRestoreQueueItem(item); } DataBind(); SearchUpdatePanel.Update(); // force refresh }; RestoreQueueItemList.DataSourceCreated += delegate(RestoreQueueDataSource source) { source.Partition = ServerPartition; source.DateFormats = ScheduleDateCalendarExtender.Format; if (!String.IsNullOrEmpty(StatusFilter.SelectedValue) && StatusFilter.SelectedIndex > 0) { source.StatusEnum = RestoreQueueStatusEnum.GetEnum(StatusFilter.SelectedValue); } if (!String.IsNullOrEmpty(PatientId.TrimText)) { source.PatientId = SearchHelper.TrailingWildCard(PatientId.TrimText); } if (!String.IsNullOrEmpty(PatientName.TrimText)) { source.PatientName = SearchHelper.NameWildCard(PatientName.TrimText); } if (!String.IsNullOrEmpty(ScheduleDate.Text)) { source.ScheduledDate = ScheduleDate.Text; } }; }
protected override void OnInit(EventArgs e) { base.OnInit(e); // initialize the controller _theController = new PartitionArchiveConfigController(); GridPagerTop.InitializeGridPager(SR.GridPagerPartitionSingleItem, SR.GridPagerPartitionMultipleItems, PartitionArchiveGridPanel.TheGrid, () => PartitionArchives.Count, ImageServerConstants.GridViewPagerPosition.Top); PartitionArchiveGridPanel.Pager = GridPagerTop; }
protected override void OnInit(EventArgs e) { base.OnInit(e); GridPagerTop.InitializeGridPager(SR.GridPagerPartitionSingleItem, SR.GridPagerPartitionMultipleItems, ServerPartitionGridPanel.TheGrid, delegate { return(Partitions.Count); }, ImageServerConstants.GridViewPagerPosition.Top); ServerPartitionGridPanel.Pager = GridPagerTop; GridPagerTop.Reset(); StatusFilter.Items.Add(new ListItem(SR.All)); StatusFilter.Items.Add(new ListItem(SR.Enabled)); StatusFilter.Items.Add(new ListItem(SR.Disabled)); }
protected void SetupEventHandlers() { AlertsGridPanel.DataSourceCreated += delegate(AlertDataSource source) { if (!String.IsNullOrEmpty(ComponentFilter.Text)) { source.Component = SearchHelper.LeadingAndTrailingWildCard(ComponentFilter.Text); } if (LevelFilter.SelectedIndex > 0) { source.Level = AlertLevelEnum.GetEnum(LevelFilter.SelectedValue); } if (CategoryFilter.SelectedIndex > 0) { source.Category = AlertCategoryEnum.GetEnum(CategoryFilter.SelectedValue); } source.DateFormats = InsertDateCalendarExtender.Format; if (!String.IsNullOrEmpty(InsertDateFilter.Text)) { source.InsertTime = InsertDateFilter.Text; } }; DeleteConfirmationBox.Confirmed += delegate(object data) { if (data == null) { return; } ArrayList keys = (ArrayList)data; for (int i = 0; i < keys.Count; i++) { _theController.DeleteAlertItem(keys[i] as ServerEntityKey); } OnAlertDeleted(); }; DeleteAllConfirmationBox.Confirmed += DeleteAllConfirmDialog_Confirmed; // TODO: We should do this in GridPager.InitializeGridPager() AlertsGridPanel.TheGrid.DataBound += delegate { GridPagerTop.Refresh(); }; }
protected void Page_Load(object sender, EventArgs e) { ServerRuleGridViewControl.ServerRulePanel = this; // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerServerRulesSingleItem, SR.GridPagerServerRulesMultipleItems, ServerRuleGridViewControl.TheGrid, () => ServerRuleGridViewControl.ServerRules == null ? 0 : ServerRuleGridViewControl.ServerRules.Count, ImageServerConstants.GridViewPagerPosition.Top); ServerRuleGridViewControl.Pager = GridPagerTop; GridPagerTop.Reset(); int prevSelectIndex = RuleApplyTimeDropDownList.SelectedIndex; RuleApplyTimeDropDownList.Items.Clear(); RuleApplyTimeDropDownList.Items.Add(new ListItem(SR.All, "ALL")); foreach (ServerRuleApplyTimeEnum applyTimeEnum in ServerRuleApplyTimeEnum.GetAll()) { RuleApplyTimeDropDownList.Items.Add( new ListItem(ServerEnumDescription.GetLocalizedDescription(applyTimeEnum), applyTimeEnum.Lookup)); } RuleApplyTimeDropDownList.SelectedIndex = prevSelectIndex; prevSelectIndex = RuleTypeDropDownList.SelectedIndex; RuleTypeDropDownList.Items.Clear(); RuleTypeDropDownList.Items.Add(new ListItem(SR.All, "ALL")); foreach (ServerRuleTypeEnum typeEnum in ServerRuleTypeEnum.GetAll()) { RuleTypeDropDownList.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(typeEnum), typeEnum.Lookup)); } RuleTypeDropDownList.SelectedIndex = prevSelectIndex; if (Page.IsPostBack) { DataBind(); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); GridPagerTop.InitializeGridPager(SR.GridPagerUserGroupsSingleItemFound, SR.GridPagerUserGroupsMultipleItemsFound, UserGroupsGridPanel.UserGroupGrid, delegate { return(UserGroupsGridPanel.ResultCount); }, ImageServerConstants.GridViewPagerPosition.Top); UserGroupsGridPanel.Pager = GridPagerTop; GridPagerTop.Reset(); UserGroupsGridPanel.DataSourceCreated += delegate(UserGroupDataSource source) { source.GroupName = GroupName.Text; }; }
protected void Page_Load(object sender, EventArgs e) { DataRuleGridViewControl.DataRulePanel = this; // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerServerRulesSingleItem, SR.GridPagerServerRulesMultipleItems, DataRuleGridViewControl.TheGrid, () => DataRuleGridViewControl.DataRules == null ? 0 : DataRuleGridViewControl.DataRules.Count, ImageServerConstants.GridViewPagerPosition.Top); DataRuleGridViewControl.Pager = GridPagerTop; GridPagerTop.Reset(); if (Page.IsPostBack) { DataBind(); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); TheGrid = AlertGrid; GridPagerTop.InitializeGridPager(SR.GridPagerAlertSingleItemFound, SR.GridPagerAlertMultipleItemsFound, AlertGrid, () => ResultCount, ImageServerConstants.GridViewPagerPosition.Top); Pager = GridPagerTop; GridPagerTop.Reset(); // Set up the grid if (Height != Unit.Empty) { ContainerTable.Height = _height; } AlertGrid.DataSource = AlertDataSourceObject; AlertGrid.DataBind(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearStudyDateButton.OnClientClick = ScriptHelper.ClearDate(StudyDate.ClientID, StudyDateCalendarExtender.ClientID); GridPagerTop.InitializeGridPager(Labels.GridPagerQueueSingleItem, Labels.GridPagerQueueMultipleItems, SearchResultGridView1.GridViewControl, () => SearchResultGridView1.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); SearchResultGridView1.Pager = GridPagerTop; GridPagerTop.Reset(); SearchResultGridView1.DataSourceContainer.ObjectCreated += DataSource_ObjectCreated; DeleteButton.Roles = AuthorityTokens.Admin.StudyDeleteHistory.Delete; ViewStudyDetailsButton.Roles = AuthorityTokens.Admin.StudyDeleteHistory.View; }
protected override void OnInit(EventArgs e) { base.OnInit(e); GridPagerTop.InitializeGridPager(SR.GridPagerAlertSingleItemFound, SR.GridPagerAlertMultipleItemsFound, AlertsGridPanel.AlertGrid, delegate { return(AlertsGridPanel.ResultCount); }, ImageServerConstants.GridViewPagerPosition.Top); AlertsGridPanel.Pager = GridPagerTop; GridPagerTop.Reset(); ClearInsertDateButton.OnClientClick = ScriptHelper.ClearDate(InsertDateFilter.ClientID, InsertDateCalendarExtender.ClientID); IList <AlertLevelEnum> levelEnums = AlertLevelEnum.GetAll(); IList <AlertCategoryEnum> categoryEnums = AlertCategoryEnum.GetAll(); int prevSelectedIndex = LevelFilter.SelectedIndex; LevelFilter.Items.Clear(); LevelFilter.Items.Add(new ListItem(SR.Any, string.Empty)); foreach (AlertLevelEnum ale in levelEnums) { LevelFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(ale), ale.Lookup)); } LevelFilter.SelectedIndex = prevSelectedIndex; prevSelectedIndex = CategoryFilter.SelectedIndex; CategoryFilter.Items.Clear(); CategoryFilter.Items.Add(new ListItem(SR.Any, string.Empty)); foreach (AlertCategoryEnum ace in categoryEnums) { CategoryFilter.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(ace), ace.Lookup)); } CategoryFilter.SelectedIndex = prevSelectedIndex; DeleteAllAlertsButton.Roles = AuthorityTokens.Admin.Alert.Delete; DeleteAlertButton.Roles = AuthorityTokens.Admin.Alert.Delete; SetupEventHandlers(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); var criteria = new ServerPartitionSelectCriteria(); criteria.AeTitle.SortAsc(0); Partitions = _theController.GetPartitions(criteria); TheGrid = PartitionGridView; GridPagerTop.InitializeGridPager(SR.GridPagerPartitionSingleItem, SR.GridPagerPartitionMultipleItems, TheGrid, () => Partitions.Count, ImageServerConstants.GridViewPagerPosition.Top); Pager = GridPagerTop; GridPagerTop.Reset(); if (Height != Unit.Empty) { ContainerTable.Height = _height; } DataBind(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); // initialize the controller _theController = new DeviceConfigurationController(); // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems, DeviceGridPanel.TheGrid, delegate { return(DeviceGridPanel.Devices.Count); }, ImageServerConstants.GridViewPagerPosition.Top); DeviceGridPanel.Pager = GridPagerTop; MoveConfirmation.Confirmed += delegate(object data) { MoveRequest moveData = MoveConfirmation.Data as MoveRequest; StudyController studyController = new StudyController(); foreach (Device device in moveData.DestinationDevices) { studyController.MoveStudy(moveData.SelectedStudy, device, moveData.Series); } }; }
protected override void OnInit(EventArgs e) { base.OnInit(e); // initialize the controller _theController = new DeviceConfigurationController(); // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerDeviceSingleItem, SR.GridPagerDeviceMultipleItems, DeviceGridViewControl1.TheGrid, () => DeviceGridViewControl1.Devices.Count, ImageServerConstants.GridViewPagerPosition.Top); DeviceGridViewControl1.Pager = GridPagerTop; GridPagerTop.Reset(); StatusFilter.Items.Add(new ListItem(SR.All)); StatusFilter.Items.Add(new ListItem(SR.Enabled)); StatusFilter.Items.Add(new ListItem(SR.Disabled)); DHCPFilter.Items.Add(new ListItem(SR.All)); DHCPFilter.Items.Add(new ListItem(SR.DHCP)); DHCPFilter.Items.Add(new ListItem(SR.NoDHCP)); }
private void SetupChildControls() { GridPagerTop.InitializeGridPager(Resources.SR.GridPagerStudySingleItem, Resources.SR.GridPagerStudyMultipleItems, StudyListGridView.TheGrid, delegate { return(StudyListGridView.Studies.Count); }, ImageServerConstants.GridViewPagerPosition.Top); StudyListGridView.Pager = GridPagerTop; }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearToDateFilterButton.Attributes["onclick"] = ScriptHelper.ClearDate(ToDateFilter.ClientID, ToDateCalendarExtender.ClientID); ClearFromDateFilterButton.Attributes["onclick"] = ScriptHelper.ClearDate(FromDateFilter.ClientID, FromDateCalendarExtender.ClientID); ToDateFilter.Attributes["OnChange"] = ScriptHelper.PopulateDefaultToTime(ToTimeFilter.ClientID) + " return false;"; FromDateFilter.Attributes["OnChange"] = ScriptHelper.PopulateDefaultFromTime(FromTimeFilter.ClientID) + " return false;"; SearchButton.Attributes["onclick"] = ScriptHelper.CheckDateRange(FromDateFilter.ClientID, ToDateFilter.ClientID, SR.ToFromDateValidationError); GridPagerTop.InitializeGridPager(SR.GridPagerApplicationLogSingleItem, SR.GridPagerApplicationLogMultipleItems, ApplicationLogGridView.ApplicationLogListGrid, delegate { return(ApplicationLogGridView.ResultCount); }, ImageServerConstants.GridViewPagerPosition.Top); ApplicationLogGridView.Pager = GridPagerTop; ApplicationLogGridView.DataSourceCreated += delegate(ApplicationLogDataSource source) { if (!String.IsNullOrEmpty(HostFilter.TrimText)) { source.Host = SearchHelper.LeadingAndTrailingWildCard(HostFilter.TrimText); } if (!String.IsNullOrEmpty(ThreadFilter.TrimText)) { source.Thread = SearchHelper.LeadingAndTrailingWildCard(ThreadFilter.TrimText); } if (!String.IsNullOrEmpty(MessageFilter.TrimText)) { source.Message = SearchHelper.LeadingAndTrailingWildCard(MessageFilter.TrimText); } if (!String.IsNullOrEmpty(LogLevelListBox.SelectedValue)) { if (!LogLevelListBox.SelectedValue.Equals("ANY")) { source.LogLevel = LogLevelListBox.SelectedValue; } } if (!String.IsNullOrEmpty(FromDateFilter.Text) || !String.IsNullOrEmpty(FromTimeFilter.Text)) { DateTime val; if (DateTime.TryParseExact(FromDateFilter.Text + " " + FromTimeFilter.Text, DateTimeFormatter.DefaultTimestampFormat, CultureInfo.CurrentCulture, DateTimeStyles.None, out val)) { source.StartDate = val; } else if (DateTime.TryParse(FromDateFilter.Text + " " + FromTimeFilter.Text, out val)) { source.StartDate = val; } } if (!String.IsNullOrEmpty(ToDateFilter.Text) || !String.IsNullOrEmpty(ToTimeFilter.Text)) { DateTime val; if (DateTime.TryParseExact(ToDateFilter.Text + " " + ToTimeFilter.Text, DateTimeFormatter.DefaultTimestampFormat, CultureInfo.CurrentCulture, DateTimeStyles.None, out val)) { source.EndDate = val; } else if (DateTime.TryParse(ToDateFilter.Text + " " + ToTimeFilter.Text, out val)) { source.EndDate = val; } } }; }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearFromDateButton.OnClientClick = ScriptHelper.ClearDate(FromDate.ClientID, FromDateCalendarExtender.ClientID); ClearToDateButton.OnClientClick = ScriptHelper.ClearDate(ToDate.ClientID, ToDateCalendarExtender.ClientID); ToDate.Attributes["OnChange"] = ScriptHelper.CheckDateRange(FromDate.ClientID, ToDate.ClientID, ToDate.ClientID, ToDateCalendarExtender.ClientID, "To Date must be greater than From Date"); FromDate.Attributes["OnChange"] = ScriptHelper.CheckDateRange(FromDate.ClientID, ToDate.ClientID, FromDate.ClientID, FromDateCalendarExtender.ClientID, "From Date must be less than To Date"); GridPagerTop.InitializeGridPager(Labels.GridPagerQueueSingleItem, Labels.GridPagerQueueMultipleItems, StudyIntegrityQueueItemList.StudyIntegrityQueueGrid, () => StudyIntegrityQueueItemList.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); StudyIntegrityQueueItemList.Pager = GridPagerTop; StudyIntegrityQueueItemList.DataSourceCreated += delegate(StudyIntegrityQueueDataSource source) { source.Partition = ServerPartition; if (!String.IsNullOrEmpty(PatientName.Text)) { source.PatientName = SearchHelper.NameWildCard(PatientName.Text); } if (!String.IsNullOrEmpty(PatientId.Text)) { source.PatientId = SearchHelper.TrailingWildCard(PatientId.Text); } if (!String.IsNullOrEmpty(AccessionNumber.Text)) { source.AccessionNumber = SearchHelper.TrailingWildCard(AccessionNumber.Text); } if (!String.IsNullOrEmpty(FromDate.Text)) { source.FromInsertTime = FromDate.Text; } if (!String.IsNullOrEmpty(ToDate.Text)) { source.ToInsertTime = ToDate.Text; } if (ReasonListBox.SelectedIndex > -1) { var reasonEnums = new List <StudyIntegrityReasonEnum>(); foreach (ListItem item in ReasonListBox.Items) { if (item.Selected) { reasonEnums.Add( StudyIntegrityReasonEnum.GetEnum( item.Value)); } } source.ReasonEnum = reasonEnums; } }; ReconcileButton.Roles = AuthorityTokens.StudyIntegrityQueue.Reconcile; List <StudyIntegrityReasonEnum> reasons = StudyIntegrityReasonEnum.GetAll(); foreach (StudyIntegrityReasonEnum reason in reasons) { ReasonListBox.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(reason), reason.Lookup)); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); ClearScheduleDateButton.OnClientClick = ScriptHelper.ClearDate(ScheduleDate.ClientID, ScheduleCalendarExtender.ClientID); // setup child controls GridPagerTop.InitializeGridPager(SR.GridPagerWorkQueueSingleItem, SR.GridPagerWorkQueueMultipleItems, workQueueItemList.WorkQueueItemGridView, () => workQueueItemList.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); workQueueItemList.Pager = GridPagerTop; workQueueItemList.ServerPartition = _serverPartition; workQueueItemList.DataSourceCreated += delegate(WorkQueueDataSource source) { if (!String.IsNullOrEmpty(PatientName.TrimText)) { source.PatientsName = SearchHelper.NameWildCard(PatientName.TrimText); } source.Partition = ServerPartition; if (!String.IsNullOrEmpty(PatientId.TrimText)) { source.PatientId = SearchHelper.TrailingWildCard(PatientId.TrimText); } if (!String.IsNullOrEmpty(ProcessingServer.TrimText)) { source.ProcessingServer = SearchHelper.TrailingWildCard(ProcessingServer.TrimText); } source.ScheduledDate = !string.IsNullOrEmpty(ScheduleDate.Text) ? ScheduleDate.Text : string.Empty; source.DateFormats = ScheduleCalendarExtender.Format; if (TypeListBox.SelectedIndex > -1) { var types = new List <WorkQueueTypeEnum>(); foreach (ListItem item in TypeListBox.Items) { if (item.Selected) { types.Add(WorkQueueTypeEnum.GetEnum(item.Value)); } } source.TypeEnums = types.ToArray(); } if (StatusListBox.SelectedIndex > -1) { var statuses = new List <WorkQueueStatusEnum>(); foreach (ListItem item in StatusListBox.Items) { if (item.Selected) { statuses.Add(WorkQueueStatusEnum.GetEnum(item.Value)); } } source.StatusEnums = statuses.ToArray(); } if (PriorityDropDownList.SelectedValue != string.Empty) { source.PriorityEnum = WorkQueuePriorityEnum.GetEnum(PriorityDropDownList.SelectedValue); } }; MessageBox.Confirmed += delegate { workQueueItemList.RefreshCurrentPage(); }; }
private void SetupChildControls() { foreach (StudyStatusEnum s in StudyStatusEnum.GetAll()) { StatusListBox.Items.Add(new ListItem { Text = ServerEnumDescription.GetLocalizedDescription(s), Value = s.Lookup }); } ClearToStudyDateButton.Attributes["onclick"] = ScriptHelper.ClearDate(ToStudyDate.ClientID, ToStudyDateCalendarExtender.ClientID); ClearFromStudyDateButton.Attributes["onclick"] = ScriptHelper.ClearDate(FromStudyDate.ClientID, FromStudyDateCalendarExtender.ClientID); ToStudyDate.Attributes["OnChange"] = ScriptHelper.CheckDateRange(FromStudyDate.ClientID, ToStudyDate.ClientID, ToStudyDate.ClientID, ToStudyDateCalendarExtender.ClientID, "To Date must be greater than From Date"); FromStudyDate.Attributes["OnChange"] = ScriptHelper.CheckDateRange(FromStudyDate.ClientID, ToStudyDate.ClientID, FromStudyDate.ClientID, FromStudyDateCalendarExtender.ClientID, "From Date must be less than To Date"); GridPagerTop.InitializeGridPager(SR.GridPagerStudySingleItem, SR.GridPagerStudyMultipleItems, StudyListGridView.TheGrid, () => StudyListGridView.ResultCount, ImageServerConstants.GridViewPagerPosition.Top); StudyListGridView.Pager = GridPagerTop; ConfirmStudySearchMessageBox.Confirmed += delegate { StudyListGridView.DataBindOnPreRender = true; StudyListGridView.Refresh(); if (SearchUpdatePanel.UpdateMode == UpdatePanelUpdateMode.Conditional) { SearchUpdatePanel.Update(); } }; ConfirmStudySearchMessageBox.Cancel += delegate { StudyListGridView.DataBindOnPreRender = false; }; RestoreMessageBox.Confirmed += delegate(object data) { if (data is IList <Study> ) { var studies = data as IList <Study>; foreach (Study study in studies) { _controller.RestoreStudy(study); } } else if (data is IList <StudySummary> ) { var studies = data as IList <StudySummary>; foreach (StudySummary study in studies) { _controller.RestoreStudy(study.TheStudy); } } else if (data is Study) { var study = data as Study; _controller.RestoreStudy(study); } DataBind(); SearchUpdatePanel.Update(); // force refresh }; StudyListGridView.DataSourceCreated += delegate(StudyDataSource source) { source.Partition = ServerPartition; source.DateFormats = ToStudyDateCalendarExtender.Format; if (!String.IsNullOrEmpty(PatientId.Text)) { source.PatientId = SearchHelper.TrailingWildCard(PatientId.Text); } if (!String.IsNullOrEmpty(PatientName.Text)) { source.PatientName = SearchHelper.NameWildCard(PatientName.Text); } if (!String.IsNullOrEmpty(AccessionNumber.Text)) { source.AccessionNumber = SearchHelper.TrailingWildCard(AccessionNumber.Text); } if (!String.IsNullOrEmpty(ToStudyDate.Text)) { source.ToStudyDate = ToStudyDate.Text; } if (!String.IsNullOrEmpty(FromStudyDate.Text)) { source.FromStudyDate = FromStudyDate.Text; } if (!String.IsNullOrEmpty(StudyDescription.Text)) { source.StudyDescription = SearchHelper.LeadingAndTrailingWildCard(StudyDescription.Text); } if (!String.IsNullOrEmpty(ReferringPhysiciansName.Text)) { source.ReferringPhysiciansName = SearchHelper.NameWildCard(ReferringPhysiciansName.Text); } if (!String.IsNullOrEmpty(ResponsiblePerson.Text)) { source.ResponsiblePerson = SearchHelper.NameWildCard(ResponsiblePerson.Text); } if (!String.IsNullOrEmpty(ResponsibleOrganization.Text)) { source.ResponsibleOrganization = SearchHelper.NameWildCard(ResponsibleOrganization.Text); } if (ModalityListBox.SelectedIndex > -1) { var modalities = new List <string>(); foreach (ListItem item in ModalityListBox.Items) { if (item.Selected) { modalities.Add(item.Value); } } source.Modalities = modalities.ToArray(); } if (StatusListBox.SelectedIndex > -1) { var statuses = new List <string>(); foreach (ListItem status in StatusListBox.Items) { if (status.Selected) { statuses.Add(status.Value); } } source.Statuses = statuses.ToArray(); } }; //Set Roles ViewImagesButton.Roles = AuthorityTokens.Study.ViewImages; ViewStudyDetailsButton.Roles = AuthorityTokens.Study.View; MoveStudyButton.Roles = AuthorityTokens.Study.Move; DeleteStudyButton.Roles = AuthorityTokens.Study.Delete; RestoreStudyButton.Roles = AuthorityTokens.Study.Restore; AssignAuthorityGroupsButton.Roles = ClearCanvas.ImageServer.Enterprise.Authentication.AuthorityTokens.Study.EditDataAccess; }