public void ReadInfo_Click(object sender, EventArgs e)
        {
            Form A = null;

            if (sender.Equals(ReadInfo) || sender.Equals(预览XToolStripMenuItem))
            {
                A = new ReadInfoForm();
            }
            else if (sender.Equals(ManageInfo) || sender.Equals(管理BToolStripMenuItem))
            {
                A = new ManageInfoForm();
            }
            else if (sender.Equals(SearchInfo) || sender.Equals(搜索CToolStripMenuItem))
            {
                A = new SearchInfoForm();
            }
            else if (sender.Equals(Explanation) || sender.Equals(说明DToolStripMenuItem))
            {
                A = new ExplanationForm();
            }
            else if (sender.Equals(Anthor) || sender.Equals(作者EToolStripMenuItem))
            {
                A = new Anthor();
            }
            this.ForMF.Dispose();
            this.Hide();
            A.Show();
        }
        private void 作者EToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form A = null;

            if (sender.Equals(预览XToolStripMenuItem))
            {
                A = new MainForm();
            }
            else if (sender.Equals(管理BToolStripMenuItem))
            {
                A = new ReadInfoForm();
            }
            else if (sender.Equals(搜索CToolStripMenuItem))
            {
                A = new ManageInfoForm();
            }
            else if (sender.Equals(说明DToolStripMenuItem))
            {
                A = new ExplanationForm();
            }
            else if (sender.Equals(作者EToolStripMenuItem))
            {
                A = new Anthor();
            }
            this.ForMF.Dispose();
            this.Hide();
            A.Show();
        }
Exemplo n.º 3
0
        static public bool SingleSearch(string No, ManageInfoForm MThis)
        {
            Start();
            if (No == "")
            {
                MessageBox.Show("学号不能为空!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
            DataRow Ac = Set.Tables[0].Rows.Find(No);

            if (Ac == null)
            {
                MessageBox.Show("该学号不存在!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            MThis.textBox2.Text  = Ac[1].ToString();
            MThis.comboBox1.Text = Ac[2].ToString();
            MThis.comboBox2.Text = Ac[3].ToString();
            MThis.textBox5.Text  = Ac[4].ToString();
            if (Ac[5] != System.DBNull.Value)
            {
                MThis.pictureBox1.Image = GetImage((byte[])Ac[5]);
            }
            return(true);

            End();
        }