Beispiel #1
0
        /**
         *  Author      | Arcelia Aguirre
         *  Description | Agregar un tipo de no estudiante
         *  Date        | 23-02-2018
         *  Parameters  | object sender, EventArgs e
         */
        private void btn_typeNotStudentSave_Click(object sender, EventArgs e)
        {
            TextBox[]      component      = { txt_typeNotStudentName };
            TypeNotStudent typeNotStudent = new TypeNotStudent();

            if (!PROPS.emptyComponent(component, (int)PROPS.COMPONENT.COMPONENT_TEXT_BOX))
            {
                return;
            }
            component = new TextBox[] { txt_idTypeNotStudent, txt_typeNotStudentName };
            if (txt_idTypeNotStudent.Text == PROPS.EMPTY)
            {
                typeNotStudent.save(txt_typeNotStudentName.Text);
            }
            else
            {
                typeNotStudent.update(Int32.Parse(txt_idTypeNotStudent.Text), txt_typeNotStudentName.Text);
            }
            PROPS.clear(component, (int)PROPS.COMPONENT.COMPONENT_TEXT_BOX);
            typeNotStudent.load_dtgdTypeNotStudent(ds, dtgd_typeNotStudent);
        }