private void LUCServerMainBack_IOperationEvent(object sender, OperationEventArgs e) { string LStrSource = string.Empty; string LStrCurrentData = string.Empty; string LStrChangedData = string.Empty; LStrSource = e.StrObjectTag; if (string.IsNullOrEmpty(LStrSource)) { return; } LStrCurrentData = e.ObjectSource0 as string; UCInputType202 LUCServerMainBack = null; if (LStrCurrentData == "1") { LStrChangedData = "2"; } else { LStrChangedData = "1"; } if (LStrSource == "S0102") { LUCServerMainBack = GridCtiHubServer0202.Children[0] as UCInputType202; LabelCtiHubServer01.Content = App.GetDisplayCharater("UCResourceType211", "ServerType" + LStrCurrentData); LabelCtiHubServer02.Content = App.GetDisplayCharater("UCResourceType211", "ServerType" + LStrChangedData); } else { LUCServerMainBack = GridCtiHubServer0102.Children[0] as UCInputType202; LabelCtiHubServer02.Content = App.GetDisplayCharater("UCResourceType211", "ServerType" + LStrCurrentData); LabelCtiHubServer01.Content = App.GetDisplayCharater("UCResourceType211", "ServerType" + LStrChangedData); } LUCServerMainBack.SetElementData(LStrChangedData, "Change"); }
private void ShowMainServerInformation() { string LStrServerData011 = string.Empty; string LStrServerData012 = string.Empty; string LStrServerData013 = string.Empty; string LStrServerData014 = string.Empty; string LStrServerData017 = string.Empty; string LStrServerData018 = string.Empty; DataRow[] LDataRowCtiHubServer1 = IDataTableCtiHubServer.Select("C012 = '1'"); LStrServerData011 = LDataRowCtiHubServer1[0]["C011"].ToString(); LStrServerData012 = LDataRowCtiHubServer1[0]["C012"].ToString(); LStrServerData013 = LDataRowCtiHubServer1[0]["C013"].ToString(); LStrServerData014 = LDataRowCtiHubServer1[0]["C014"].ToString(); LStrServerData014 = EncryptionAndDecryption.EncryptDecryptString(LStrServerData014, IStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); LStrServerData017 = LDataRowCtiHubServer1[0]["C017"].ToString(); LStrServerData017 = EncryptionAndDecryption.EncryptDecryptString(LStrServerData017, IStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); LStrServerData018 = LDataRowCtiHubServer1[0]["C018"].ToString(); LStrServerData018 = EncryptionAndDecryption.EncryptDecryptString(LStrServerData018, IStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); UCTextBoxForSettedDataView LUCDataView0104 = new UCTextBoxForSettedDataView(); LUCDataView0104.StrDataView = LStrServerData018; GridCtiHubServer0104.Children.Add(LUCDataView0104); if (!IBoolCanEdit) { UCTextBoxForSettedDataView LUCDataView0101 = new UCTextBoxForSettedDataView(); LUCDataView0101.StrDataView = App.GetDisplayCharater("UCResourceType211", "C011V" + LStrServerData011); GridCtiHubServer0101.Children.Add(LUCDataView0101); UCTextBoxForSettedDataView LUCDataView0102 = new UCTextBoxForSettedDataView(); LUCDataView0102.StrDataView = App.GetDisplayCharater("UCResourceType211", "C012V" + LStrServerData012); GridCtiHubServer0102.Children.Add(LUCDataView0102); UCTextBoxForSettedDataView LUCDataView0103 = new UCTextBoxForSettedDataView(); LUCDataView0103.StrDataView = LStrServerData017; GridCtiHubServer0103.Children.Add(LUCDataView0103); UCTextBoxForSettedDataView LUCDataView0105 = new UCTextBoxForSettedDataView(); LUCDataView0105.StrDataView = LStrServerData014; GridCtiHubServer0105.Children.Add(LUCDataView0105); } else { UCInputType201 LUCServerStatus = new UCInputType201(); LUCServerStatus.StrData1 = App.GetDisplayCharater("1110011"); LUCServerStatus.StrData0 = App.GetDisplayCharater("1110012"); LUCServerStatus.SetElementData(LStrServerData011, ""); LUCServerStatus.IOperationEvent += LUCServerStatus_IOperationEvent; GridCtiHubServer0101.Children.Add(LUCServerStatus); LUCServerStatus.IStrThisName = "S0101"; UCInputType202 LUCServerMainBack = new UCInputType202(); LUCServerMainBack.StrData1 = App.GetDisplayCharater("1110014"); LUCServerMainBack.StrData2 = App.GetDisplayCharater("1110013"); LUCServerMainBack.IOperationEvent += LUCServerMainBack_IOperationEvent; LUCServerMainBack.SetElementData(LStrServerData012, ""); GridCtiHubServer0102.Children.Add(LUCServerMainBack); LUCServerMainBack.IStrThisName = "S0102"; UCInputType203 LUCServerIPAddress = new UCInputType203(); LUCServerIPAddress.SetElementData(LStrServerData017); LUCServerIPAddress.IOperationEvent += LUCServerIPAddress1IOperationEvent; GridCtiHubServer0103.Children.Add(LUCServerIPAddress); UCInputType103 LUCServerPort = new UCInputType103(); LUCServerPort.SetElementData(LStrServerData014); LUCServerPort.SetMinMaxDefaultValue(1024, 65535, 3420); GridCtiHubServer0105.Children.Add(LUCServerPort); } }
private void WriteElement2DataSet() { if (!IBoolCanEdit) { return; } List <string> LListStrMainSetting = new List <string>(); List <string> LListStrBackSetting = new List <string>(); UCInputType201 LUCServerStatusTop = GridCtiHubServer0101.Children[0] as UCInputType201; UCInputType201 LUCServerStatusButtom = GridCtiHubServer0201.Children[0] as UCInputType201; UCInputType202 LUCServerMainBackTop = GridCtiHubServer0102.Children[0] as UCInputType202; UCInputType202 LUCServerMainBackButtom = GridCtiHubServer0202.Children[0] as UCInputType202; UCInputType203 LUCServerIPAddressTop = GridCtiHubServer0103.Children[0] as UCInputType203; UCInputType203 LUCServerIPAddressButtom = GridCtiHubServer0203.Children[0] as UCInputType203; UCInputType103 LUCServerPortTop = GridCtiHubServer0105.Children[0] as UCInputType103; UCInputType103 LUCServerPortButtom = GridCtiHubServer0205.Children[0] as UCInputType103; if (LUCServerMainBackTop.GetElementData() == "1") { LListStrMainSetting.Add(LUCServerStatusTop.GetElementData()); LListStrMainSetting.Add("1"); LListStrMainSetting.Add(LUCServerIPAddressTop.GetElementData()); LListStrMainSetting.Add(LUCServerPortTop.GetElementData()); LListStrBackSetting.Add(LUCServerStatusButtom.GetElementData()); LListStrBackSetting.Add("2"); LListStrBackSetting.Add(LUCServerIPAddressButtom.GetElementData()); LListStrBackSetting.Add(LUCServerPortButtom.GetElementData()); } else { LListStrMainSetting.Add(LUCServerStatusButtom.GetElementData()); LListStrMainSetting.Add("1"); LListStrMainSetting.Add(LUCServerIPAddressButtom.GetElementData()); LListStrMainSetting.Add(LUCServerPortButtom.GetElementData()); LListStrBackSetting.Add(LUCServerStatusTop.GetElementData()); LListStrBackSetting.Add("2"); LListStrBackSetting.Add(LUCServerIPAddressTop.GetElementData()); LListStrBackSetting.Add(LUCServerPortTop.GetElementData()); } DataRow[] LDataRowCtiHubServerMain = App.IListDataSetReturn[2].Tables[0].Select("C001 = 2130000000000000001"); LDataRowCtiHubServerMain[0]["C011"] = LListStrMainSetting[0]; LDataRowCtiHubServerMain[0]["C012"] = LListStrMainSetting[1]; LDataRowCtiHubServerMain[0]["C014"] = EncryptionAndDecryption.EncryptDecryptString(LListStrMainSetting[3], IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); LDataRowCtiHubServerMain[0]["C017"] = EncryptionAndDecryption.EncryptDecryptString(LListStrMainSetting[2], IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); DataRow[] LDataRowCtiHubServerBack = App.IListDataSetReturn[2].Tables[0].Select("C001 = 2130000000000000002"); LDataRowCtiHubServerBack[0]["C011"] = LListStrBackSetting[0]; LDataRowCtiHubServerBack[0]["C012"] = LListStrBackSetting[1]; LDataRowCtiHubServerBack[0]["C014"] = EncryptionAndDecryption.EncryptDecryptString(LListStrBackSetting[3], IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); LDataRowCtiHubServerBack[0]["C017"] = EncryptionAndDecryption.EncryptDecryptString(LListStrBackSetting[2], IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrObjectTag = "S213"; IPageTopParent.RefreshTreeViewViewData(LEventArgs); }