public void add(string schoolNo, string dName)
        {
            SqlConnection cn = null;
            SqlTransaction tc = null;
            try
            {
                cn = DbHelperSQL.getConnection();
                tc = DbHelperSQL.startTransaction(cn);

                IList<QueryModel> qmList = new List<QueryModel>();
                qmList.Add(MakeUtil.getQueryModel("SchoolNo", "'", SqlWhere.WhereOperator.Equal, schoolNo));
                qmList.Add(MakeUtil.getQueryModel("D_Name", "'", SqlWhere.WhereOperator.Equal, dName));
                qmList.Add(MakeUtil.getQueryModel("1", "", SqlWhere.WhereOperator.Equal, "1 AND DateDiff(dd, HappenDate,getdate())=0"));
                if (!teacherdaychecksubmitrecordDal.getModelList(cn, tc, qmList, -1).Any())
                {
                    var teacherdaychecksubmitrecord = new TeacherDayCheckSubmitRecordModel
                    {
                        D_Name = dName,
                        SchoolNo = schoolNo,
                        IsSubmit = true
                    };

                    //执行新增写进数据库
                    teacherdaychecksubmitrecordDal.add(cn, tc, teacherdaychecksubmitrecord);
                }

                DbHelperSQL.commitTransaction(tc);
            }
            catch (Exception dalEx)
            {
                DbHelperSQL.rollBackTransaction(tc);
                throw new MakeException(ExpSort.数据库, dalEx.Message);
            }
            finally
            {
                DbHelperSQL.closeConnection(cn);
            }
        }
        public void add(TeacherDayCheckSubmitRecordModel teacherdaychecksubmitrecord)
        {
            SqlConnection cn = null;
            SqlTransaction tc = null;
            try
            {
                cn = DbHelperSQL.getConnection();
                tc = DbHelperSQL.startTransaction(cn);

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

                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, TeacherDayCheckSubmitRecordModel model)
 {
     return DbHelperSQL.updateModel<TeacherDayCheckSubmitRecordModel>(model, "TeacherDayCheckSubmitRecord", "Evenid", model.Evenid.ToString(), "'", cn, tc);
 }
 public bool add(SqlConnection cn, SqlTransaction tc, TeacherDayCheckSubmitRecordModel model)
 {
     return DbHelperSQL.insertModel<TeacherDayCheckSubmitRecordModel>(model, "TeacherDayCheckSubmitRecord", cn, tc);
 }