private bool SaveSetting() { StorageItem testItem = _storageItem.Clone() as StorageItem; _fieldControler.SaveSetting(testItem); _tagControler.SaveSetting(testItem.DPath); foreach (StorageItem item in _itemList) { if (item == _storageItem || item.GWDataDBField.Table == GWDataDBTable.None) { continue; } if (item.GWDataDBField.Table == testItem.GWDataDBField.Table && item.GWDataDBField.FieldName == testItem.GWDataDBField.FieldName) { MessageBox.Show(this, "Element (" + item.DPath.GetTagName() + ") has been mapped to this GC Gateway field (" + item.GWDataDBField.GetFullFieldName() + "). \r\n" + "Pease change another GC Gateway field.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.comboBoxField.Focus(); return(false); } } _fieldControler.SaveSetting(_storageItem); _tagControler.SaveSetting(_storageItem.DPath); _storageItem.RedundancyFlag = this.checkBoxRedundancy.Checked; return(true); }
private void buttonOK_Click(object sender, EventArgs e) { XIMMappingItem testItem = _item.Clone() as XIMMappingItem; _controler.SaveSetting(testItem); if (_list != null) { foreach (XIMMappingItem item in _list) { if (item == _item || item.GWDataDBField.Table == GWDataDBTable.None) { continue; } if (item.GWDataDBField.Table == testItem.GWDataDBField.Table && item.GWDataDBField.FieldName == testItem.GWDataDBField.FieldName) { MessageBox.Show(this, "Element (" + item.Element.XPath + ") has been mapped to this GC Gateway field (" + item.GWDataDBField.GetFullFieldName() + "). \r\n\r\n" + "Pease change another GC Gateway field.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.comboBoxField.Focus(); return; } } } _controler.SaveSetting(_item); _item.RedundancyFlag = this.checkBoxRedundancy.Checked; this.DialogResult = DialogResult.OK; this.Close(); }
private bool SaveSetting() { MWLQueryCriteriaItem testItem = _qcItem.Clone() as MWLQueryCriteriaItem; _fieldControler.SaveSetting(testItem); _tagControler.SaveSetting(testItem.DPath); foreach (MWLQueryCriteriaItem item in Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList) { if (item == _qcItem || item.GWDataDBField.Table == GWDataDBTable.None) { continue; } if (item.GWDataDBField.Table == testItem.GWDataDBField.Table && item.GWDataDBField.FieldName == testItem.GWDataDBField.FieldName) { MessageBox.Show(this, "Element (" + item.DPath.GetTagName() + ") has been mapped to this GC Gateway field (" + item.GWDataDBField.GetFullFieldName() + "). \r\n" + "Pease change another GC Gateway field.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.comboBoxField.Focus(); return(false); } } _fieldControler.SaveSetting(_qcItem); _tagControler.SaveSetting(_qcItem.DPath); return(true); }
private bool SaveSetting() { _fieldControler.SaveSetting(_qrItem); _tagControler.SaveSetting(_qrItem.DPath); //foreach (MWLQueryResultItem item in Program.ConfigMgt.Config.Rule.QueryResult.MappingList) //{ // if (item == _qrItem || // item.GWDataDBField.Table == GWDataDBTable.None) continue; // if (item.GWDataDBField.Table == _qrItem.GWDataDBField.Table && // item.GWDataDBField.FieldName == _qrItem.GWDataDBField.FieldName) // { // MessageBox.Show(this, "Element (" + item.DPath.GetTagName() + // ") has been mapped to this GC Gateway field (" // + _qrItem.GWDataDBField.GetFullFieldName() + "). \r\n" // + "Pease change another GC Gateway field.", "Warning", // MessageBoxButtons.OK, MessageBoxIcon.Warning); // this.comboBoxField.Focus(); // return false; // } //} //if (_isAuto) //{ // if (_qrItem.GWDataDBField.Table == GWDataDBTable.None || // _qrItem.GWDataDBField.FieldName.Length < 1) // { // MessageBox.Show(this, "Please select a field for this item.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Information); // return false; // } //} if (_isAuto) { if (_qrItem.TargetField == WorklistSCPHelper.DataColumns.RequestedProcedureID) { Program.ConfigMgt.Config.AutoGenerateRPID = this.checkBoxAuto.Checked; } if (_qrItem.TargetField == WorklistSCPHelper.DataColumns.ScheduledProcedureStepID) { Program.ConfigMgt.Config.AutoGenerateSPSPID = this.checkBoxAuto.Checked; } if (_qrItem.TargetField == WorklistSCPHelper.DataColumns.StudyInstanceUID) { Program.ConfigMgt.Config.AutoGenerateSTDUID = this.checkBoxAuto.Checked; } } return(true); }