コード例 #1
0
 public void addListView()
 {
     cards = CardManage.getAllCards();
     lvCard.Items.Clear();
     foreach (Card card in cards)
     {
         ListViewItem lvi = new ListViewItem(card.Name);
         lvi.Tag = card.Id;
         lvi.SubItems.Add(card.Discount.ToString());
         lvCard.Items.Add(lvi);
     }
 }
コード例 #2
0
ファイル: frmSale.cs プロジェクト: foxZhong/smartken-kia
        private void Initial()
        {
            this.lblRealName.Text        = user.RealName;
            this.lblISBN.Text            = "";
            this.lblName.Text            = "";
            this.lblAuthor.Text          = "";
            this.lblPrice.Text           = "";
            this.lblDiscountedPirce.Text = "";
            this.lblPublisher.Text       = "";
            this.lblStock.Text           = "";
            //this.lblPubDate.Text = "";
            this.lblTotal.Text     = "";
            this.lblGathering.Text = "";
            this.lblFindMoney.Text = "";
            this.txtPay.Text       = "";

            cobCardId.DisplayMember = "Name";
            foreach (Card card in CardManage.getAllCards())
            {
                cobCardId.Items.Add(card);
            }
            cobCardId.SelectedItem = cobCardId.Items[0];
        }