Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            MemberDAC Memdac = new MemberDAC();
            Login     frm2   = new Login();

            if (frm2.ShowDialog() == DialogResult.OK)
            {
                if (GlobalClass.userid == "")
                {
                    btnLogin.Visible   = true;
                    btnLogout.Visible  = false;
                    lblWelcome.Visible = false;
                }
                else
                {
                    lblmember.Text     = GlobalClass.userid;
                    btnLogout.Visible  = true;
                    btnLogin.Visible   = false;
                    lblWelcome.Visible = true;
                    if (Memdac.IsManager(GlobalClass.userid) == true)
                    {
                        btnInsertMuseum.Visible = true;
                    }
                    if (Memdac.IsMember(GlobalClass.userid) == true)
                    {
                        btnInsertBoard.Visible = true;
                    }
                }
            }
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            isMuseum = false;
            trvMenu.Nodes.Clear();
            listView1.Items.Clear();
            dtAll2 = ts.BoardSelectAll();
            BoardPictureView(dtAll2, listView1);
            btnInsertMuseum.Visible = false;

            if (Memdac.IsMember(lblmember.Text) == true)
            {
                btnInsertBoard.Visible = true;
            }
            else
            {
                btnInsertBoard.Visible = false;
            }
            DataTable dt = ld.InfoLoadData();

            BoardTreeView(dt);
        }