Example #1
0
        public SqlDataReader datareader(Model.downlist md)
        {
            string        str = "select * from downlist where _id=" + md.id + "  ";
            SqlDataReader sdr = DbHelperSQL.ExecuteReader(str);

            return(sdr);
        }
Example #2
0
        public int _delete(Model.downlist md)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" delete from downlist ");
            sql.Append(" where _id=@id ");
            SqlParameter[] par = { new SqlParameter("@id", SqlDbType.Int, 4) };
            par[0].Value = md.id;
            return(DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }
Example #3
0
        public int click(Model.downlist md)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" update downlist set ");
            sql.Append(" _hiterate=@click  ");
            sql.Append(" where _id=@id  ");
            SqlParameter[] par =
            {
                new SqlParameter("@click", SqlDbType.Int, 4),
                new SqlParameter("@id",    SqlDbType.Int, 4)
            };
            par[0].Value = md.click;
            par[1].Value = md.id;
            return(DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }
Example #4
0
        public int  downloadadd(Model.downlist md)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" insert into downlist   ");
            sql.Append(" (_title,_file_size,_hiterate,_download_url)");
            sql.Append(" values (@name,@size,@click,@url)");
            SqlParameter[] par = { new SqlParameter("@name",  SqlDbType.VarChar, 150),
                                   new SqlParameter("@size",  SqlDbType.VarChar,  50),
                                   new SqlParameter("@click", SqlDbType.Int,       4),
                                   new SqlParameter("@url",   SqlDbType.VarChar, 200) };
            par[0].Value = md.title;
            par[1].Value = md.size;
            par[2].Value = md.click;
            par[3].Value = md.uploadurl;
            return(DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }
Example #5
0
        public int update(Model.downlist md)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append(" update downlist set ");
            sql.Append(" _title=@name,_file_size=@size,_hiterate=@click,_download_url=@url  ");
            sql.Append(" where _id=@id  ");
            SqlParameter[] par = { new SqlParameter("@name",  SqlDbType.VarChar, 150),
                                   new SqlParameter("@size",  SqlDbType.VarChar,  50),
                                   new SqlParameter("@click", SqlDbType.Int,       4),
                                   new SqlParameter("@url",   SqlDbType.VarChar, 200),
                                   new SqlParameter("@id",    SqlDbType.Int, 4) };
            par[0].Value = md.title;
            par[1].Value = md.size;
            par[2].Value = md.click;
            par[3].Value = md.uploadurl;
            par[4].Value = md.id;
            return(DbHelperSQL.ExecuteSql(sql.ToString(), par));
        }
Example #6
0
 public int click(Model.downlist md)
 {
     DAL.downlist dd = new DAL.downlist();
     return(dd.click(md));
 }
Example #7
0
 public int _delete(Model.downlist md)
 {
     DAL.downlist dd = new DAL.downlist();
     return(dd._delete(md));
 }
Example #8
0
 public SqlDataReader datareader(Model.downlist md)
 {
     DAL.downlist dd = new DAL.downlist();
     return(dd.datareader(md));
 }
Example #9
0
 public int update(Model.downlist md)
 {
     DAL.downlist dd = new DAL.downlist();
     return(dd.update(md));
 }
Example #10
0
 public int downloadadd(Model.downlist md)
 {
     DAL.downlist dd = new DAL.downlist();
     return(dd.downloadadd(md));
 }