/// <summary> /// /// </summary> /// <param name="card"></param> internal TMCardListViewItem(DBCard card) { string[] items = GetEmptyItems(); this.SubItems.AddRange(items); this._dbcard = card; Update(_dbcard); }
/// <summary> /// /// </summary> /// <returns></returns> public DBCard[] ExecuteTmDBCard() { DataTable tbl = ExecuteTmCardDataTable(); List<DBCard> list = new List<DBCard>(); foreach (DataRow row in tbl.Rows) { DBCard c = new DBCard(); c.CardID = Convert.ToInt32(row["CardID"]); c.SN = row["sn"].ToString(); c.Person = row["person"].ToString(); c.Remark = row["remark"].ToString(); list.Add(c); } return list.ToArray(); }
internal void Update(DBCard card) { this.CardSN = card.SN; this.Person = card.Person; this.Remark = card.Remark; }