コード例 #1
0
    public void AddInventoryDB(InventoryDB inventoryDB)
    {
        Dictionary <byte, object> parameters = new Dictionary <byte, object>();

        ParameterTool.AddParameter(parameters, ParameterCode.InventoryDB, inventoryDB);
        PhotonEngine.Instance.SendRequest(OpCode, SubCode.AddInventoryDB, parameters);
    }
コード例 #2
0
        private void AddDetails(int age, string name)
        {
            invdb = new InventoryDB();
            Android.App.AlertDialog.Builder dialog = new AlertDialog.Builder(this);
            AlertDialog alert = dialog.Create();

            alert.SetTitle("Message");
            alert.SetButton("ok", (cv, EventArgs) =>
            {
            });

            boobj.name = name;
            boobj.age  = age;


            if (invdb.CreateEmployee(boobj))
            {
                var nxtpage = new Intent(this, typeof(ListViewActivity));
                StartActivity(nxtpage);
            }
            else
            {
                alert.SetMessage("row not added ");
                alert.Show();
            }
        }
コード例 #3
0
 /// <summary>
 /// 添加商品
 /// </summary>
 /// <param name="good"></param>
 /// <returns></returns>
 public void InsertGood(Good good)
 {
     using (var db = new InventoryDB())
     {
         db.Insert(good);
     }
 }
コード例 #4
0
 internal void InsertClientAccount(ClientAccount clientAccount)
 {
     using (var db = new InventoryDB())
     {
         db.Insert(clientAccount);
     }
 }
コード例 #5
0
 internal void UpdateClientAccount(ClientAccount clientAccount)
 {
     using (var db = new InventoryDB())
     {
         db.Update(clientAccount);
     }
 }
コード例 #6
0
 internal void UpdateSupplier(Supplier supplier)
 {
     using (var db = new InventoryDB())
     {
         db.Update(supplier);
     }
 }
コード例 #7
0
 internal void InsertSupplier(Supplier supplier)
 {
     using (var db = new InventoryDB())
     {
         db.Insert(supplier);
     }
 }
コード例 #8
0
 // 修改农户
 internal void UpdateFarmer(Farmer farmer)
 {
     using (var db = new InventoryDB())
     {
         db.Update(farmer);
     }
 }
コード例 #9
0
 /// <summary>
 /// 修改商品
 /// </summary>
 /// <param name="good"></param>
 internal void UpdateGood(Good good)
 {
     using (var db = new InventoryDB())
     {
         db.Update(good);
     }
 }
コード例 #10
0
 // 更新供应商
 internal void UpdateSupplierAccount(SupplierAccount supplierAccount)
 {
     using (var db = new InventoryDB())
     {
         db.Update(supplierAccount);
     }
 }
コード例 #11
0
    public void OnAddInventoryDB(InventoryDB inventoryDB)
    {
        InventoryItem item = new InventoryItem(inventoryDB);

        mList.Add(item);
        OnInventoryChanged();
    }
コード例 #12
0
 public static void EnviromentSetup(TestContext testContext)
 {
     using (InventoryDB db = new InventoryDB())
     {
         db.Database.EnsureDeleted();
     }
 }
コード例 #13
0
 public void DatabaseCreation()
 {
     using (InventoryDB db = new InventoryDB())
     {
         db.Database.EnsureCreated();
     }
 }
コード例 #14
0
 /// <summary>
 /// 根据ID获取单价
 /// </summary>
 /// <param name="ID"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public double?UnitPrice(long ID, JinXiaoCunType type)
 {
     if (type == JinXiaoCunType.批发)
     {
         using (var db = new InventoryDB())
         {
             var query = from p in db.Goods
                         where p.商品ID == ID
                         select p.批发价格;
             return(query.First());
         }
     }
     if (type == JinXiaoCunType.零售)
     {
         using (var db = new InventoryDB())
         {
             var query = from p in db.Goods
                         where p.商品ID == ID
                         select p.零售价格;
             return(query.First());
         }
     }
     if (type == JinXiaoCunType.进货)
     {
         using (var db = new InventoryDB())
         {
             var query = from p in db.Goods
                         where p.商品ID == ID
                         select p.进货价格;
             return(query.First());
         }
     }
     return(null);
 }
