Пример #1
0
 /// <summary>
 /// 当试验次数重复时候,是更新逻辑这里为true,那么注意一下表名,用临时表名
 /// </summary>
 /// <returns></returns>
 private bool checkTestTimes()
 {
     // 判断本次试验,有没有解析器执行过
     if (DataLogDAL.getList(this.taskInfo.id).Count(it => Convert.ToInt32(it.Version) == this.times) > 0)
     {
         return(true);
     }
     return(false);
 }
Пример #2
0
        /// <summary>
        /// 当试验次数重复时候,是更新逻辑这里为true,那么注意一下表名,用临时表名
        /// </summary>
        /// <returns></returns>
        private bool checkTestTimes()
        {
            int count = TableDAL.removeDataRow(this.dataScriptRule.DesTable, this.taskInfo.id, this.times);

            return(false);

            // 判断本次试验,有没有解析器执行过
            if (DataLogDAL.getList(this.taskInfo.id).Count(it => Convert.ToInt32(it.Version) == this.times) > 0)
            {
                return(false);
            }
            return(false);
        }
Пример #3
0
        /// <summary>
        /// 当试验次数重复时候,是更新逻辑这里为true,那么注意一下表名,用临时表名
        /// </summary>
        /// <returns></returns>
        private bool checkTestTimes()
        {
            int count = TableDAL.removeDataRow(this.dataScriptRule.DesTable, this.taskInfo.id, this.times);

            SendMessageEvent(string.Format("{0},{1},{2},{3}", count, this.dataScriptRule.DesTable, this.taskInfo.id, this.times));
            return(false);

            // 判断本次试验,有没有解析器执行过
            if (DataLogDAL.getList(this.taskInfo.id).Count(it => Convert.ToInt32(it.Version) == this.times) > 0)
            {
                return(false);
            }
            return(false);
        }
Пример #4
0
        /// <summary>
        /// 当试验次数重复时候,是更新逻辑这里为true,那么注意一下表名,用临时表名
        /// </summary>
        /// <returns></returns>
        private bool checkTestTimes()
        {
            // 判断本次试验,有没有解析器执行过
            if (DataLogDAL.getList(this.taskInfo.id).Count(it => Convert.ToInt32(it.Version) == this.times) > 0)
            {
                Structure st = structList.FirstOrDefault(it => it.Comments == System.Configuration.ConfigurationManager.AppSettings["pk"]);
                if (st != null)
                {
                    this.dataScriptRule.DesBusinessPk = st.ColumnName;


                    tableName += "_" + DateTime.Now.Millisecond.ToString();
                    if (tableName.Length > 30)
                    {
                        tableName = tableName.Remove(0, tableName.Length - 29);
                    }

                    TableDAL.createtempTable(this.dataScriptRule.DesTable, tableName);
                    TableDAL.AddIndex(tableName, string.Format("{0},TASKTIMES,PROJECTID", st.ColumnName));
                }
                return(true);
            }
            return(false);
        }