示例#1
0
        /**
         *  Author      | Arcelia Aguirre
         *  Description | Datos para eliminar y modificar typos de no estudiantes
         *  Date        | 27-02-2018
         *  Parameters  | object sender, DataGridViewCellEventArgs e
         */
        private void dtgd_typeNotStudent_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            TextBox[]      component      = { txt_idTypeNotStudent, txt_typeNotStudentName };
            TypeNotStudent typeNotStudent = new TypeNotStudent();

            PROPS.clear(component, (int)PROPS.COMPONENT.COMPONENT_TEXT_BOX);

            if (this.dtgd_typeNotStudent.Columns[e.ColumnIndex].Name.Equals("delete_userNotStudent"))
            {
                if (MessageBox.Show("¿Seguro que quieres borrar el Tipo de No Estudiate?", "Borrar", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    typeNotStudent.delete(Int32.Parse(dtgd_typeNotStudent.CurrentRow.Cells["id_typeNotStudent"].Value.ToString()));
                }
                typeNotStudent.load_dtgdTypeNotStudent(ds, dtgd_typeNotStudent);
                return;
            }
            else if (this.dtgd_typeNotStudent.Columns[e.ColumnIndex].Name.Equals("edit_typeNotStudent"))
            {
                txt_idTypeNotStudent.Text   = dtgd_typeNotStudent.CurrentRow.Cells["id_typeNotStudent"].Value.ToString();
                txt_typeNotStudentName.Text = dtgd_typeNotStudent.CurrentRow.Cells["description_typeNotStudent"].Value.ToString();
            }
        }