Example #1
0
        private void BindDropDownList()
        {
            AspNetHelper.BindCustomer(this.CustomerID);
            AspNetHelper.BindBussinessPerson(this.SignPersonID);
            this.SettleStateID.Items.Clear();
            this.SettleStateID.Items.AddRange(AspNetHelper.GetFieldDescription(typeof(SettleState)));
            // 合同状态
            Dictionary <DropDownList, string> dic = new Dictionary <DropDownList, string>();

            dic[this.StateId] = "ContractState";
            AspNetHelper.BindDropDown(dic);
        }
Example #2
0
        /// <summary>
        /// 枚举下拉框绑定
        /// </summary>
        private void BindEnumDropDown()
        {
            Dictionary <DropDownList, Type> requestList = new Dictionary <DropDownList, Type>();

            //requestList[this.AnimalSignID] = typeof(AnimalSign);
            //requestList[this.ConstellationID] = typeof(Constellation);
            //requestList[this.EducationalID] = typeof(Educational);
            //requestList[this.FieldID] = typeof(Field);
            //requestList[HealthStateID] = typeof(HealthState);
            //requestList[this.DrinkingLevelID] = typeof(DrinkingLevel);
            //requestList[this.BodyTypeID] = typeof(BodyType);
            requestList[this.ImportantLevelId] = typeof(ImportantLevel);

            foreach (KeyValuePair <DropDownList, Type> keyValuePair in requestList)
            {
                keyValuePair.Key.Items.Clear();
                keyValuePair.Key.Items.AddRange(AspNetHelper.GetFieldDescription(keyValuePair.Value));
            }
        }