示例#1
0
文件: AddInfo.cs 项目: Arkven/C-Sharp
        private void btnEdit_Click(object sender, EventArgs e)
        {
            connection connection = new connection();

            switch (tabControl1.SelectedTab.Text)
            {
                case "Успеваемость":
                    AddUsp AddUsp = new AddUsp(Convert.ToInt32(dataGridView2.Rows[dataGridView2.CurrentRow.Index].Cells[0].Value), ID_s);
                    AddUsp.Show();
                    break;
                case "Посещаемость":
                    AddPos AddPos = new AddPos(Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value), ID_s);
                    AddPos.Show();

                    break;
            }
            connection.Close();
        }
示例#2
0
文件: AddInfo.cs 项目: Arkven/C-Sharp
        private void button1_Click(object sender, EventArgs e)
        {
            connection connection = new connection();

            switch (tabControl1.SelectedTab.Text)
            {
                case "Успеваемость":

                    AddUsp AddUsp = new AddUsp(ID_s);
                    AddUsp.Show();

                    break;
                case "Посещаемость":
                    AddPos AddPos = new AddPos(ID_s);
                    AddPos.Show();
                    break;
            }
            connection.Close();
        }