示例#1
0
        public void notLoggedInTest()
        {
            object m = sl.Logout(10000);

            Assert.IsInstanceOfType(m, typeof(ReturnMessage));
            Assert.IsFalse(((ReturnMessage)m).success);
        }
示例#2
0
        public void successLoginTest()
        {
            SystemUser user = db.getUserByName("test2");

            sl.removeUser(4, user.id);
            sl.removeUser(5, user.id);
            sl.Logout(db.getUserByName("test2").id);
            object m = sl.Login("test2", "2");

            Assert.IsInstanceOfType(m, typeof(SystemUser));
        }
示例#3
0
        private static void Logout(ClientInfo clientInfo, JObject jsonObject)
        {
            var userIdToken = jsonObject["userId"];

            if (userIdToken == null || userIdToken.Type != JTokenType.Integer)
            {
                throw new ArgumentException("Error: Parameters Mismatch at Logout");
            }

            var logoutResponse = sl.Logout((int)userIdToken);

            SendMessage(clientInfo, logoutResponse);
            return;
        }
        static void Main(string[] args)
        {
            SLInterface b1Company = new SLInterface("https://andromeda:50000/b1s/v1/");
            bool        connected = b1Company.Login(usrName: "manager", pwd: "", db: "SBODEMOES");

            Console.WriteLine($"Resultado de la conexión: {connected}");
            if (!connected)
            {
                Console.ReadLine();
                return;
            }
            //b1Company.GetItems();
            //b1Company.GetItem("A00001");
            //b1Company.GetOrders();
            b1Company.AddSaleOrder(cardCode: "C20000", itemCode: "A00001");
            b1Company.Logout();
            Console.WriteLine("Fin de la ejecución!! ************************");
            Console.ReadLine();
        }
示例#5
0
 public object logout(int userId)
 {
     return(sl.Logout(userId));
 }