Esempio n. 1
0
        public void levelchange(string name, string level)
        {
            int line, l;

            if (level == "True")
            {
                l = 0;
            }
            else
            {
                l = 1;
            }
            LibraryDAL.userop load = new LibraryDAL.userop();
            try
            {
                line = load.levelupdata(name, l);
            }
            catch (Exception e)
            {
                throw e;
            }
            if (line <= 0)
            {
                throw new Exception("权限更新失败");
            }
        }
Esempio n. 2
0
 public void offline(string name)
 {
     LibraryDAL.userop load = new LibraryDAL.userop();
     try
     {
         line = load.offline(name);
     }
     catch (Exception e)
     {
         throw e;
     }
     if (line <= 0)
     {
         throw new Exception("离线更新失败");
     }
 }
Esempio n. 3
0
 public void userInfochange(string name, string phone, string qq, string sign, string stu_name)
 {
     LibraryDAL.userop load = new LibraryDAL.userop();
     try
     {
         line = load.userInofUpdata(name, phone, qq, sign, stu_name);
     }
     catch (Exception e)
     {
         throw e;
     }
     if (line <= 0)
     {
         throw new Exception("权限更新失败");
     }
 }
Esempio n. 4
0
 public void headchange(string name, byte[] headima)
 {
     LibraryDAL.userop head = new LibraryDAL.userop();
     try
     {
         line = head.headupdata(name, headima);
     }
     catch (Exception e)
     {
         throw e;
     }
     if (line <= 0)
     {
         throw new Exception("头像更新失败");
     }
 }
Esempio n. 5
0
 public void userlogincheck(string name, string stuname, string stuid, string subject, string qq, string phone, byte[] headima, string password)
 {
     if (name == null || stuname == null || stuid == null || subject == null || phone == null || qq == null || phone == null || password == null)
     {
         throw new Exception("关键字段为空");
     }
     LibraryDAL.userop load = new LibraryDAL.userop();
     try
     {
         line = load.Upload(name, stuname, stuid, subject, qq, phone, headima, password);
     }
     catch (Exception e)
     {
         throw e;
     }
     if (line <= 0)
     {
         throw new Exception("注册失败");
     }
 }
Esempio n. 6
0
        public int userdelete(ArrayList name)
        {
            int line = 0;

            foreach (string a in name)
            {
                LibraryDAL.userop load = new LibraryDAL.userop();
                try
                {
                    line += load.Userdelete(a);
                }
                catch (Exception e)
                {
                    throw e;
                }
                if (line <= 0)
                {
                    throw new Exception("删除失败");
                }
            }
            return(line);
        }