Example #1
0
        private void cmdadd_Click(object sender, EventArgs e)
        {
            addclass ac = new addclass();

//            ac.cur_date = this.cur_date;
            ac.ShowDialog();

            if (btnfilter.Enabled == true)
            {
                btnfilter.PerformClick();
            }
            else
            {
                classes   cl = new classes();
                DataTable dt = new DataTable();
                dt = cl.Select();
                dataGridView1.DataSource = dt;
            }
        }
Example #2
0
        private void پورتالاطلاعاتکلاسهاToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool IsOpen = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.GetType() == typeof(addclass))
                {
                    IsOpen = true;
                    f.Focus();
                    break;
                }
            }

            if (IsOpen == false)
            {
                addclass fmi = new addclass();
                fmi.MdiParent = this;
                fmi.Show();
            }
        }