Esempio n. 1
0
        public static string[] ProcessOfBuying(string cardNumber, string month, string year, string holder, string ccv, string ID, string name, string address, string city, string country, string zip, string SessionID)
        {
            // THE function return number that represent transactionID !!
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Guest.ProcessOfBuyingProducts.ProcessBuyingProducts(cardNumber, month, year, holder, ccv, ID, name, address, city, country, zip, userID));
        }
Esempio n. 2
0
        public static bool EditCart(string option, int productID, string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            //EDIT SUPPORT: meantime just "delete" if want to edit num of units form products need to delete and add how many he wants again.
            return(ServiceLayer.Guest.WatchAndEdit.Edit(option, productID, userID));
        }
 public static Dictionary_SessionId_UserId GetInstance()
 {
     if (instance == null)
     {
         instance = new Dictionary_SessionId_UserId();
     }
     return(instance);
 }
Esempio n. 4
0
 public static bool IsManagerOfStore(string SessionID, string storename)
 {
     try
     {
         int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);
         return(ServiceLayer.Store_Owner_User.IsOwnerOrManage.IsManager(userID, storename));
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 5
0
        public static bool RemoveUserFromSystem(string SessionID, string usernameToDelete)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Admin.RemoveUserFromSystem.RemoveUser(userID, usernameToDelete));
        }
Esempio n. 6
0
        public static LinkedList <LinkedList <string> > GetRoles(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.RegisteredUser.GetRoles.getRoles(userID));
        }
Esempio n. 7
0
        public static bool ManageProducts(string SessionID, int productID, string name, string category, int price, int amount, string store, string option)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.ManageProducts.ManageProduct(userID, productID, name, category, price, amount, store, option));
        }
Esempio n. 8
0
        public static bool SaveToCart(string SessionID, int productID, int amount)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Guest.SaveProductToCart.SaveProduct(productID, userID, amount));
        }
Esempio n. 9
0
        public static LinkedList <LinkedList <string> > DisplayCart(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Guest.WatchAndEdit.Watch(userID));
        }
Esempio n. 10
0
        public static bool OpenStore(string storename, string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.RegisteredUser.OpenStore.openStore(storename, userID));
        }
Esempio n. 11
0
        public static bool AssignStoreManager(string SessionID, string store, string usernameToAppoint, bool[] privileges)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.AssignStoreManager.AsssignManager(userID, store, usernameToAppoint, privileges));
        }
Esempio n. 12
0
        public static bool DeclineOwner(string store, string SessionID, string usernameToDecline)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.HandlerRequestAppointment.DeclineAppointment(store, userID, usernameToDecline));
        }
Esempio n. 13
0
        public static bool RemoveStoreManger(string SessionID, string store, string usernameToDelete)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.RemoveStoreManager.removeStoreManager(userID, store, usernameToDelete));
        }
Esempio n. 14
0
        public static bool AddBuyingPolicy(LinkedList <string> param, string store, string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.ManagePolicies.AddBuyingPolicy(param, store, userID));
        }
Esempio n. 15
0
        public static bool Logout(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.RegisteredUser.LogOut.Logout(userID));
        }
Esempio n. 16
0
        public static bool Login(string username, string password, string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Guest.LogIn.Login(username, password, userID));
        }
Esempio n. 17
0
        public static LinkedList <string> GetPendingList(string SessionID, string storename)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.ShowWaitingList.ShowWaitingsList(userID, storename));
        }
Esempio n. 18
0
        public static bool IsLoggedIn(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Guest.IsLoggedIn.IsLogged(userID));
        }
Esempio n. 19
0
        public static bool IsManager(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.IsOwnerOrManage.IsManager2(userID));
        }
Esempio n. 20
0
        public static bool RemoveBuyingPolicy(string store, int productId, string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Store_Owner_User.ManagePolicies.RemoveBuyingPolicy(store, productId, userID));
        }
Esempio n. 21
0
        public static bool IsAdmin(string SessionID)
        {
            int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID);

            return(ServiceLayer.Admin.IsAdmin.isAdmin(userID));
        }