Exemple #1
0
        public int SelectCount()
        {
            string condition = "";

            return(ServerHelp.findListWhereCount(condition, _webip, typeof(wrench).Name));


            //  return Convert.ToInt16(ServerHelp.findDataByContion<int>(condition, "", _webip, typeof(wrench).Name).FirstOrDefault());
        }
 public int SelectCount(Dictionary <string, string> dict)
 {
     try
     {
         string temp = "";
         foreach (var d in dict)
         {
             if (d.Key == "starttime")
             {
                 temp += string.Format("checkDate>='{0}' and ", d.Value);
                 continue;
             }
             if (d.Key == "endtime")
             {
                 temp += string.Format("checkDate<'{0}' and ", d.Value);
                 continue;
             }
             temp += string.Format("{0}='{1}' and ", d.Key, d.Value);
         }
         string contion = temp.Count() > 4 ? temp.Remove(temp.Count() - 4) : "";
         return(ServerHelp.findListWhereCount(contion, _webip, typeof(torquechecktarget).Name));
     }
     catch { return(0); }
 }