protected void Page_Load(object sender, EventArgs e)
        {
            StudyIntegrityQueueController controller = new StudyIntegrityQueueController();
            StudyIntegrityQueueSelectCriteria criteria = new StudyIntegrityQueueSelectCriteria();

            criteria.StudyIntegrityReasonEnum.EqualTo(StudyIntegrityReasonEnum.Duplicate);
            Duplicates = controller.GetReconcileQueueItemsCount(criteria);
            DuplicateLink.PostBackUrl = ImageServerConstants.PageURLs.StudyIntegrityQueuePage + "?Databind=true&Reason=" + StudyIntegrityReasonEnum.Duplicate.Lookup;

            criteria.StudyIntegrityReasonEnum.EqualTo(StudyIntegrityReasonEnum.InconsistentData);
            InconsistentData = controller.GetReconcileQueueItemsCount(criteria);
            InconsistentDataLink.PostBackUrl = ImageServerConstants.PageURLs.StudyIntegrityQueuePage + "?Databind=true&Reason=" + StudyIntegrityReasonEnum.InconsistentData.Lookup ;

            TotalLinkButton.PostBackUrl = ImageServerConstants.PageURLs.StudyIntegrityQueuePage + "?Databind=true";


        }
예제 #2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

			// Get a count of the number of SIQ entries for the StudyStorageLocation.  If there's
			// any, we don't enable the Delete button.
			var siqController = new StudyIntegrityQueueController();
			var criteria = new StudyIntegrityQueueSelectCriteria();
			criteria.StudyStorageKey.EqualTo(Study.TheStudyStorage.Key);
        	int siqCount = siqController.GetReconcileQueueItemsCount(criteria);

            string reason;
            bool seriesDelete = Study.CanScheduleSeriesDelete(out reason);

            foreach(GridViewRow row in GridView1.Rows)
            {
                if (row.RowType == DataControlRowType.DataRow)
                {
                    int index = GridView1.PageIndex * GridView1.PageSize + row.RowIndex;
                    Series series = _series[index];

                    row.Attributes["serverae"] = _serverPartition.AeTitle;
                    row.Attributes["studyuid"] = _study.StudyInstanceUid;
                    row.Attributes["seriesuid"] = series.SeriesInstanceUid;

                    var controller = new StudyController();
                    if (controller.CanManipulateSeries(Study.TheStudyStorage.Key))
                    {
                        
						if (siqCount==0 && seriesDelete)
							row.Attributes.Add("candelete", "true");

                        row.Attributes.Add("canmove", "true");
                    }
                }
            }

            
        }