示例#1
0
        private void cmdedit_Click(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();

                editclass ec = new editclass();
                ec.txtclassno.Text = val;
                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 brnClassEdit_Click(object sender, EventArgs e)
        {
            editclass ec = new editclass();

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

            fillClassInfo();
        }