示例#1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow != null)
            {
                int    col = 0;
                int    row = dataGridView1.CurrentRow.Index;
                string val = dataGridView1[col, row].Value.ToString();

                classes   cl    = new classes();
                DataTable datat = new DataTable();
                cl.classno = long.Parse(val);
                datat      = cl.Selectforedit();

                CloseClass ec = new CloseClass();
                ec.txtclassno.Text = val;
                ec.cur_date        = this.cur_date;
                ec.Search_Click();
                ec.ShowDialog();

                if (btnfilter.Enabled == true)
                {
                    btnfilter.PerformClick();
                }
                else
                {
                    DataTable dt = new DataTable();
                    dt = cl.Select();
                    dataGridView1.DataSource = dt;
                }
            }
        }
示例#2
0
        private void btnCloseClass_Click(object sender, EventArgs e)
        {
            CloseClass ec = new CloseClass();

            ec.txtclassno.Text = txtclassno.Text;
            ec.cur_date        = this.cur_date;
            ec.Search_Click();
            ec.ShowDialog();

            fillClassInfo();
        }