Exemple #1
0
        public ProcessOnMemberDeleteResponse ProcessOnMemberDelete(ProcessOnMemberDeleteRequest request)
        {
            EnsureValidRequest(request);

            var response = new ProcessOnMemberDeleteResponse();

            using (var db = new CSSDataContext())
            {
                var login = Login.FindLoginByUsernameOrCallsign(db, request.auth);
                if (login == null)
                {
                    login = db.Logins.FirstOrDefault(p => p.Email == request.auth);
                }

                if (login != null)
                {
                    response.completed = 1;
                    response.response  = "FAILED";
                }
                else
                {
                    response.completed = 1;
                    response.response  = "SUCCESS";
                }
            }

            return(response);
        }
        public ProcessOnMemberDeleteResponse ProcessOnMemberDelete(ProcessOnMemberDeleteRequest request)
        {
            EnsureValidRequest(request);

            var response = new ProcessOnMemberDeleteResponse();

            using (var db = new CSSDataContext())
            {
                var login = Login.FindLoginByUsernameOrCallsign(db, request.auth);
                if (login == null)
                    login = db.Logins.FirstOrDefault(p => p.Email == request.auth);

                if (login != null)
                {
                    response.completed = 1;
                    response.response = "FAILED";
                }
                else
                {
                    response.completed = 1;
                    response.response = "SUCCESS";
                }
            }

            return response;
        }