Beispiel #1
0
        public void ShowParameterEditStyle(DataRow ADataRowParamInfo)
        {
            string LStr11001003            = string.Empty; //参数编码
            string LStrVerificationCode104 = string.Empty;
            string LStrParameterValueDB    = string.Empty;

            int LIntMinValue = 0, LIntMaxValue = 0, LIntDefValue = 0;

            try
            {
                IDataRowCurrent = ADataRowParamInfo;
                if (IPageParent != null)
                {
                    IPageParent.IOperationEvent += IPageParent_IOperationEvent;
                }

                LStr11001003            = ADataRowParamInfo["C003"].ToString();
                LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);

                LStrParameterValueDB = ADataRowParamInfo["C006"].ToString();
                LStrParameterValueDB = EncryptionAndDecryption.EncryptDecryptString(LStrParameterValueDB, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrParameterValueDB = LStrParameterValueDB.Substring(8);
                if (App.GetParameterMinMaxDefValue(LStr11001003, ref LIntMinValue, ref LIntMaxValue, ref LIntDefValue))
                {
                    TextBoxPositiveInteger.SetMinMaxDefaultValue(LIntMinValue, LIntMaxValue, LIntDefValue);
                }

                TextBoxPositiveInteger.SetElementData(LStrParameterValueDB);
                IPageParent.IChangeLanguageEvent += IPageParent_IChangeLanguageEvent;
            }
            catch { }
        }
Beispiel #2
0
        private void IPageParent_IOperationEvent(object sender, OperationEventArgs e)
        {
            string LStrNewValue = string.Empty;

            LStrNewValue = TextBoxPositiveInteger.GetElementData();

            if (e.StrObjectTag == "Save")
            {
                IPageParent.SaveEditedParameterValue(LStrNewValue);
            }
        }
Beispiel #3
0
        private void IPageParent_IOperationEvent(object sender, OperationEventArgs e)
        {
            string LStrNewValue = string.Empty;

            if (RadioButtonValue0.IsChecked == true)
            {
                LStrNewValue = "0";
            }
            else
            {
                LStrNewValue = TextBoxPositiveInteger.GetElementData();
            }
            if (e.StrObjectTag == "Save")
            {
                IPageParent.SaveEditedParameterValue(LStrNewValue);
            }
        }
Beispiel #4
0
        public void ShowParameterEditStyle(DataRow ADataRowParamInfo)
        {
            string LStr11001003            = string.Empty; //参数编码
            string LStrVerificationCode104 = string.Empty;
            string LStrParameterValueDB    = string.Empty;

            int LIntMinValue = 0, LIntMaxValue = 0, LIntDefValue = 0;

            try
            {
                IDataRowCurrent = ADataRowParamInfo;
                if (IPageParent != null)
                {
                    IPageParent.IOperationEvent += IPageParent_IOperationEvent;
                }
                LStr11001003              = ADataRowParamInfo["C003"].ToString();
                LStrVerificationCode104   = S1106App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
                RadioButtonValueX.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "VX");
                RadioButtonValue0.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "V0");
                LStrParameterValueDB      = ADataRowParamInfo["C006"].ToString();
                LStrParameterValueDB      = EncryptionAndDecryption.EncryptDecryptString(LStrParameterValueDB, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrParameterValueDB      = LStrParameterValueDB.Substring(8);

                if (S1106App.GetParameterMinMaxDefValue(LStr11001003, ref LIntMinValue, ref LIntMaxValue, ref LIntDefValue))
                {
                    TextBoxPositiveInteger.SetMinMaxDefaultValue(LIntMinValue, LIntMaxValue, LIntDefValue);
                }

                if (LStrParameterValueDB != "0")
                {
                    RadioButtonValueX.IsChecked = true;
                    TextBoxPositiveInteger.SetElementData(LStrParameterValueDB);
                }
                else
                {
                    RadioButtonValue0.IsChecked = true;
                    TextBoxPositiveInteger.SetElementData(LIntDefValue.ToString());
                }



                IPageParent.IChangeLanguageEvent += IPageParent_IChangeLanguageEvent;
            }
            catch { }
        }
 public void SetMinMaxDefaultValue(int AIntMinValue, int AIntMaxValue, int AIntDefaultValue)
 {
     TextBoxPositiveInteger.SetMinMaxDefaultValue(AIntMinValue, AIntMaxValue, AIntDefaultValue);
 }
 public string GetElementData()
 {
     return(TextBoxPositiveInteger.GetElementData());
 }
 public void SetElementData(string AStrDataContext)
 {
     TextBoxPositiveInteger.SetElementData(AStrDataContext);
 }