コード例 #1
0
 public void Init()
 {
     this.Items.Clear();
     TextValueItem <PaymentMode>[] items = new TextValueItem <PaymentMode>[] {
         new TextValueItem <PaymentMode>(PaymentMode.Cash, PaymentModeDescription.GetDescription(PaymentMode.Cash)),
         new TextValueItem <PaymentMode>(PaymentMode.Prepay, PaymentModeDescription.GetDescription(PaymentMode.Prepay)),
         new TextValueItem <PaymentMode>(PaymentMode.YangChengTong, PaymentModeDescription.GetDescription(PaymentMode.YangChengTong)),
         new TextValueItem <PaymentMode>(PaymentMode.Pos, PaymentModeDescription.GetDescription(PaymentMode.Pos)),
         new TextValueItem <PaymentMode>(PaymentMode.ZhongShanTong, PaymentModeDescription.GetDescription(PaymentMode.ZhongShanTong)),
     };
     this.DataSource    = items;
     this.DisplayMember = "Text";
     this.DropDownStyle = ComboBoxStyle.DropDownList;
 }
コード例 #2
0
        public void Init()
        {
            this.Items.Clear();

            TextValueItem <PaymentCode?>[] items = new TextValueItem <PaymentCode?>[] {
                new TextValueItem <PaymentCode?>(null, string.Empty),
                new TextValueItem <PaymentCode?>(PaymentCode.Computer, PaymentCodeDescription.GetDescription(PaymentCode.Computer)),
                new TextValueItem <PaymentCode?>(PaymentCode.APM, PaymentCodeDescription.GetDescription(PaymentCode.APM)),
                new TextValueItem <PaymentCode?>(PaymentCode.FunctionCard, PaymentCodeDescription.GetDescription(PaymentCode.FunctionCard))
            };
            this.DataSource    = items;
            this.DisplayMember = "Text";
            this.DropDownStyle = ComboBoxStyle.DropDownList;
        }