예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            StaticSQLiteHelper.ClearAndVacuumTable("schedule");
            int rows = StaticSQLiteHelper.BatchExecuteNonQuery(schedule.ToSQLStringList("schedule"));

            MessageBox.Show(string.Format("影响的行数为:{0}", rows), "执行完成");
        }
예제 #2
0
        private void Import()
        {
            string sql;

            sql = Dictionary2Sql(GetTeacherInforFromTable(_dtClassTeacher));
            StaticSQLiteHelper.ClearAndVacuumTable("teacher");
            StaticSQLiteHelper.ExecuteNonQuery(sql);
            sql = GetTeacherSQLFromTable(_dtClassTeacher);
            StaticSQLiteHelper.ClearAndVacuumTable("class_course");
            StaticSQLiteHelper.ExecuteNonQuery(sql);
            sql = GetCourseAssignSQLFromTable(_dtCourse);
            StaticSQLiteHelper.ExecuteNonQuery(sql);
            sql = GetMasterSQLFromTable(_dtClassTeacher);
            StaticSQLiteHelper.ExecuteNonQuery(sql);
            setupWeight();
            adjust();
            //Global.Dirty = true;
        }