Пример #1
0
        private void picBxAddNew_Click(object sender, EventArgs e)
        {
            Add_Evaluation newEvaluation = new Add_Evaluation();

            this.Hide();
            newEvaluation.Show();
        }
Пример #2
0
        private void evaluationsGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            selectedRow = evaluationsGridView.CurrentCell.RowIndex;
            DataGridViewRow row = evaluationsGridView.Rows[selectedRow];

            if (e.ColumnIndex == 4)
            {
                GeneralID.selectedObjectid = (int)row.Cells[0].Value;
                Add_Evaluation add = new Add_Evaluation();
                this.Hide();
                add.Show();
            }
            else if (e.ColumnIndex == 5)
            {
                DialogResult dr = MessageBox.Show("Are you sure want delete this Evaluation", "Delete Evaluation", MessageBoxButtons.OKCancel,
                                                  MessageBoxIcon.Question);

                if (dr == DialogResult.OK)
                {
                    int    selectId = (int)row.Cells[0].Value;
                    string deleteGroupEvaluationQuery = string.Format("delete GroupEvaluation where EvaluationId='{0}'", selectId);
                    DataBaseConnection.getInstance().executeQuery(deleteGroupEvaluationQuery);

                    string deleteStudentQuery = string.Format("delete Evaluation where Id='{0}'", selectId);
                    DataBaseConnection.getInstance().executeQuery(deleteStudentQuery);

                    MessageBox.Show("Evaluation deleted Successfully");
                    this.load_data_in_gridview();
                }
            }
        }
Пример #3
0
        private void addEvaluationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Add_Evaluation addEvaluation = new Add_Evaluation();

            this.Hide();
            addEvaluation.Show();
        }