protected void addpersonalbutton_Click(object sender, EventArgs e) { Debug.WriteLine("Adding a personel manager"); if (personeelsledendropbox.Entries.Count > 0) { Debug.WriteLine("Value found"); int p_persoon = Convert.ToInt32(personeelsledendropbox.Entries[0].Value); CumulatieDataContext cumul = new CumulatieDataContext(); PA_Access pAdmin = new PA_Access(); pAdmin.access = "00"; pAdmin.p_persoon = p_persoon; pAdmin.wog = "HSD"; Debug.WriteLine(p_persoon); cumul.PA_Accesses.InsertOnSubmit(pAdmin); cumul.SubmitChanges(); personelAdmins.DataBind(); } }
protected void adddirectorbutton_Click(object sender, EventArgs e) { Debug.WriteLine("Adding a director"); if (DirectorDropdownBox.Entries.Count > 0) { int p_persoon = Convert.ToInt32(DirectorDropdownBox.Entries[0].Value); CumulatieDataContext cumul = new CumulatieDataContext(); Debug.WriteLine(p_persoon); PA_Access pAdmin = new PA_Access(); pAdmin.access = "01"; pAdmin.p_persoon = p_persoon; pAdmin.wog = OwgDropdownList.SelectedValue; cumul.PA_Accesses.InsertOnSubmit(pAdmin); cumul.SubmitChanges(); Debug.WriteLine("Databinding"); wogDirectors.DataBind(); } }
partial void UpdatePA_Access(PA_Access instance);
partial void DeletePA_Access(PA_Access instance);
partial void InsertPA_Access(PA_Access instance);