Inheritance: MonoBehaviour
 public static bool AddNew(StoreManager newStoreManager)
 {
     MoneyPacificEntities db = new MoneyPacificEntities();
     db.StoreManagers.AddObject(newStoreManager);
     db.SaveChanges();
     db.Connection.Close();
     return true;
 }
Exemplo n.º 2
0
 public void Initialize(StoreManager.ItemTypes itemType, int id, string itemName, int price, int cp, CubeLibrary library)
 {
     this.library = library;
     name = itemName;
     this.itemType = itemType;
     this.id = id;
     this.itemName.text = itemName;
     buyPrice.text = StoreManager.FormatMoney(price, false);
     sellPrice.text = StoreManager.FormatMoney((int)(price * StoreManager.SellPercent), true);
     this.cp.text = cp.ToString();
 }
    void Awake()
    {
        if(instance)
            DestroyImmediate(gameObject);
        else
        {
            // Set the GameObject name to the class name for easy access from Obj-C
            gameObject.name = this.GetType().ToString();

            DontDestroyOnLoad(gameObject);
            instance = this;
        }
    }
    // public method
    // link component element
    public void LinkCompoenentElement()
    {
        // high structure
        manager      = GameObject.FindWithTag("GameLogic").GetComponent <GameManager>();
        storeManager = GameObject.FindWithTag("GameLogic").GetComponent <StoreManager>();
        stageManager = GameObject.FindWithTag("GameLogic").GetComponent <StageManager>();

        // component element
        itemImage             = transform.Find("StorageSlot").Find("ElementIcon").GetComponent <Image>();
        itemPriceText         = transform.Find("ItemPrice").Find("ItemPriceBack").Find("Text").GetComponent <Text>();
        registerCountText     = transform.Find("ItemCount").Find("ItemCountBack").Find("Text").GetComponent <Text>();
        registerSellPriceText = transform.Find("ItemSellPrice").Find("ItemSellPriceField").GetComponent <InputField>();
    }
Exemplo n.º 5
0
        public void GlobalEvent(EventMessage message)
        {
            var store = StoreManager.GetEventStore(message.Database);

            EventCommand cmd = new EventCommand()
            {
                Command = message.Command, CommandMarker = message.CommandMarker
            };

            cmd.SetMarker(P2PConfiguration.NoRedispatch);

            store.Enqueue(cmd);
        }
