public SqlDataReader datareader(Model.downlist md) { string str = "select * from downlist where _id=" + md.id + " "; SqlDataReader sdr = DbHelperSQL.ExecuteReader(str); return(sdr); }
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)); }
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)); }
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)); }
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)); }
public int click(Model.downlist md) { DAL.downlist dd = new DAL.downlist(); return(dd.click(md)); }
public int _delete(Model.downlist md) { DAL.downlist dd = new DAL.downlist(); return(dd._delete(md)); }
public SqlDataReader datareader(Model.downlist md) { DAL.downlist dd = new DAL.downlist(); return(dd.datareader(md)); }
public int update(Model.downlist md) { DAL.downlist dd = new DAL.downlist(); return(dd.update(md)); }
public int downloadadd(Model.downlist md) { DAL.downlist dd = new DAL.downlist(); return(dd.downloadadd(md)); }