public bool Undo() { if (State == States.ADD) { errorProvider.Clear(); dS_Master.Tables["DEPART"].RejectChanges(); BS_DEPART.ResetCurrentItem(); TA_ARRIVE.Fill(dS_Master.ARRIVE); Sync_ForeignTables(); } ir_departs.tb_confirmerPar.ResetText(); return(true); }
private void DeleteDepart() { DTR_Depart = dS_Master.Tables["DEPART"].NewRow(); DTR_Depart["IdReser"] = dS_Master.Tables["DEPART"].Rows[BS_DEPART.Position]["IdReser"]; DTR_Depart["NoCham"] = dS_Master.Tables["DEPART"].Rows[BS_DEPART.Position]["NoCham"]; BS_DEPART.RemoveCurrent(); BS_DEPART.MoveFirst(); try { TA_DEPART.Update(dS_Master.DEPART); AjustDe(false); } catch (Exception ex) { MessageBox.Show(ex.Message); } DTR_Depart.Delete(); }