Ejemplo n.º 1
0
        public void TestSetup()
        {
            var testDirectory = GetTestTempDirectory();

            if (Directory.Exists(testDirectory))
            {
                Directory.Delete(testDirectory, true);
            }

            _nodeServer  = new NodeServer();
            _distributor = new Distributor.Distributor(new ConsoleWriter(true));
            var ep = _nodeServer.Bind(IPAddress.Loopback);

            _nodeClient = _distributor.ConnectTo(ep);
        }
Ejemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                //---------------------------- صلاحية المندوبين-------------------------------------------------
                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=3", con);
                con.Open();
                ddr = ccmd.ExecuteReader();
                if (ddr.Read())
                {
                    if (ddr["Priv_Display"].ToString() == "True")
                    {
                        Distributor.Distributor ss = new Distributor.Distributor();
                        ss.Show();
                    }
                    else
                    {
                        MessageBox.Show("عذرا ، أنت لا تملك صلاحية للدخول الى هذه الشاشة", " 3 تعريف مندوب", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("عذرا ، أنت لا تملك صلاحية للدخول الى هذه الشاشة", " 3 تعريف مندوب", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                ddr.Close();
                con.Close();

                //---------------------------------------------------------------------------------------
            }
            catch (Exception ee)
            {
                con.Close();
                MessageBox.Show("يرجى تصوير الخطأ ومراجعة مدير النظام ، شكرا" + ee.Message, "ERROR 1005 Definitions", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }