Exemple #1
0
	public void DeleteKandidat (Kandidat KandidatToDelete)
		{
		KandidatToDelete.BasisRow.Delete ();
		DataSet UpdateDataSet = KandidatToDelete.BasisRow.Table.DataSet.GetChanges ();
		if (UpdateDataSet != null)
			{
			MBRWahlDataWrapper.Instance.MBRWahlCentralAccess.SetCommonDataSet (UpdateDataSet);
			UpdateDataSet.AcceptChanges ();
			_allKandidaten.Remove (KandidatToDelete);
			SendPropertyChanged ("AllKandidaten");
			}
		}
Exemple #2
0
	public void UpdateKandidatenDataBase (Kandidat UpdateElement)
		{
		UpdateElement.WahlID = Guid.Parse (WahlID);
		DataSet UpdateDataSet = UpdateElement.BasisRow.Table.DataSet.GetChanges ();
		if (UpdateDataSet != null)
			{
			MBRWahlDataWrapper.Instance.MBRWahlCentralAccess.SetCommonDataSet (UpdateDataSet);
			UpdateDataSet.AcceptChanges ();
			//MBRWahlDataWrapper.Instance.ForceStaticDataSetForInternetToReload ();
			SendPropertyChanged ("AllKandidaten");
			}
		}
Exemple #3
0
	public Kandidat InsertNewKandidat ()
		{
		DataRow NewKandidatRow = MBRWahlDataWrapper.Instance.StaticDataSetForInternet.Tables ["Kandidaten"].NewRow ();
		NewKandidatRow ["ID"] = Guid.NewGuid ();
		NewKandidatRow ["WahlID"] = Guid.Parse (WahlID);
		NewKandidatRow ["VorName"] = "Bitte Vorname eintragen";
		NewKandidatRow ["FamilienName"] = "Bitte FamilienName eintragen";
		NewKandidatRow ["LastUpdateToken"] = WMB.Basics.GetNextLastUpdateTokenHelper ();
		MBRWahlDataWrapper.Instance.StaticDataSetForInternet.Tables ["Kandidaten"].Rows.Add (NewKandidatRow);
		Kandidat NewKandidat = new Kandidat (NewKandidatRow) {Parent = this};
		AllKandidaten.Add (NewKandidat);
		UpdateKandidatenDataBase (NewKandidat);
		return NewKandidat;
		}