public void add(AttendanceRecordModel attendancerecord)
        {
            SqlConnection cn = null;
            SqlTransaction tc = null;
            try
            {
                cn = DbHelperSQL.getConnection();
                tc = DbHelperSQL.startTransaction(cn);

                //执行新增写进数据库
            attendancerecordDal.add(cn, tc, attendancerecord);

                DbHelperSQL.commitTransaction(tc);
            }
            catch (Exception dalEx)
            {
                DbHelperSQL.rollBackTransaction(tc);
                throw new MakeException(ExpSort.数据库, dalEx.Message);
            }
            finally
            {
                DbHelperSQL.closeConnection(cn);
            }
        }
 public bool update(SqlConnection cn, SqlTransaction tc, AttendanceRecordModel model)
 {
     return DbHelperSQL.updateModel<AttendanceRecordModel>(model, "AttendanceRecord", "f_RecID + '|' + SchoolNo", model.f_RecID + "|" + model.SchoolNo, "'", cn, tc);
 }
 public bool add(SqlConnection cn, SqlTransaction tc, AttendanceRecordModel model)
 {
     return DbHelperSQL.insertModel<AttendanceRecordModel>(model, "AttendanceRecord", cn, tc);
 }