Пример #1
0
        /**
         *  Author      | Arcelia Aguirre
         *  Description | Crear la Base de Datos
         *  Date        | 01-03-2018
         *  Parameters  | object sender, EventArgs e
         */
        private void btn_create_Click(object sender, EventArgs e)
        {
            DataBaseSettings dataBaseSettings = new DataBaseSettings();

            dataBaseSettings.createDataBase();
            btn_create.Enabled = dataBaseSettings.ifExist().Rows.Count == 0 ? true : false;
            btn_drop.Enabled   = !btn_create.Enabled;
        }
Пример #2
0
        /**
         *  Author      | Arcelia Aguirre
         *  Description | ¡¡¡¡¡Borrar la base de datos!!!!!
         *  Date        | 23-02-2018
         *  Parameters  | object sender, EventArgs e
         */
        private void btn_drop_Click(object sender, EventArgs e)
        {
            DataBaseSettings dataBaseSettings = new DataBaseSettings();

            dataBaseSettings.deleteDataBase();
            try
            {
                btn_create.Enabled = dataBaseSettings.ifExist().Rows.Count == 0 ? true : false;
                btn_drop.Enabled   = !btn_create.Enabled;
            }
            catch
            {
                btn_drop.Enabled = btn_create.Enabled;
                //PROPS.messageError("");
            }
        }
Пример #3
0
        /**
         *  Author      | Arcelia Aguirre
         *  Description | Inicializar el form
         *  Date        | 23-02-2018
         *  Parameters  | object sender, EventArgs e
         */
        private void frm_signIn_Load(object sender, EventArgs e)
        {
            TypeUser       typeUser       = new TypeUser();
            TypeNotStudent typeNotStudent = new TypeNotStudent();
            Career         career         = new Career();
            UserCICE       userCICE       = new UserCICE();

            Student.Student student = new Student.Student();
            try
            {
                /*Combobox*/
                typeUser.load_cmbbxTypeUser(ds, cmbbx_typeUser);
                typeNotStudent.load_cmbbxReport(ds, cmbbx_report);
                typeNotStudent.load_cmbbxReport(ds, cmbbx_type);
                typeNotStudent.load_cmbbxReport(ds, cmbbx_typeRegister);
                career.load_cmbbxCarrer(ds, cmbbx_carrer);
                career.load_cmbbxCarrer(ds, cmbbox_careerStudent);
                DataTable dt = cmbbx_typeRegister.DataSource as DataTable;

                DataRow row = dt.NewRow();
                row["description_typeNotStudent"] = "Alumno";
                dt.Rows.Add(row);

                cmbbx_typeRegister.SelectedIndex = cmbbx_typeRegister.Items.Count - 1;
                /*Grid*/
                career.load_dtgdCareer(ds, dtgd_career);
                typeNotStudent.load_dtgdTypeNotStudent(ds, dtgd_typeNotStudent);
                typeUser.load_dtgdTypeUser(ds, dtgd_typeUser);
                userCICE.load_dtgdUser(ds, dtgd_user);
                student.load_dtgdStudent(ds, dtgd_student);

                /*DataBase*/
                DataBaseSettings dataBaseSettings = new DataBaseSettings();
                btn_create.Enabled = dataBaseSettings.ifExist().Rows.Count == 0 ? true : false;
                btn_drop.Enabled   = !btn_create.Enabled;
            }
            catch
            {
                Button[] component = { btn_create, btn_drop, btn_seeder, btn_delete, btn_deleteDuplicate };
                PROPS.enableButton(component);
                //PROPS.messageError("");
            }
        }