コード例 #15
0
 // 添加农户
 internal void InsertFarmer(Farmer farmer)
 {
     using (var db = new InventoryDB())
     {
         db.Insert(farmer);
     }
 }
コード例 #16
0
 // 添加供应商
 internal void InsertSupplierAccount(SupplierAccount supplierAccount)
 {
     using (var db = new InventoryDB())
     {
         db.Insert(supplierAccount);
     }
 }
コード例 #17
0
ファイル: Main.cs プロジェクト: jackabean123/GTA-Kingpin
 private void SetupDealerInventories()
 {
     if (!DatabaseHandler.dealerInventoryInitialised)
     {
         InventoryDB.SetAllDealerInventories();
         DatabaseHandler.dealerInventoryInitialised = true;
     }
 }
コード例 #18
0
        public async Task CreateInventoryAsync(int characterId)
        {
            InventoryDB inventory = new InventoryDB();

            inventory.Fk_Character = characterId;
            inventory.Fk_User      = new Guid(User.Claims.First(c => c.Type == "UserID").Value);
            await Database.Inventories.InsertOneAsync(inventory);
        }
コード例 #19
0
 void ExecuteUpdateSuppliers()
 {
     using (var db = new InventoryDB())
     {
         var query = from p in db.Suppliers select p;
         Suppliers = query;
     }
 }
コード例 #20
0
 public static void EnviromentSetup(TestContext testContext)
 {
     using (InventoryDB db = new InventoryDB())
     {
         //Elimina la BD en SQL Server.
         db.Database.EnsureDeleted();
     }
 }
コード例 #21
0
 void ExecuteUpdateGoods()
 {
     using (var db = new InventoryDB())
     {
         var query = from p in db.Goods select p;
         Goods = query;
     }
 }
コード例 #22
0
 void ExecuteRefreshFarmers()
 {
     using (var db = new InventoryDB())
     {
         var query = from p in db.Farmers select p;
         Farmers = query;
     }
 }
コード例 #23
0
 public void DatabaseCreation()
 {
     using (InventoryDB db = new InventoryDB())
     {
         //Crea la BD en SQL Server.
         db.Database.EnsureCreated();
     }
 }
コード例 #24
0
        public void AddProduct(Product product)
        {
            InventoryDB.Inventory.InsertOnSubmit(product); /* Add to data context */

            InventoryDB.SubmitChanges();                   /* Save changes to the DB */

            Products.Add(product);                         /* Add to observable collection */
        }
コード例 #25
0
 void ExecuteUpdateClients()
 {
     using (var db = new InventoryDB())
     {
         var query = from p in db.Clients select p;
         Clients = query;
     }
 }
コード例 #26
0
ファイル: Inventory.cs プロジェクト: garzaa/morrowpeak
    public void Awake()
    {
        itemdb = GetComponent <InventoryDB>();
        TextAsset tempAsset = Resources.Load("global/INVENTORY", typeof(TextAsset)) as TextAsset;

        text = tempAsset.text;

        itemList = new List <Item>();
    }
コード例 #27
0
    public InventoryDB NewInventoryDB()
    {
        InventoryDB inventoryDB = new InventoryDB();

        inventoryDB.InventoryId = Inventory.Id;
        inventoryDB.Num         = Num;
        inventoryDB.Level       = Level;
        inventoryDB.IsDress     = IsDress;
        return(inventoryDB);
    }
コード例 #28
0
        public async Task Delete(int Id)
        {
            using (InventoryDB db = new InventoryDB())
            {
                Category categoryToDelete = await db.Categories.FindAsync(Id);

                categoryToDelete.Deleted = true;
                await db.SaveChangesAsync();
            }
        }
コード例 #29
0
    public InventoryItem(InventoryDB inventoryDB)  //重载
    {
        this.inventoryDB = inventoryDB;
        Inventory inventoryTemp;

        InventoryManager.instance.Dict.TryGetValue(inventoryDB.InventoryId, out inventoryTemp);
        _inventory = inventoryTemp;
        _num       = inventoryDB.Num;
        _level     = inventoryDB.Level;
        isDress    = inventoryDB.IsDress;
    }
コード例 #30
0
 public void UpdateInventoryDB(InventoryDB itemDb)
 {
     using (var session = NhibernateHelper.OpenSession())
     {
         using (var transaction = session.BeginTransaction())
         {
             session.Update(itemDb);
             transaction.Commit();
         }
     }
 }