Exemplo n.º 6
0
        public static List <StoreTransfer> MapStoreTransferData(DataTable dTstore)
        {
            List <StoreTransfer> ListStores = new List <StoreTransfer>();

            foreach (DataRow dr in dTstore.Rows)
            {
                StoreTransfer mapData = new StoreTransfer();
                mapData.Id       = int.Parse(dr["id"].ToString());
                mapData.InOut    = (StoreMovementType)Enum.Parse(typeof(StoreMovementType), dr["Type"].ToString());
                mapData.Status   = (StoreTransferStatus)Enum.Parse(typeof(StoreTransferStatus), dr["Status"].ToString());
                mapData.Customer = dr["CustomerId"] != null?CustomerManager.GetCustomerRef(dr["CustomerId"].ToString()) : CustomerManager.GetDefaultRef();

                mapData.CreatedOn = dr["CreatedOn"] != DBNull.Value ? DateTime.Parse(dr["CreatedOn"].ToString()) : DateTime.MinValue;
                mapData.CreatedBy = dr["CreatedBy"] != null?UserManager.GetUserRef(dr["CreatedBy"].ToString()) : UserManager.GetDefaultRef();

                mapData.ModifiedOn = dr["ModifiedOn"] != DBNull.Value ? DateTime.Parse(dr["ModifiedOn"].ToString()) : DateTime.MinValue;
                mapData.ModifiedBy = dr["ModifiedBy"] != null?UserManager.GetUserRef(dr["ModifiedBy"].ToString()) : UserManager.GetDefaultRef();

                mapData.CompletedOn = dr["CompletedOn"] != DBNull.Value ? DateTime.Parse(dr["CompletedOn"].ToString()) : DateTime.MinValue;
                mapData.LeadId      = dr["LeadId"] != null?UserManager.GetUserRef(dr["LeadId"].ToString()) : UserManager.GetDefaultRef();

                mapData.STNumber = dr["SMNumber"] != null ? dr["SMNumber"].ToString() : "";
                mapData.STDate   = dr["SMDate"] != DBNull.Value ? DateTime.Parse(dr["SMDate"].ToString()) : DateTime.MinValue;

                mapData.Origin = dr["Origin"] != null?CommonDataManager.GetOrigin(dr["Origin"].ToString()) : CommonDataManager.GetDefaultRef();

                mapData.Size = dr["Size"] != null?CommonDataManager.GetSize(dr["Size"].ToString()) : CommonDataManager.GetDefaultRef();

                mapData.Vessel = dr["Vessel"] != null?CommonDataManager.GetVessel(dr["Vessel"].ToString()) : CommonDataManager.GetDefaultRef();

                mapData.Quantity = dr["Quantity"] != null?decimal.Parse(dr["Quantity"].ToString()) : 0;

                mapData.FromStoreId = dr["FromStoreId"] != null?StoreManager.GetStoreRef(dr["FromStoreId"].ToString()) : StoreManager.GetDefaultRef();

                mapData.ToStoreId = dr["ToStoreId"] != null?StoreManager.GetStoreRef(dr["ToStoreId"].ToString()) : StoreManager.GetDefaultRef();

                mapData.VehicleNo   = dr["VehicleNo"] != null ? dr["VehicleNo"].ToString() : "";
                mapData.BiltyNo     = dr["BiltyNo"] != null ? dr["BiltyNo"].ToString() : "";
                mapData.BiltyDate   = dr["BiltyDate"] != DBNull.Value ? DateTime.Parse(dr["BiltyDate"].ToString()) : DateTime.MinValue;
                mapData.RRInvoice   = dr["RRInvoice"] != null ? dr["RRInvoice"].ToString() : "";
                mapData.CCMNumber   = dr["CCMNumber"] != null ? dr["CCMNumber"].ToString() : "";
                mapData.Transporter = dr["Transporter"] != null?CommonDataManager.GetTrader(dr["Transporter"].ToString()) : CommonDataManager.GetDefaultRef();

                mapData.StoreInDate     = dr["StoreInDate"] != DBNull.Value ? DateTime.Parse(dr["StoreInDate"].ToString()) : DateTime.MinValue;
                mapData.StoreInQuantity = dr["StoreInQuantity"] != null?decimal.Parse(dr["StoreInQuantity"].ToString()) : 0;

                ListStores.Add(mapData);
                mapData = null;
            }
            return(ListStores);
        }
        public void AddProductShouldWorksCorrectly()
        {
            string  name     = "Butter";
            int     quantity = 10;
            decimal price    = 5m;

            Product product = new Product(name, quantity, price);

            StoreManager manager = new StoreManager();

            manager.AddProduct(product);

            Assert.That(manager.Products.Count == 1);
        }
        public void AddProductShouldThrowExceptionWhenQuantityIsBelowOrEqualsToZero(int quantity)
        {
            string  name  = "Butter";
            decimal price = 5m;

            Product product = new Product(name, quantity, price);

            StoreManager manager = new StoreManager();

            Assert.Throws <ArgumentException>(() =>
            {
                manager.AddProduct(product);
            });
        }
Exemplo n.º 9
0
        static void GetItemsFromDate(StoreManager neto)
        {
            var filter = new GetItemFilter();

            filter.DateAddedFrom = DateTime.Now.Add(-TimeSpan.FromDays(100));
            filter.Limit         = 2;

            Item[] result = neto.Products.GetItem(filter);

            foreach (Item i in result)
            {
                Console.WriteLine($"{i.ID} - {i.Name}");
            }
        }
    public void Start()
    {
        store     = GameObject.FindGameObjectWithTag("Store").GetComponent <StoreManager>();
        priceText = GetComponentInChildren <Text>();

        if (store.isColorBought(index))
        {
            priceText.gameObject.SetActive(false);
        }
        else
        {
            priceText.text = price.ToString();
        }
    }
