void Add() { DB db = DBFactory.GetDB(); tblTM tm = new tblTM(); tm.TmSN = this.txtTM.Text.Trim(); tm.TmRemark = this.txtRemark.Text.Trim(); db.tblTM.InsertOnSubmit(tm); db.SubmitChanges(); }
private object GetPersonName(tblTM item) { if (item.tblPerson.Count > 0) { return item.tblPerson[0].PersonName; } return string.Empty; }
partial void DeletetblTM(tblTM instance);
partial void UpdatetblTM(tblTM instance);
partial void InserttblTM(tblTM instance);
private ListViewItem Create(tblTM tm) { ListViewItem l = new ListViewItem(tm.TmSN); l.Tag = tm; return l; }