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)); }
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); }
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); } }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
public static bool Logout(string SessionID) { int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID); return(ServiceLayer.RegisteredUser.LogOut.Logout(userID)); }
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)); }
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)); }
public static bool IsLoggedIn(string SessionID) { int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID); return(ServiceLayer.Guest.IsLoggedIn.IsLogged(userID)); }
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)); }
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)); }
public static bool IsAdmin(string SessionID) { int userID = Dictionary_SessionId_UserId.GetInstance().Get_UserId_From_Dictionary(SessionID); return(ServiceLayer.Admin.IsAdmin.isAdmin(userID)); }