Exemplo n.º 11
0
        public bool RemoveUser(string userName)
        {
            Member member;

            try
            {
                member = ConnectionStubTemp.getMember(userName);
            }
            catch (WorkShopDbException dbExc)
            {
                throw dbExc;
            }
            catch (Exception ex)
            {
                Logger.Log("event", logLevel.INFO, "Admin fail removed user: "******" user doen't exist");
                throw new Exception(ex.ToString());
            }
            if (member.isStoresManagers())
            {
                int          count = member.storeManaging.Count - 1;
                StoreManager st    = member.storeManaging.ElementAt(count);
                try
                {
                    for (; count > -1; count--, st = member.storeManaging.ElementAt(count))
                    {
                        if (ConnectionStubTemp.getAllOwnersCount(st.store) == 1 /*st.GetFather() == null*/)///change to super father
                        {
                            Store store = st.GetStore();
                            WorkShop.closeStore(store.id, member);
                        }
                        else
                        {
                            StoreManager father = st.GetFather();
                            father.removeManager(st);
                        }
                    }
                } catch (Exception ex)
                {
                }
                ConnectionStubTemp.removeMember(member);
                Logger.Log("event", logLevel.INFO, "Admin succesfully removed user: "******"event", logLevel.INFO, "Admin succesfully removed user: " + userName);
                ConnectionStubTemp.removeMember(member);
                return(ConnectionStubTemp.removeUser(userName, this));
            }
        }
Exemplo n.º 12
0
        public IEnumerable <string> GetSyncLog()
        {
            //var redisClient = RedisManager.Connection;
            //var endpoint = redisClient.GetEndPoints().FirstOrDefault();
            //if (endpoint == null)
            //{
            //    return new string[0];
            //}
            //var keys = redisClient.GetServer(endpoint).Keys(pattern: "*SyncLogCache");
            //var json = redisClient.GetDatabase().StringGet(keys.ToArray());

            //return json.Select(o => o.ToString());
            return(StoreManager.GetSyncLogs());
        }
Exemplo n.º 13
0
        async Task ExecuteCancelAsync()
        {
            Logger.Track(EvolveLoggerKeys.LoginCancel);
            if (Settings.FirstRun)
            {
                AccountResponse result = await client.LoginAnonymously();

                if (result?.Success ?? false)
                {
                    try
                    {
                        Message         = "Updating schedule...";
                        IsBusy          = true;
                        Settings.UserId = result.User?.Id;
                        MessagingService.Current.SendMessage(MessageKeys.LoggedIn);
                        await StoreManager.SyncAllAsync(false);

                        Settings.Current.LastSync      = DateTime.UtcNow;
                        Settings.Current.HasSyncedData = true;
                    }
                    catch (Exception ex)
                    {
                        //if sync doesn't work don't worry it is alright we can recover later
                        Logger.Report(ex);
                    }
                    finally
                    {
                        Message = string.Empty;
                        IsBusy  = false;
                    }

                    Settings.FirstRun = false;
                    await Finish();
                }
                else
                {
                    Logger.Track(EvolveLoggerKeys.LoginFailure, "Reason", result.Error);
                    MessagingService.Current.SendMessage <MessagingServiceAlert>(MessageKeys.Message, new MessagingServiceAlert
                    {
                        Title   = "Anonymous Sign In Failed",
                        Message = result.Error,
                        Cancel  = "OK"
                    });
                }
            }
            else
            {
                await Finish();
            }
        }
        private void update_tables()
        {
            // First we add the new role to Role table.
            List <Parameter> parameters = new List <Parameter>();

            //Then we add the relation between the role and its functionalities.
            foreach (String func in funcBox.SelectedItems)
            {
                parameters.Clear();
                parameters.Add(new Parameter("@role_name", role_name));
                parameters.Add(new Parameter("@func_name", func));
                StoreManager.getInstance().executeNonQuery("sp_link_functionality_role", parameters);
            }
        }
