%PDF- %PDF-
Direktori : /data/bordel/diplomka/ |
Current File : //data/bordel/diplomka/import_sn.patch |
Index: Shell/Details/PanelDetail.cs =================================================================== --- Shell/Details/PanelDetail.cs (revision 2988) +++ Shell/Details/PanelDetail.cs (working copy) @@ -289,14 +289,20 @@ if (SerialNumberTextEdit != null) { var panelRow = CurrentRow as CommServerDataSet.PanelRow; - if (panelRow != null && (panelRow.IsPanelSerialNumberNull() || panelRow.PanelSerialNumber == "")) + string origSn = CurrentRow["PanelSerialNumber", DataRowVersion.Original].ToString(); + if (panelRow != null) { - SerialNumberTextEdit.Enabled = true; + if (panelRow.IsPanelSerialNumberNull() || panelRow.PanelSerialNumber == "" || origSn == "") + { + SerialNumberTextEdit.Enabled = true; + SerialNumberTextEdit.Properties.ReadOnly = false; + } + else + { + SerialNumberTextEdit.Enabled = false; + SerialNumberTextEdit.Properties.ReadOnly = true; + } } - else - { - SerialNumberTextEdit.Enabled = false; - } } } Index: Shell/MainShellForm.cs =================================================================== --- Shell/MainShellForm.cs (revision 2988) +++ Shell/MainShellForm.cs (working copy) @@ -1343,12 +1343,7 @@ NewPanelRow.PanelTypeID = panelTypeID; NewPanelRow.PanelVersionID = panelVersionID; NewPanelRow.Name = string.Format("{0} {1} - Imported", Honeywell.MBEMEA.Shell.Properties.Resources.PanelName, DS.Panel.Count + 1); - string serialNo = ""; string firmwareVersion = ""; - if (panelInfo.TryGetValue("SerialNumber", out serialNo)) - { - NewPanelRow.PanelSerialNumber = serialNo; - } if(!panelInfo.TryGetValue("FirmwareVersion", out firmwareVersion)) { firmwareVersion = "";