TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
oz Fa
NA
2
4.1k
open a new form with different user
Mar 27 2016 2:02 PM
I want to access a same form but with two types of users : user and admin
here is my code :
public void Menu_Load(object sender, EventArgs e)
{
cnx.Open();
SqlCommand cmd1 = new SqlCommand("select * from utilisateur where privilege='User' ", cnx);
int a1 = cmd1.ExecuteNonQuery();
cnx.Close();
if (a1!=0)
{
gestionToolStripMenuItem1.Visible = false;
toolStripLabel1.Text = "user";
}
cnx.Open();
SqlCommand cmd = new SqlCommand("select * from utilisateur where privilege='Admin' ", cnx);
int a = cmd.ExecuteNonQuery();
cnx.Close();
if (a != 0)
{
gestionToolStripMenuItem1.Visible = true;
toolStripLabel1.Text = "admin";
}
}
Reply
Answers (
1
)
Crystal Reports in C#
sum timespan in gridview asp.net