Exemplo n.º 15
0
        private void insertOrUpdate()
        {
            List <Parameter> parameters = new List <Parameter>();

            parameters.Add(new Parameter("@branch_id", this.getBranchId()));
            parameters.Add(new Parameter("@branch_name", edit.name));
            parameters.Add(new Parameter("@branch_address", edit.address));
            parameters.Add(new Parameter("@branch_postal_code", edit.postalCode));
            parameters.Add(new Parameter("@branch_active", edit.active));

            StoreManager.getInstance().executeNonQuery("sp_insert_update_branch", parameters);
            this.Hide();
            this.delegateForm.afterUpdate();
        }
Exemplo n.º 16
0
    public StoreManager _sm;            //Call functions here

    void Start()
    {
        //Get the StoreManager
        _sm = GameObject.FindGameObjectWithTag("StoreManagerTag").GetComponent <StoreManager>();
        //Lock the buttons if save data had max
        if (_buttonId == 1 && _sm._levelAP == 5 || _buttonId == 2 && _sm._levelAR == 5 ||
            _buttonId == 3 && _sm._levelDP == 5 || _buttonId == 4 && _sm._levelDR == 5 ||
            _buttonId == 5 && _sm._levelMHe == 5 || _buttonId == 6 && _sm._levelMSh == 5 ||
            _buttonId == 7 && _sm._levelMSt == 5 || _buttonId == 8 && _sm._levelDHe == 5 ||
            _buttonId == 9 && _sm._levelDSh == 5 || _buttonId == 10 && _sm._levelDSt == 5)
        {
            this.gameObject.GetComponent <Button>().interactable = false;
        }
    }
Exemplo n.º 17
0
        private bool existBillNumber(Decimal billNumber, int bill_id)
        {
            List <Parameter> parameters = new List <Parameter>();

            parameters.Add(new Parameter("@bill_number", billNumber));
            if (!isNew)
            {
                parameters.Add(new Parameter("@bill_id", bill_id));
            }

            Bill result = StoreManager.getInstance().executeReadSingleResult <Bill>("sp_check_bill_number", new BillMapper(), parameters);

            return(result != null);
        }
Exemplo n.º 18
0
        /**
         * Consumes the given purchase, or writes error message to log if unable to consume
         *
         * @param purchase purchase to be consumed
         */
        private void consumeIfConsumable(PurchasableVirtualItem pvi)
        {
            SoomlaUtils.LogDebug(TAG, "TODO consumeIfConsumable");

            try {
                if (!(pvi is NonConsumableItem))
                {
                    StoreManager.GetInstance().Consume(pvi.getItemId());
                }
            } catch (Exception e) {
                SoomlaUtils.LogDebug(TAG, "Error while consuming: itemId: " + pvi.getItemId());
                StoreEvents.GetInstance().PostUnexpectedStoreErrorEvent(e.Message);
            }
        }
Exemplo n.º 19
0
        private void update_tables(String new_name)
        {
            List <Parameter> parameters = new List <Parameter>();

            parameters.Add(new Parameter("@role_id", role.id));
            parameters.Add(new Parameter("@role_name", new_name));
            parameters.Add(new Parameter("@role_active", comboBoxStatus.SelectedIndex));
            StoreManager.getInstance().executeNonQuery("sp_update_role", parameters);

            if (Convert.ToBoolean(comboBoxStatus.SelectedIndex))
            {
                removeRoleFromUsers();
            }
        }
Exemplo n.º 20
0
        public void MethodBuyProductShouldCalculateAndReturnCorrectFinalPrice()
        {
            //Arrange
            StoreManager storeManager = new StoreManager();
            Product      product      = new Product("Product", 20, 50);

            //Act
            storeManager.AddProduct(product);
            decimal expectedResult = 500;
            decimal actualResult   = storeManager.BuyProduct("Product", 10);

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 21
0
        public void MethodAddProductShouldIncreaseCountIfProperProductIsGiven()
        {
            //Arrange
            StoreManager storeManager = new StoreManager();
            Product      product      = new Product("Product", 20, 50);

            //Act
            storeManager.AddProduct(product);
            int expectedResult = 1;
            int actualResult   = storeManager.Count;

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 22
0
        public async Task AddAsyncTestFaildAsync(string databasename, string address, string name)
        {
            StoreStruct storeStruct = new StoreStruct {
                Address = address, Name = name
            };

            using (InMemoryContext context = new InMemoryContext(databasename))
            {
                StoreManager store = new StoreManager(context);
                await context.Stores.AddAsync(new StoresEntity { Name = name });

                Assert.ThrowsAsync <ExistsInDBException>(async() => await store.AddAsync(storeStruct));
            }
        }
Exemplo n.º 23
0
        public void TestLastMethod()
        {
            var product  = new Product("Pesho", 5, 15.5m);
            var product1 = new Product("Gosho", 5, 5.5m);

            var store = new StoreManager();

            store.AddProduct(product);
            store.AddProduct(product1);

            var producto = store.Products.OrderByDescending(p => p.Price).First();

            Assert.AreEqual(producto, store.GetTheMostExpensiveProduct());
        }
Exemplo n.º 24
0
    /* * * * Helper methods * * * */

    private void updateLabelsAndButton()
    {
        StoreItem si   = StoreManager.getItemWithID(this.itemID);
        string    name = si.getName();

        if (this.isExpendableItem)
        {
            name += " (" + si.getNumBought() + " left)";
        }
        this.itemLabel.text         = name;
        this.costLabel.text         = "" + si.getCost();
        this.buyButton.interactable = (this.isExpendableItem || si.getNumBought() == 0);
        this.descriptionLabel.text  = si.getDescription();
    }
Exemplo n.º 25
0
        private void doSaveItems()
        {
            deleteItems();

            foreach (Item it in items)
            {
                List <Parameter> parameters = new List <Parameter>();
                parameters.Add(new Parameter("@it_bill_id", bill.id));
                parameters.Add(new Parameter("@it_number", it.number));
                parameters.Add(new Parameter("@it_amount", it.amount));
                parameters.Add(new Parameter("@it_quantity", it.quantity));
                StoreManager.getInstance().executeNonQuery("sp_insert_update_item", parameters);
            }
        }
Exemplo n.º 26
0
        public ServiceResult GetShoppingCart(string cartUUID)
        {
            StoreManager storeManager = new StoreManager(Globals.DBConnectionKey, this.GetAuthToken(Request));
            ShoppingCart cart         = storeManager.GetCart(cartUUID);

            if (cart == null)
            {
                return(ServiceResponse.Error("Cart wasn't found."));
            }

            CartView cv = this.GetCartView(cart);

            return(ServiceResponse.OK("", cv));
        }
    public void SetAdventureProduct(ProductType product, int productData)
    {
        List <Network.BundleItem> items = new List <Network.BundleItem>();

        Network.BundleItem item = new Network.BundleItem {
            Product     = product,
            ProductData = productData,
            Quantity    = 1
        };
        items.Add(item);
        string productName = StoreManager.Get().GetProductName(items);

        this.m_Headline.Text = productName;
        string str2 = string.Empty;

        switch (product)
        {
        case ProductType.PRODUCT_TYPE_NAXX:
            str2 = "NAXX";
            break;

        case ProductType.PRODUCT_TYPE_BRM:
            str2 = "BRM";
            break;

        case ProductType.PRODUCT_TYPE_LOE:
            str2 = "LOE";
            break;
        }
        string key  = string.Format("GLUE_STORE_PRODUCT_DETAILS_{0}_PART_1", str2);
        string str4 = string.Format("GLUE_STORE_PRODUCT_DETAILS_{0}_PART_2", str2);

        object[] args = new object[] { productName };
        this.m_DetailsText1.Text = GameStrings.Format(key, args);
        this.m_DetailsText2.Text = GameStrings.Format(str4, new object[0]);
        bool productExists          = false;
        List <Network.Bundle> list2 = StoreManager.Get().GetAvailableBundlesForProduct(product, out productExists, productData, NUM_BUNDLE_ITEMS_REQUIRED);

        if (list2.Count == 1)
        {
            this.m_bundle = list2[0];
        }
        else
        {
            Debug.LogWarning(string.Format("AdventureStore.SetAdventureProduct(): expected to find 1 available bundle for product {0} productData {1}, found {2}", product, productData, list2.Count));
            this.m_bundle = null;
        }
        StoreManager.Get().GetAvailableAdventureBundle(product, out this.m_fullDungeonBundle, out productExists);
    }
Exemplo n.º 28
0
        public void MethodBuyProductShouldDecreaseProductQuantityIfCorrectDataIsGiven()
        {
            //Arrange
            StoreManager storeManager = new StoreManager();
            Product      product      = new Product("Product", 20, 50);

            //Act
            storeManager.AddProduct(product);
            storeManager.BuyProduct("Product", 10);
            int expectedResult = 10;
            int actualResult   = product.Quantity;

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 29
0
 private void setEntryBox(Company edit)
 {
     entries = StoreManager.getInstance()
               .executeReadStore <Entry>("sp_get_all_entries", new EntryMapper(), null);
     entryBox.DataSource    = entries;
     entryBox.DisplayMember = "description";
     entryBox.ValueMember   = "description";
     entryBox.DropDownStyle = ComboBoxStyle.DropDownList;
     entryBox.SelectedItem  = null;
     if (!isNew)
     {
         Entry entry = entries.Find(ent => ent.id == edit.entry);
         entryBox.SelectedIndex = entryBox.Items.IndexOf(entry);
     }
 }
Exemplo n.º 30
0
    private void loadStore()
    {
        ListItem li = new ListItem("Select Store...", "0");

        ddlStore.Items.Add(li);

        List <Store> stores = new List <Store>();

        stores = StoreManager.GetAllStores();
        foreach (Store store in stores)
        {
            ListItem item = new ListItem(store.StoreName.ToString(), store.StoreID.ToString());
            ddlStore.Items.Add(item);
        }
    }
    public void DoDelivery(IntPoint2D startingTile, Stack <IntPoint2D> path, StoreManager storeMgr)
    {
        int amtToDeliver = Mathf.Min(kDeliveryCapacity, curCropAmt);

        curCropAmt = curCropAmt - amtToDeliver;
        if (numWorkers >= kMaxWorkers)
        {
            GameObject delPerson = (GameObject)Instantiate(deliveryPrefab);

            Vector3 topLeft = scenarioMgr.ComputeTopLeftPointOfTile(startingTile);
            delPerson.transform.position = topLeft + new Vector3(.5f, .2f, .5f);
            DeliveryManager delMgr = delPerson.GetComponent("DeliveryManager") as DeliveryManager;
            delMgr.SetUp(scenarioInfo, startingTile, path, storeMgr, amtToDeliver);
        }
    }
Exemplo n.º 32
0
        private void doSave()
        {
            getData();

            List <Parameter> parameters = getParametersSaveBill();

            int?pk = StoreManager.getInstance().executeNonQueryResultPKInt("sp_insert_update_bill", parameters);

            if (pk.HasValue)
            {
                bill.id = pk.Value;
            }

            doSaveItems();
        }
Exemplo n.º 33
0
        private void initData()
        {
            gridItems.AutoGenerateColumns = false;

            if (!isNew)
            {
                List <Parameter> parameters = new List <Parameter>();
                parameters.Add(new Parameter("@it_bill_id", bill.id));
                items = StoreManager.getInstance().executeReadStore <Item>("sp_search_items_bill", new ItemMapper(), parameters);
            }
            else
            {
                items = new List <Item>();
            }
        }
Exemplo n.º 34
0
    // Use this for initialization
    void Awake()
    {
        if (StoreManager.instance == null) {

            instance = this;
        } else if (instance != this) {
            Destroy(gameObject);
        }
        Unlocked = new bool[Frogs.Length];
        storeIndex = equippedIndex;
        Unlocked[0] = true;
        for(int i = 1; i<Unlocked.Length; i++)
        {
            Unlocked[i] = false;
        }
    }
Exemplo n.º 35
0
        internal static bool Update(StoreManager storeManager)
        {
            MoneyPacificEntities db = new MoneyPacificEntities();
            StoreManager exitSM = db.StoreManagers
                .Where(s => s.Id == storeManager.Id)
                .Single<StoreManager>();

            ///exitSM.Id = storeManager.Id;

            exitSM.Address = storeManager.Address;
            exitSM.Address2 = storeManager.Address2;
            
            exitSM.CityId = storeManager.CityId;                                    
            
            exitSM.Country = storeManager.Country;
            exitSM.CreateDate = storeManager.CreateDate;
            exitSM.EmailAlert = storeManager.EmailAlert;
            exitSM.EmailBill = storeManager.EmailBill;

            exitSM.IdShop = storeManager.IdShop;
            exitSM.IsLocked = storeManager.IsLocked;
            exitSM.LastCollectDate = storeManager.LastCollectDate;
            exitSM.LegalStructure = storeManager.LegalStructure;
            exitSM.ManagerPhone = storeManager.ManagerPhone;
            exitSM.Name = storeManager.Name;
            exitSM.NameOfCompany = storeManager.NameOfCompany;
            exitSM.NameOfStore = storeManager.NameOfStore;
            exitSM.NumberOfShop = storeManager.NumberOfShop;
            exitSM.Password = storeManager.Password;
            exitSM.Phone = storeManager.Phone;
            exitSM.Phone2 = storeManager.Phone2;
            exitSM.Product = storeManager.Product;
            exitSM.ShopSize = storeManager.ShopSize;
            exitSM.StatusId = storeManager.StatusId;
            exitSM.StoreInternetAccessId = storeManager.StoreInternetAccessId;
            exitSM.Username = storeManager.Username;
            exitSM.VATNumber = storeManager.VATNumber;
            exitSM.WebSite = storeManager.WebSite;
            exitSM.Zip = storeManager.Zip;
            
            db.SaveChanges();
            db.Connection.Close();
            return true;

        }
Exemplo n.º 36
0
    // Use this for initialization
    void Start()
    {
        renderer.material.color = normalColor;
        store = transform.parent.parent.GetComponent<StoreManager>();
        if (unlocked) {
            renderer.material.mainTexture = unlockedTexture;
        } else {
            renderer.material.mainTexture = lockedTexture;
        }

        canClick = true;
        audio.clip = hoverSound;
    }
Exemplo n.º 37
0
 public ItemSelectedArgs(StoreManager.ItemTypes itemType, int id)
 {
     this.itemType = itemType;
     this.id = id;
 }
Exemplo n.º 38
0
 public void ItemSelected(StoreItem item, StoreManager.ItemTypes itemType, int id)
 {
     ItemSelectedEvent(item, new ItemSelectedArgs(itemType, id));
 }
Exemplo n.º 39
0
 private void CreateButton(UIGrid parent, string name, StoreManager.ItemTypes itemType, int id, int price, int cp)
 {
     StoreItem button = PrefabUtility.InstantiatePrefab(itemPrefab) as StoreItem;
     parent.AddChild(button.transform);
     button.transform.localScale = Vector3.one;
     button.Initialize(itemType, id, name, price, cp, this);
     button.GetComponent<SelectableButton>().group = "Store Item";
 }
Exemplo n.º 40
0
 public ActionResult EditStore(StoreManager model)
 {
     StoreManagerBUS.UpdateStore(model);
     return View();
 }
Exemplo n.º 41
0
 internal static bool 					Update(StoreManager editStoreManager){}
Exemplo n.º 42
0
 internal static bool Update(StoreManager editStoreManager)
 {
     return StoreManagerDAO.Update(editStoreManager);
 }