Пример #1
0
 partial void Deletet_User(t_User instance);
Пример #2
0
 partial void Insertt_User(t_User instance);
Пример #3
0
 partial void Updatet_User(t_User instance);
Пример #4
0
        private Root proccessRegister(Root request)
        {
            Root r = new Root();
            r.ResponseParameters = new ResponseParameters();

            AnrlDataContext db = new AnrlDataContext();
            if (db.t_Users.Count(p => p.Name == request.AuthInfo.Username) == 0)
            {
                t_User user = new t_User();
                user.Name = request.AuthInfo.Username;
                user.Password = request.AuthInfo.Password;
                user.ID_Role = 0;
                db.t_Users.InsertOnSubmit(user);
                db.SubmitChanges();
                r.AuthInfo = new AuthenticationInfo();
            }
            else
            {
                r.ResponseParameters.Exception = "Username already in use";
            }
            return r;
        }