예제 #1
0
        public void regist(User user)
        {
            string sql        = @"insert into users (loginname,psw,active) values('" + user.LoginName + "','" + user.Password + "',0);";
            User   resultUser = findUser(user.LoginName);
            string result     = resultUser != null ? Grobal.FAILURE : Grobal.SUCCESS;

            if (Grobal.SUCCESS.Equals(result))
            {
                int count = sqlTool.update(sql);
                if (count <= 0)
                {
                    result = Grobal.FAILURE;
                }
            }
            sendResultToclient(user, Grobal.REGIST, result);
        }