Ejemplo n.º 1
0
        private void subjectGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            CRUDSubject modifySubject = new CRUDSubject();

            modifySubject.crudSID.Text          = this.subjectGrid.CurrentRow.Cells[0].Value?.ToString() ?? null;
            modifySubject.crudSSubjectCode.Text = this.subjectGrid.CurrentRow.Cells[1].Value?.ToString() ?? null;
            modifySubject.crudSWeeksCount.Text  = this.subjectGrid.CurrentRow.Cells[2].Value?.ToString() ?? null;
            modifySubject.crudSSemester.Text    = this.subjectGrid.CurrentRow.Cells[3].Value?.ToString() ?? null;
            modifySubject.crudSSemesterID.Text  = this.subjectGrid.CurrentRow.Cells[4].Value?.ToString() ?? null;

            modifySubject.crudSStudyDegree.Text   = this.subjectGrid.CurrentRow.Cells[5].Value?.ToString() ?? null;
            modifySubject.crudSStudyDegreeID.Text = this.subjectGrid.CurrentRow.Cells[6].Value?.ToString() ?? null;

            modifySubject.crudSHoursLecture.Text = this.subjectGrid.CurrentRow.Cells[7].Value?.ToString() ?? null;
            //modifySubject.crudSHLA.Text = this.subjectGrid.CurrentRow.Cells[8].Value?.ToString() ?? null;

            modifySubject.crudSHoursSeminar.Text = this.subjectGrid.CurrentRow.Cells[8].Value?.ToString() ?? null;
            //modifySubject.crudSHSA.Text = this.subjectGrid.CurrentRow.Cells[10].Value?.ToString() ?? null;

            modifySubject.crudSHoursExcercise.Text = this.subjectGrid.CurrentRow.Cells[9].Value?.ToString() ?? null;
            //modifySubject.crudSHEA.Text = this.subjectGrid.CurrentRow.Cells[12].Value?.ToString() ?? null;

            modifySubject.crudSFinalType.Text   = this.subjectGrid.CurrentRow.Cells[10].Value?.ToString() ?? null;
            modifySubject.crudSFinalTypeID.Text = this.subjectGrid.CurrentRow.Cells[11].Value?.ToString() ?? null;

            modifySubject.crudSLanguage.Text   = this.subjectGrid.CurrentRow.Cells[12].Value?.ToString() ?? null;
            modifySubject.crudSLanguageID.Text = this.subjectGrid.CurrentRow.Cells[13].Value?.ToString() ?? null;

            modifySubject.FormClosed += UpdateSubjectGrid_FormClosed;
            modifySubject.ShowDialog();
        }
Ejemplo n.º 2
0
        private void addSubjectBtn_Click(object sender, EventArgs e)
        {
            CRUDSubject modifySubject = new CRUDSubject();

            modifySubject.crudSID.Text             = null;
            modifySubject.crudSSubjectCode.Text    = null;
            modifySubject.crudSWeeksCount.Text     = null;
            modifySubject.crudSSemester.Text       = null;
            modifySubject.crudSStudyDegree.Text    = null;
            modifySubject.crudSHoursLecture.Text   = null;
            modifySubject.crudSHoursSeminar.Text   = null;
            modifySubject.crudSHoursExcercise.Text = null;
            modifySubject.crudSFinalType.Text      = null;
            modifySubject.crudSLanguage.Text       = null;
            modifySubject.crudSDelete.Visible      = false;
            modifySubject.FormClosed += UpdateSubjectGrid_FormClosed;
            modifySubject.ShowDialog();
        }