public int UpdateInfo(User u) { string sql = "update wdjuser set upass='******',unikename='" + u.Unikename + "'"; return(SQLOperate.ExecuteSql(sql)); }
public int SaveFile(SFile f) { string sql = "insert into userfile(fname,fcontent,fcno,funo) values('" + f.Fname + "','" + f.Fcontent + "','" + f.Fcno + "','" + f.Funo + "')"; return(SQLOperate.ExecuteSql(sql)); }
public User Regist(string username, string password, string nickname) { User u = FindUserByUsername(username); if (u != null)//用户名已被使用 { return(null); } else { string sql = "insert into wdjuser(uname,upass,unikename) values('" + username + "','" + password + "','" + nickname + "')"; SQLOperate.ExecuteSql(sql); u = FindUserByUsername(username); if (u != null) { u.Upass = ""; } return(u); } }
public void DeleteCategory(int cno) { string sql = "delete cate where cno = " + cno; SQLOperate.ExecuteSql(sql); }
public void AddCategory(int uno, string name) { string sql = "insert into cate(cuno,cname) values('" + uno + "','" + name + "')"; SQLOperate.ExecuteSql(sql); }
public int DeleteFile(int fno) { string sql = "delete userfile where fno = '" + fno + "'"; return(SQLOperate.ExecuteSql(sql)); }