Hi,
I have a checklistbox called from a table with permissions as value and a "Save" button. I am able to display the permissionlevel as checklistbox. For example,
Read
Write
Execute
Full Control
(Save) button
I have another table which associates with userid and permissionlevel. If a user has read and write permission in the table, when that user signs in, I want Read and Write checkbox to be displayed as checked. The user may uncheck or check more permission. When he clicks "Save" button, I want everything that is checked to insert to a table and delete anything that is unchecked from the table. I am new to C# and still trying to learn this new language, so if you can be specific with your answer, it will be very grateful. Thanks.
This is my code for displaying the list.
private void Form1_Load(object sender, EventArgs e)
{
permissionDetailsTableAdapter.Fill(mydataDataSet.PermissionsType);
checkListBox1.DataSource = mydataDataSet.PermissionsType;
checkListBox1.ValueMember = "permissionID";
checkListBox1.DisplayMember = "permissionDescription";
}
I have a checklistbox called from a table with permissions as value and a "Save" button. I am able to display the permissionlevel as checklistbox. For example,
Read
Write
Execute
Full Control
(Save) button
I have another table which associates with userid and permissionlevel. If a user has read and write permission in the table, when that user signs in, I want Read and Write checkbox to be displayed as checked. The user may uncheck or check more permission. When he clicks "Save" button, I want everything that is checked to insert to a table and delete anything that is unchecked from the table. I am new to C# and still trying to learn this new language, so if you can be specific with your answer, it will be very grateful. Thanks.
This is my code for displaying the list.
private void Form1_Load(object sender, EventArgs e)
{
permissionDetailsTableAdapter.Fill(mydataDataSet.PermissionsType);
checkListBox1.DataSource = mydataDataSet.PermissionsType;
checkListBox1.ValueMember = "permissionID";
checkListBox1.DisplayMember = "permissionDescription";
}