示例#1
0
        private void CmbPersonGender_SelectedValueChanged(System.Object sender, System.EventArgs e)
        {
            if (cmbPersonGender.GetSelectedString() == "Female")
            {
                cmbPersonAddresseeTypeCode.SetSelectedString(SharedTypes.StdAddresseeTypeCodeEnumToString(TStdAddresseeTypeCode.satcFEMALE));
            }
            else if (cmbPersonGender.GetSelectedString() == "Male")
            {
                cmbPersonAddresseeTypeCode.SetSelectedString(SharedTypes.StdAddresseeTypeCodeEnumToString(TStdAddresseeTypeCode.satcMALE));
            }

//            /*
//             * Also assign the value directly to the databound data field!
//             * Strangely enough, this is necessary for the case if the user doesn't TAB out
//             * of cmbPersonGender, but uses the mouse to select anything else on the screen
//             * *except* cmbAddresseeType!
//             */
//            FMainDS.PPartner[0].AddresseeTypeCode = cmbAddresseeType.SelectedItem.ToString();
        }