Пример #1
0
        public EFTOptionForm()
        {
            InitializeComponent();
            eftCardManager = new EFTCardManager();

            List<EFTCard> cards = eftCardManager.GetEftCards();

            foreach (EFTCard card in cards)
            {
                EFTCardButton cardButton = new EFTCardButton();
                cardButton.CardID = card.Id;
                cardButton.Text = card.CardName;
                cardButton.DialogResult = DialogResult.OK;
                cardButton.Click += new EventHandler(eftCardButton_Click);
                flowLayoutPanel1.Controls.Add(cardButton);
            }
        }
Пример #2
0
 /// <summary>
 /// EFTCardButton insted use another Button
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DeliveryChargeAmountForm_Load(object sender, EventArgs e)
 {
     foreach (CUserInfo user in userList)
     {
         if (user.Type == CUserConstant.GetUSerConstant("WAITER"))
         {
             EFTCardButton cardButton = new EFTCardButton();
             cardButton.CardID = user.UserID;
             cardButton.Text = user.UserName;
             cardButton.DialogResult = DialogResult.OK;
             cardButton.Click += new EventHandler(cardButton_Click);
             flowLayoutPanel1.Controls.Add(cardButton);
         }
     }
 }