Пример #1
0
        public UserModel SignIn(UserModel user)
        {
            var       prox  = new SeniorDBServiceRef.DBFunctionsClient();
            UserModel usern = prox.RetreiveUSerbyUN(user.Username);///, user.Password);

            return(usern);
        }
Пример #2
0
        public string AddGameFrame(GameFrameModel gf)
        {
            var pro = new SeniorDBServiceRef.DBFunctionsClient();

            try
            {
                int result = pro.AddGameFrame(gf);
                if (result == 1)
                {
                    return("success");
                }
                else if (result == -1)
                {
                    return("parameteres are incoherent");
                }
                else if (result == -2)
                {
                    return("this GF already exists");
                }
                else
                {
                    return("error");
                }
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Пример #3
0
        public string Register(UserModel us)
        {
            //   var prox = new DBFunctionsClient();
            var pro = new SeniorDBServiceRef.DBFunctionsClient();

            SeniorDBServiceRef.DBFunctionsClient p = new DBFunctionsClient();
            try
            {
                pro.Open();
                pro.AddUser(us);
                pro.Close();
            }
            catch (ProtocolException ex)
            {
                return(ex.ToString());
            }

            return("done!");
        }