private void button3_Click(object sender, EventArgs e) { //---------------------------- --------------------------------------------------------- SqlDataReader ddr; SqlCommand ccmd = new SqlCommand("select Priv_Display from TB_Priv where Priv_User_ID=" + Convert.ToInt32(Program.user_ID) + " and Priv_Screen_ID=18", con); con.Open(); ddr = ccmd.ExecuteReader(); if (ddr.Read()) { if (ddr["Priv_Display"].ToString() == "True") { quary_salary ssa = new quary_salary(); addControlsTopanel(ssa); } else { MessageBox.Show("عذرا لا يوجد لديك صلاحية للدخول الى هذه الشاشة", "الصلاحيات 18", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } ddr.Close(); con.Close(); //--------------------------------------------------------------------------------------- }
private void btn_quary_salary_Click(object sender, EventArgs e) { quary_salary ssa = new quary_salary(); addControlsTopanel(ssa); }