Exemple #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;
                    }
                }
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            isMuseum = true;
            trvMenu.Nodes.Clear();
            listView1.Items.Clear();
            MuseumPictureView(dtAll, listView1);

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

            MuseumTreeView(dt);
        }
Exemple #3
0
        private void MuseumShow_Load(object sender, EventArgs e)
        {
            lblTitle.Text = GlobalClass.museumtitle;
            //m.museumTitle, m.spectation, m.museumContents, p.photofile1, p.photofile2, p.photofile3
            DataTable dt = dac.SelectMuseum(lblTitle.Text);

            if (dt.Rows.Count < 1)
            {
                MessageBox.Show("자료가 없습니다.");
                this.Close();
            }
            else
            {
                txtSpectation.Text        = dt.Rows[0]["spectation"].ToString();
                txtContents.Text          = dt.Rows[0]["museumContents"].ToString();
                pictureBox1.ImageLocation = dt.Rows[0]["photoFile1"].ToString();
            }
            if (memDAC.IsManager(GlobalClass.userid) == true)
            {
                btnDelete.Visible = true;
            }
        }