private void btnEdit_Click(object sender, EventArgs e)
        {
            this.Close();
            FmEditStudent editStudent = new FmEditStudent(student);

            editStudent.Show();
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            STUDENT student   = new STUDENT();
            string  studentId = dgAllStudent.CurrentRow.Cells["ColStudentId"].Value.ToString();

            student = db.STUDENTs.Where(d => d.STUDENTID.Equals(studentId)).FirstOrDefault();
            if (student == null)
            {
                MessageBox.Show(MessageDefine.RecordRequestedNoExist);
                return;
            }

            FmEditStudent editStudent = new FmEditStudent(student);

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