Ejemplo n.º 1
0
 private void Home_Load(object sender, EventArgs e)
 {
     timer1.Start();
     label4.Text = DateTime.Now.ToLongTimeString();
     label5.Text = DateTime.Now.ToLongDateString();
     label3.Text = name;
     Home_search hf = new Home_search();
 }
Ejemplo n.º 2
0
        private void metroTile14_Click(object sender, EventArgs e)
        {
            Home_search d = new Home_search();

            d.ShowDialog();
            Login g = new Login();

            if (g.sg == "secretary")
            {
                d.metroTile1.Enabled = false;
            }
        }
Ejemplo n.º 3
0
        private void simpleButton3_Click_2(object sender, EventArgs e)
        {
            DataTable   dt = log.LOGIN(txtname.Text, txttype.Text);
            Home_search hg = new Home_search();

            if (dt.Rows.Count > 0)
            {
                name = txtname.Text;
                type = txttype.Text;
                Home        h  = new Home(name, type);
                Home_search n  = new Home_search();
                string      ds = log.get_priv(txtname.Text, txttype.Text);

                if (ds == "admin")
                {
                    this.Hide();
                    h.ShowDialog();
                }
                else if (ds == "secretary")
                {
                    this.Hide();
                    h.metru();

                    n.metroTile1.Enabled = false;
                    h.ShowDialog();
                    sg = "secretary";

                    //h.metroTile16.
                }
                else
                {
                    this.Hide();
                    h.metrperm();
                    h.ShowDialog();
                }
            }
            else
            {
                MetroFramework.MetroMessageBox.Show(this, "\n \nLogin failed !", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }