Exemple #1
0
        public static Dictionary <string, List <FpStudentObject> > QueryGroupbySchool(IDataAccess dataAccess, string busType, string startDate, string endDate)
        {
            SimpleOrmOperator.InitDataAccess(dataAccess);
            string sqlCondition = "";

            sqlCondition = "where create_time between to_date('{0}','YYYY-MM-DD') and to_date('{1}','YYYY-MM-DD') order by create_time desc";

            ArrayList students = SimpleOrmOperator.QueryConditionList <FpStudentObject>(string.Format(sqlCondition, startDate, endDate));
            Dictionary <string, List <FpStudentObject> > dictStudents = new Dictionary <string, List <FpStudentObject> >();

            foreach (FpStudentObject student in students)
            {
                if (string.IsNullOrEmpty(student.SCHOOL_CODE))
                {
                    continue;
                }
                if (!dictStudents.ContainsKey(student.SCHOOL_CODE))
                {
                    dictStudents.Add(student.SCHOOL_CODE, new List <FpStudentObject>());
                }
                dictStudents[student.SCHOOL_CODE].Add(student);
            }
            SimpleOrmOperator.InitDataAccess(null);
            return(dictStudents);
        }
Exemple #2
0
        public static FpStudentObject loadbyIdCard(IDataAccess dataAccess, String idCard)
        {
            SimpleOrmOperator.InitDataAccess(dataAccess);
            FpStudentObject student = SimpleOrmOperator.Query <FpStudentObject>(idCard);

            SimpleOrmOperator.InitDataAccess(null);
            return(student);
        }
Exemple #3
0
        public static Dictionary <string, DepartMent> queryDict(IDataAccess dataAccess)
        {
            SimpleOrmOperator.InitDataAccess(dataAccess);
            ArrayList deps = SimpleOrmOperator.QueryListAll(typeof(DepartMent));
            Dictionary <string, DepartMent> dictDeps = new Dictionary <string, DepartMent>();

            foreach (DepartMent dep in deps)
            {
                if (string.IsNullOrEmpty(dep.DepCode))
                {
                    continue;
                }
                if (!dictDeps.ContainsKey(dep.DepCode))
                {
                    dictDeps.Add(dep.DepCode, dep);
                }
            }
            SimpleOrmOperator.InitDataAccess(null);
            return(dictDeps);
        }
Exemple #4
0
 private void 查看日志ToolStripMenuItem_Click_1(object sender, EventArgs e)
 {
     SimpleOrmOperator.InitDataAccess(null);
     NoUserHelper.ShowLogs();
 }
Exemple #5
0
 private void EntityForm_Load(object sender, EventArgs e)
 {
     SimpleOrmOperator.InitDataAccess(DAL.DataAccessFactory.GetDataAccess());
 }