示例#1
0
        private void confirmToExtraDelete(string itemText, object userData)
        {
            DataGridViewColumn column      = (DataGridViewColumn)userData;
            HKConfirmForm      confirmForm = new HKConfirmForm();

            confirmForm.title = "是否删除考勤记录:" + column.HeaderText;
            if (confirmForm.showConfirm() == true)
            {
                deleteExtra(column.Name);
            }
        }
示例#2
0
        private void confirmToAttandaceDelete(string itemText, object userData)
        {
            HKConfirmForm confirmForm = new HKConfirmForm();

            confirmForm.title = "是否删除考勤记录:" + itemText;
            if (confirmForm.showConfirm() == true)
            {
                DataGridViewColumn column = (DataGridViewColumn)userData;
                deleteAttandance(column.Name);
            }
        }
示例#3
0
        private void confirmToStudentDelete(int rowIndex)
        {
            mainGrid.Rows[rowIndex].Selected = true;
            HKConfirmForm confirm = new HKConfirmForm();

            confirm.title = string.Format("是否删除 {0}", getRowValue(rowIndex, mainGridCellIndex.Name));
            if (confirm.showConfirm() == true)
            {
                deleteStudent(rowIndex);
            }
        }
示例#4
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            HKConfirmForm confirmForm = new HKConfirmForm();

            confirmForm.title = "确定删除《" + cellTitle + "》?";
            bool result = confirmForm.showConfirm();

            if (result == true)
            {
                deleteTheCourseFromLibrary(courseId);
            }
        }
示例#5
0
        private void tabBtnMenuMethod_ConfirmToDelete(string title, object userData)
        {
            HKConfirmForm confirmForm = new HKConfirmForm();

            confirmForm.title = "确定要删除《" + title + "》?";
            bool result = confirmForm.showConfirm();

            if (result == true)
            {
                tabBtnMenuMethod_DeleteStuList((string)userData);
            }
        }
示例#6
0
        private void createConfirmForm()
        {
            HKConfirmForm confirmForm = new HKConfirmForm();

            confirmForm.title = "当前没选中任何学生的成绩单元格,是否自动计算所有学生的成绩?";
            if (confirmForm.showConfirm() == true)
            {
                calAllStudentsScore();
            }
            else
            {
                Console.WriteLine("no! back!");
            }
        }
        private void deleteButton_Click(object sender, EventArgs e)
        {
            HKConfirmForm form = new HKConfirmForm();

            form.title = "确定要删除?";
            if (form.showConfirm() == true)
            {
                AttandanceLibrary lib = GlobalStation.shareInstance.librarys[libraryUUID];
                GlobalStation.shareInstance.librarys.removeLib(lib.UUID);
                GlobalStation.shareInstance.librarySave(delegate() {
                    backButton_Click(null, null);
                }, delegate() {
                    GlobalStation.shareInstance.librarys.addLib(lib);
                });
            }
        }
        private void overwriteOrCreateNew(AttandanceLibrary lib, Model.Course course)
        {
            HKConfirmForm form = new HKConfirmForm();

            form.title = "已存在该课程Id,是否覆盖?";
            if (form.showConfirm() == true)
            {
                lib.removeCourse(lib[course.id]);
                lib.addCourse(course);
            }
            else
            {
                course.id = Guid.NewGuid().ToString();
                lib.addCourse(course);
            }
        }
示例#9
0
        private void handleOverwrite(AttandanceLibrary lib, ref AttandanceLibrary oldLib)
        {
            DJTUBinary    librarys = GlobalStation.shareInstance.librarys;
            HKConfirmForm form     = new HKConfirmForm();

            form.title = "已存在相同的库,是否覆盖?";
            if (form.showConfirm() == true)
            {
                oldLib = librarys[lib.UUID];
                librarys.removeLib(lib.UUID);
            }
            else
            {
                lib.UUID = Guid.NewGuid().ToString();
            }
        }
示例#10
0
        private void showDeleteConfirmForm()
        {
            HKConfirmForm form = new HKConfirmForm();

            form.title = "确定要删除?";
            if (form.showConfirm() == true)
            {
                AttandanceLibrary lib = GlobalStation.shareInstance.librarys[libraryUUID];
                GlobalStation.shareInstance.librarys.removeLib(libraryUUID);
                GlobalStation.shareInstance.librarySave(null, delegate() {
                    GlobalStation.shareInstance.librarys.addLib(lib);
                });
                loginHall.initTableViewContent();
                loginHall.resize(null, null);
            }
        }
示例#11
0
        private void bar_deleteBtn_Click(object sender, EventArgs e)
        {
            AttandanceLibrary lib = GlobalStation.shareInstance.librarys[libraryUUID];

            Model.Course  course = courseRef;
            HKConfirmForm form   = new HKConfirmForm();

            form.title = string.Format("确定要删除课程《{0}》?", course.name);
            if (form.showConfirm() != true)
            {
                return;
            }
            if (lib.containsCourse(course.id))
            {
                lib.removeCourse(course);
            }
            GlobalStation.shareInstance.librarySave(delegate() {
                bar_backBtn_Click(null, null);
            }, delegate() {
                lib.addCourse(course);
            });
        }