예제 #1
0
        public BaseResponse <int> Register(FormDataCollection form)
        {
            BaseResponse <int> response = null;

            try
            {
                string name     = form.Name;
                string login    = form.Login;
                string password = form.Password;

                int userId = businessLogicLayer.Register(name, login, password);
                response = new BaseResponse <int>(userId);
            }
            catch (Exception ex)
            {
                response = new BaseResponse <int> {
                    Error = ex.Message
                };
            }
            Login(form);
            return(response);
        }