Example #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmTMCardItem f = new frmTMCardItem(_dbcards);
     DialogResult dr = f.ShowDialog();
     if (dr == DialogResult.OK)
     {
         DBCard card = f.DBCard;
         TMCardListViewItem lvi = new TMCardListViewItem(card);
         lvi.Tag = f.DBCard;
         this.tmCardListView1.Items.Add(lvi);
     }
 }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEdit_Click(object sender, EventArgs e)
 {
     TMCardListViewItem lvi = GetSelectedTMCardLvi();
     if (lvi != null)
     {
         DBCard card = lvi.DBCard;
         frmTMCardItem f = new frmTMCardItem(_dbcards, card);
         DialogResult dr = f.ShowDialog(this);
         if (dr == DialogResult.OK)
         {
             lvi.Update(card);
         }
     }
 }