Exemplo n.º 1
0
        private static void ToUrlList(int Type, int DownLoad, int Status, Img item)
        {
            UrlList urlList = new UrlList();

            urlList.Type     = Type;
            urlList.TaskID   = item.ID;
            urlList.URL      = item.URL;
            urlList.ImgName  = item.ImgName;
            urlList.DownLoad = DownLoad;
            urlList.Status   = Status;
            TaskList.AddUrlList(urlList);
        }
Exemplo n.º 2
0
        private static void PostUrlList5(int Type, int DownLoad, int Status)
        {
            List <Img> XieZhenList = TaskList.GetXieZhen();

            foreach (var item in XieZhenList)
            {
                //item.
                string[] name = item.ImgName.Split('|');

                foreach (var it in name)
                {
                    Img img = new Img()
                    {
                        ID = item.ID, ImgName = it
                    };
                    ToUrlList(Type, DownLoad, Status, img);
                }
            }
        }
Exemplo n.º 3
0
 public static List <Img> GetXieZhen()
 {
     using (MySqlConnection conn = new MySqlConnection(DB))
     {
         conn.Open();
         List <Img>   Luser = new List <Img>();
         MySqlCommand cmd   = conn.CreateCommand();
         cmd.CommandText = "SELECT id, Imagelist  FROM ent.star  WHERE  ENABLE =1";
         MySqlDataReader reader = cmd.ExecuteReader();
         while (reader.Read())
         {
             Img user = new Img();
             user.ID      = reader.GetInt32(reader.GetOrdinal("ID"));
             user.ImgName = reader["Imagelist"] is DBNull ? "" : (string)reader["Imagelist"];
             //user.URL = reader["Img"] is DBNull ? "" : (string)reader["Img"];
             Luser.Add(user);
         }
         return(Luser);
     }
 }
Exemplo n.º 4
0
 public static List <Img> GetZongYi()
 {
     using (MySqlConnection conn = new MySqlConnection(DB))
     {
         conn.Open();
         List <Img>   Luser = new List <Img>();
         MySqlCommand cmd   = conn.CreateCommand();
         cmd.CommandText = "SELECT id, Img,PicImg  FROM ent.variety  WHERE  type >0";
         MySqlDataReader reader = cmd.ExecuteReader();
         while (reader.Read())
         {
             Img user = new Img();
             user.ID      = reader.GetInt32(reader.GetOrdinal("ID"));
             user.ImgName = reader["PicImg"] is DBNull ? "" : (string)reader["PicImg"];
             user.URL     = reader["Img"] is DBNull ? "" : (string)reader["Img"];
             Luser.Add(user);
         }
         return(Luser);
     }
 }
Exemplo n.º 5
0
 public static List <Img> GetJuZhao()
 {
     using (MySqlConnection conn = new MySqlConnection(DB))
     {
         conn.Open();
         List <Img>   Luser = new List <Img>();
         MySqlCommand cmd   = conn.CreateCommand();
         //cmd.CommandText = "SELECT id, Imagelist  FROM ent.work  WHERE  type in (2,3)";
         cmd.CommandText = "SELECT id, Imagelist   FROM ent.work WHERE id IN(SELECT workid FROM `star_work` WHERE starid =89)  AND TYPE IN (2,3)";
         MySqlDataReader reader = cmd.ExecuteReader();
         while (reader.Read())
         {
             Img user = new Img();
             user.ID      = reader.GetInt32(reader.GetOrdinal("ID"));
             user.ImgName = reader["Imagelist"] is DBNull ? "" : (string)reader["Imagelist"];
             //user.URL = reader["Img"] is DBNull ? "" : (string)reader["Img"];
             Luser.Add(user);
         }
         return(Luser);
     }
 }