コード例 #1
0
ファイル: BrokerService.cs プロジェクト: sakpung/webstudy
        public void UpdateMPPS(string mppsSOPInstanceUID, WCFPPSInformation mpps)
        {
            PPSInformation srchMpps = new PPSInformation()
            {
                MPPSSOPInstanceUID = mppsSOPInstanceUID
            };

            Guard.ArgumentNotNullOrEmpty(mppsSOPInstanceUID, "mppsSOPInstanceUID");
            VerifyMpps(mpps);

            using (MPPSDataset ds = DB.DataAccess.FindMPPS(srchMpps))
            {
                if (ds != null && ds.PPSInformation.Rows.Count > 0)
                {
                    MPPSDataset.PPSInformationRow row = ds.PPSInformation.Rows[0] as MPPSDataset.PPSInformationRow;

                    row.Update(mpps);
                    DB.DataAccess.UpdateMPPS(ds);
                }
                else
                {
                    throw new Exception("Modality performed procedure step not found");
                }
            }
        }
コード例 #2
0
ファイル: BrokerService.cs プロジェクト: sakpung/webstudy
        public void DeleteMPPS(string mppsSOPInstanceUID)
        {
            PPSInformation mpps = new PPSInformation()
            {
                MPPSSOPInstanceUID = mppsSOPInstanceUID
            };

            Guard.ArgumentNotNullOrEmpty(mppsSOPInstanceUID, "mppsSOPInstanceUID");
            using (MPPSDataset ds = DB.DataAccess.FindMPPS(mpps))
            {
                if (ds.PPSInformation.Rows.Count > 0)
                {
                    ds.PPSInformation.Rows[0].Delete();
                    DB.DataAccess.UpdateMPPS(ds);
                }
                else
                {
                    throw new Exception("Modality performed procedure step not found");
                }
            }
        }