private void btnAdd_Click(object sender, System.EventArgs e) { frmXGTaskItem f = new frmXGTaskItem(); if (f.ShowDialog(this) == DialogResult.OK) { string person = f.Person; string cardsn = f.CardSN; string stName = f.XgStationName; XGTime time = f.XGTime; XGDB.InsertXGTask(stName, person, time); //XGStation xgstation = GetXGStation( stName ); //Card card = GetCard( cardsn ); // //XGTask task = new XGTask( xgstation, card, time ); //XGDB.InsertXGTask( task ); LoadXGTaskFromDB(); XGDB.Resolve(); } }