Beispiel #1
0
        /// <summary>
        ///  将参数写入到数据库onlinenumber表中  :  1:解析中  ;0:解析完成  当前用户同时解析最多三个批次(即三个1)。
        /// </summary>
        /// <returns></returns>
        public void insertOnLineNumberDataToDB()
        {
            Maticsoft.BLL.onlinenumber   onlinenumber_add   = new Maticsoft.BLL.onlinenumber();
            Maticsoft.Model.onlinenumber onlinenumber_model = new Maticsoft.Model.onlinenumber();

            Maticsoft.BLL.evidence   evidence_update = new Maticsoft.BLL.evidence();
            Maticsoft.Model.evidence evidence_model  = new Maticsoft.Model.evidence();
            DataSet ds = evidence_update.GetList("1=1 ORDER BY id desc LIMIT 1");

            evidence_model.id = Convert.ToInt32(ds.Tables[0].Rows[0]["id"].ToString());

            onlinenumber_model.evid         = evidence_model.id;
            onlinenumber_model.username     = evAdmin_d3;
            onlinenumber_model.onlinestatus = "1";
            onlinenumber_add.Add(onlinenumber_model);
        }
Beispiel #2
0
        /// <summary>
        ///  判断当前用户解析批次数
        /// </summary>
        /// <returns>当前用户解析的批次数</returns>
        public int judgeAnalysisFiles()
        {
            Maticsoft.BLL.onlinenumber onlinenumber_judge = new Maticsoft.BLL.onlinenumber();
            DataSet ds    = onlinenumber_judge.GetList("username='******'");
            int     count = 0;

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(count);
            }
            else
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    if (ds.Tables[0].Rows[i]["onlinestatus"].Equals("1"))
                    {
                        count++;
                    }
                }
            }
            return(count);
        }