private void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
     }
     instance = this;
 }
 void OpenMyBag()
 {
     if (Input.GetKeyDown(KeyCode.I))
     {
         myBag.SetActive(!myBag.activeInHierarchy);
         InventoryManage.RefreshItem();
     }
 }
Esempio n. 3
0
    private void setddl()
    {
        CRUD.Setdll(ddlWorkshop, "workshop");
        //CRUD.Setdll(ddlWorksiteID, "worksite");

        ddlWorkshop.SelectedIndex = 0;
        InventoryManage.Setdll(ddlWarehousecode, ddlWorkshop.SelectedValue);
        //ddlWorksiteID.SelectedIndex = 0;
        //CRUD.SetEqpDDL(ddlEqp, ddlWorkshop.SelectedValue, ddlWorksiteID.SelectedValue);
    }
Esempio n. 4
0
    public void Remove()
    {
        thisItem = transform.parent;
        Itemid   = thisItem.GetComponent <Slot>().slotID;
        string        equipmentString = playerInventory.itemList[Itemid].equipmentString;
        EquipmentType equipmentType   = playerInventory.itemList[Itemid].equipSlot;

        playerInventory.itemList[Itemid] = null;
        Spawn.instance.SpawnItem(equipmentType, equipmentString);
        InventoryManage.RefreshItem();
    }
Esempio n. 5
0
 public void AddNewItem()
 {
     if (!playerInventory.itemList.Contains(thisItem))
     {
         playerInventory.itemList.Add(thisItem);
     }
     else
     {
         thisItem.itemHeld += 1;
     }
     InventoryManage.RefreshItem();
 }
Esempio n. 6
0
    private void Databind()
    {
        DataTable dt = InventoryManage.QueryData(ddlWorkshop.SelectedValue,
                                                 ddlWarehousecode.SelectedValue,
                                                 txtBegintime.Text,
                                                 txtEndtime.Text,
                                                 txtLotid.Text,
                                                 txtPinmin.Text,
                                                 txtType.Text,
                                                 txtWarehouseID.Text
                                                 );

        grd.DataSource = dt;
        grd.DataBind();
    }
    public void AddNewItem()
    {
        if (!playerInventory.itemList.Contains(thisItem))
        {
            for (int i = 0; i < playerInventory.itemList.Count; i++)
            {
                if (playerInventory.itemList[i] == null)
                {
                    playerInventory.itemList[i] = thisItem;
                    break;
                }
            }
        }
        else
        {
            thisItem.itemHeld += 1;
        }

        InventoryManage.RefreshItem();
    }
Esempio n. 8
0
    public void useItem()
    {
        switch (slotType)
        {
        case 0:
            InventoryManage.useItem(0, equipmentString);
            break;

        case 1:
            InventoryManage.useItem(1, equipmentString);
            break;

        case 2:
            InventoryManage.useItem(2, equipmentString);
            break;

        case 3:
            InventoryManage.useItem(3, equipmentString);
            break;
        }
    }
Esempio n. 9
0
 public void ItemOnClicked()
 {
     InventoryManage.UpdateItemInfo(slotItem.itemInfo);
 }
Esempio n. 10
0
 public ProductService()
 {
     db = new InventoryManage();
 }
Esempio n. 11
0
 public StockService()
 {
     db = new InventoryManage();
 }
Esempio n. 12
0
        public JObject GetList(QueryInventory model, int page, int limit)
        {
            string    acc = "AC003";
            DataTable dt  = InventoryManage.GetInventory(acc);
            List <InventoryViewModel> ilist = CommonTools.TableToList <InventoryViewModel>(dt);
            int total = ilist.Count;
            var list  = ilist.AsQueryable();

            if (!string.IsNullOrWhiteSpace(model.AssistCode))
            {
                list = list.Where(x => x.AssistCode.Contains(model.AssistCode));
            }
            if (!string.IsNullOrWhiteSpace(model.HouseID))
            {
                list = list.Where(x => x.HouseID.Equals(model.HouseID));
            }
            if (!string.IsNullOrWhiteSpace(model.Model))
            {
                list = list.Where(x => x.Model.Contains(model.Model));
            }
            if (!string.IsNullOrWhiteSpace(model.ProName))
            {
                list = list.Where(x => x.ProName.Contains(model.ProName));
            }
            if (!string.IsNullOrWhiteSpace(model.Spec))
            {
                list = list.Where(x => x.Specs.Contains(model.Spec));
            }
            ilist = list.Skip((page - 1) * limit).Take(limit).ToList();
            JObject json = new JObject(
                new JProperty("code", 0),
                new JProperty("msg", ""),
                new JProperty("count", total),
                new JProperty("data",
                              new JArray(
                                  from r in ilist
                                  select new JObject(
                                      new JProperty("AssistCode", r.AssistCode),
                                      new JProperty("AssistNumber", r.AssistNumber),
                                      new JProperty("AssistUnit", r.AssistUnit),
                                      new JProperty("BarCode", r.BarCode),
                                      new JProperty("Colour", r.Colour),
                                      new JProperty("FactryName", r.FactryName),
                                      new JProperty("HouseID", r.HouseID),
                                      new JProperty("HouseName", r.HouseName),
                                      new JProperty("ID", r.ID),
                                      new JProperty("InventoryNumber", r.InventoryNumber),
                                      new JProperty("InventoryUnit", r.InventoryUnit),
                                      new JProperty("IsFloat", r.IsFloat),
                                      new JProperty("MainNumber", r.MainNumber),
                                      new JProperty("MainUnit", r.MainUnitID),
                                      new JProperty("MainUnitName", r.MainUnit),
                                      new JProperty("Model", r.Model),
                                      new JProperty("OnlyUnit", r.OnlyUnit),
                                      new JProperty("Place", r.Place),
                                      new JProperty("ProID", r.ProID),
                                      new JProperty("ProName", r.ProName),
                                      new JProperty("Size", r.Size),
                                      new JProperty("Spare1", r.Spare1),
                                      new JProperty("Spare2", r.Spare2),
                                      new JProperty("Spare3", r.Spare3),
                                      new JProperty("Spare5", r.Spare5),
                                      new JProperty("Spare4", r.Spare4),
                                      new JProperty("Specs", r.Specs),
                                      new JProperty("Year", r.Year)))));

            return(json);
        }
Esempio n. 13
0
 public SaleOfficeService()
 {
     manage = new InventoryManage();
 }