C# How can i differentiate datatable per users

  • Thread starter Thread starter ToastMalone
  • Start date Start date
T

ToastMalone

Guest
0
<button aria-label="down vote" aria-pressed="false" class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" data-selected-classes="fc-theme-primary" style="margin:2px;box-sizing:inherit;font:inherit;padding:0px;border-width:initial;border-style:none;border-color:initial;border-radius:3px;background-image:none;background-background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:initial;background-clip:initial;outline:none;box-shadow:none;" title="This question does not show any research effort; it is unclear or not useful"><svg aria-hidden="true" class="svg-icon m0 iconArrowDownLg" height="36" viewBox="0 0 36 36" width="36"><path d="M2 10h32L18 26 2 10z"></path></svg></button><button aria-label="favorite" aria-pressed="false" class="js-favorite-btn s-btn s-btn__unset c-pointer py8 js-gps-track" data-gps-track="post.click({ item: 1, priv: -1, post_type: 1 })" data-selected-classes="fc-yellow-600" style="margin:0px;box-sizing:inherit;font:inherit;padding:0px;border-width:initial;border-style:none;border-color:initial;border-radius:3px;background-image:none;background-background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:initial;background-clip:initial;outline:none;box-shadow:none;" title="Click to mark as favorite question (click again to undo)"><svg aria-hidden="true" class="svg-icon iconStar" height="18" viewBox="0 0 18 18" width="18"><path d="M9 12.65l-5.29 3.63 1.82-6.15L.44 6.22l6.42-.17L9 0l2.14 6.05 6.42.17-5.1 3.9 1.83 6.16L9 12.65z"></path></svg> </button>


Hi i am making a grading system using visual studio 2010 c# using local database and i am just going to ask on how can i do a log in form for every users that shows a data in a combo box or data grid view that is assign to them during run time. Where other users can't see all the data in database, they can only see the data that is assign to them during run time. i tried making it by assigning a user id per subject but it didn't work hope you can help me thank you :)

if(scmd.ExecuteScalar().ToString()=="1")
{
pictureBox1.Image = new Bitmap(@"C:\Users\Mic 18\Documents\Visual Studio 2015\Projects\mylogin\granted.png");
MessageBox.Show("YOU ARE GRANTED WITH ACCESS");
}
else
{
pictureBox1.Image = new Bitmap(@"C:\Users\Mic 18\Documents\Visual Studio 2015\Projects\mylogin\denied.jpg");
MessageBox.Show("YOU ARE NOT GRANTED WITH ACCESS");
lbl_Msg.Text = ("You Have Only " + Convert.ToString(attempt) + " Attempt Left To Try");
--attempt;
txt_UserName.Clear();
txt_PWD.Clear();
}


I am trying using this code but it only do a user level


Continue reading...
 
Back
Top