// add student
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FRM_ADD_STUDENT FRM = new FRM_ADD_STUDENT();

            FRM.ShowDialog();
            fillDGVStudent();
        }
示例#2
0
        // add new student button ..
        private void btnAddNewSt_Click(object sender, EventArgs e)
        {
            FRM_ADD_STUDENT FRM = new FRM_ADD_STUDENT();

            FRM.MdiParent = this;
            FRM.Show();
        }
        // Edit Operation
        private void btnEdit_Click(object sender, EventArgs e)
        {
            FRM_ADD_STUDENT FRM = new FRM_ADD_STUDENT();

            // Edit some thing ..
            FRM.Choise     = "Edit";
            FRM.Student_ID = dgvStudent.CurrentRow.Cells[0].Value.ToString();

            FRM.btnAdd.Text       = "تعديل";
            FRM.lblLogoText.Text  = "تعديل احد الطلاب";
            FRM.Text              = "تعديل الطالب : " + dgvStudent.CurrentRow.Cells[1].Value.ToString();
            FRM.txtName.Text      = dgvStudent.CurrentRow.Cells[1].Value.ToString();
            FRM.txtAddress.Text   = dgvStudent.CurrentRow.Cells[2].Value.ToString();
            FRM.dtBirthDate.Value = Convert.ToDateTime(dgvStudent.CurrentRow.Cells[3].Value.ToString());

            FRM.ShowDialog();
            fillDGVStudent();
        }