Пример #1
0
        public int Create()
        {
            UsersDAO dao    = new UsersDAO();
            int      result = dao.CreateUser(this);

            return(result);
        }
Пример #2
0
        public int Create(string name, string password)
        {
            UsersDAO dao    = new UsersDAO();
            int      result = dao.CreateUser(name, password);

            return(result);
        }
        public ActionResult Create(CreateUserModel user)
        {
            if (!checkSession())
            {
                return(RedirectToAction("login"));
            }
            UsersDAO usersDAO = new UsersDAO();

            if (usersDAO.CreateUser(user))
            {
                return(Json(new
                {
                    MESSAGE = "1"
                }));
            }
            else
            {
                return(Json(new
                {
                    MESSAGE = "0"
                }));
            }
        }
Пример #4
0
 public int CreateUser(Users user)
 {
     return(UsersDAO.CreateUser(user));
 }