Exemplo n.º 1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Model.MissionInfo model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into missioninfo(");
            strSql.Append("spiderName,failPages,endTime,startTime,completePages,threadCounts,failCount_getdata,failCount_savedata,failCount_linkre)");
            strSql.Append(" values (");
            string values = "'" + model.spidername + "'," + model.failpages + "," + model.endtime + "," + model.starttime + "," + model.completepages + "," + model.threadcounts + "," + model.failcount_getdata + "," + model.failcount_savedata + "," + model.failcount_linkre + ")";

            strSql.Append(values);

            int rows = mshelper.InsertSQl(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Model.MissionInfo model)
 {
     return(dal.Add(model));
 }