Esempio n. 1
0
        public int UpdateInfo(User u)
        {
            string sql = "update wdjuser set upass='******',unikename='" + u.Unikename + "'";

            return(SQLOperate.ExecuteSql(sql));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
        public void DeleteCategory(int cno)
        {
            string sql = "delete cate where cno = " + cno;

            SQLOperate.ExecuteSql(sql);
        }
Esempio n. 5
0
        public void AddCategory(int uno, string name)
        {
            string sql = "insert into cate(cuno,cname) values('" + uno + "','" + name + "')";

            SQLOperate.ExecuteSql(sql);
        }
Esempio n. 6
0
        public int DeleteFile(int fno)
        {
            string sql = "delete userfile where fno = '" + fno + "'";

            return(SQLOperate.ExecuteSql(sql));
        }