Example #1
0
        private void WriteElement2DataSet()
        {
            string LStrServerIP   = string.Empty;
            string LStrServerPort = string.Empty;

            if (!IBoolCanEdit)
            {
                return;
            }

            UCInputType203 LUCServerIPAddress = GridDecServer01.Children[0] as UCInputType203;

            LStrServerIP = LUCServerIPAddress.GetElementData();

            UCInputType103 LUCServerPort = GridDecServer02.Children[0] as UCInputType103;

            LStrServerPort = LUCServerPort.GetElementData();

            DataRow[] LDataRowDecServer = App.IListDataSetReturn[1].Tables[0].Select("C001 = " + IStrCurrentDecID);

            LDataRowDecServer[0]["C014"] = EncryptionAndDecryption.EncryptDecryptString(LStrServerPort, IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004);
            LDataRowDecServer[0]["C017"] = EncryptionAndDecryption.EncryptDecryptString(LStrServerIP, IStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004);

            OperationEventArgs LEventArgs = new OperationEventArgs();

            LEventArgs.StrObjectTag  = "S212";
            LEventArgs.ObjectSource0 = IStrCurrentDecID;
            IPageTopParent.RefreshTreeViewViewData(LEventArgs);
        }
Example #2
0
        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);
        }