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); }
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(); } }
/// <summary> /// 添加商品 /// </summary> /// <param name="good"></param> /// <returns></returns> public void InsertGood(Good good) { using (var db = new InventoryDB()) { db.Insert(good); } }
internal void InsertClientAccount(ClientAccount clientAccount) { using (var db = new InventoryDB()) { db.Insert(clientAccount); } }
internal void UpdateClientAccount(ClientAccount clientAccount) { using (var db = new InventoryDB()) { db.Update(clientAccount); } }
internal void UpdateSupplier(Supplier supplier) { using (var db = new InventoryDB()) { db.Update(supplier); } }
internal void InsertSupplier(Supplier supplier) { using (var db = new InventoryDB()) { db.Insert(supplier); } }
// 修改农户 internal void UpdateFarmer(Farmer farmer) { using (var db = new InventoryDB()) { db.Update(farmer); } }
/// <summary> /// 修改商品 /// </summary> /// <param name="good"></param> internal void UpdateGood(Good good) { using (var db = new InventoryDB()) { db.Update(good); } }
// 更新供应商 internal void UpdateSupplierAccount(SupplierAccount supplierAccount) { using (var db = new InventoryDB()) { db.Update(supplierAccount); } }
public void OnAddInventoryDB(InventoryDB inventoryDB) { InventoryItem item = new InventoryItem(inventoryDB); mList.Add(item); OnInventoryChanged(); }
public static void EnviromentSetup(TestContext testContext) { using (InventoryDB db = new InventoryDB()) { db.Database.EnsureDeleted(); } }
public void DatabaseCreation() { using (InventoryDB db = new InventoryDB()) { db.Database.EnsureCreated(); } }
/// <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); }
// 添加农户 internal void InsertFarmer(Farmer farmer) { using (var db = new InventoryDB()) { db.Insert(farmer); } }
// 添加供应商 internal void InsertSupplierAccount(SupplierAccount supplierAccount) { using (var db = new InventoryDB()) { db.Insert(supplierAccount); } }
private void SetupDealerInventories() { if (!DatabaseHandler.dealerInventoryInitialised) { InventoryDB.SetAllDealerInventories(); DatabaseHandler.dealerInventoryInitialised = true; } }
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); }
void ExecuteUpdateSuppliers() { using (var db = new InventoryDB()) { var query = from p in db.Suppliers select p; Suppliers = query; } }
public static void EnviromentSetup(TestContext testContext) { using (InventoryDB db = new InventoryDB()) { //Elimina la BD en SQL Server. db.Database.EnsureDeleted(); } }
void ExecuteUpdateGoods() { using (var db = new InventoryDB()) { var query = from p in db.Goods select p; Goods = query; } }
void ExecuteRefreshFarmers() { using (var db = new InventoryDB()) { var query = from p in db.Farmers select p; Farmers = query; } }
public void DatabaseCreation() { using (InventoryDB db = new InventoryDB()) { //Crea la BD en SQL Server. db.Database.EnsureCreated(); } }
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 */ }
void ExecuteUpdateClients() { using (var db = new InventoryDB()) { var query = from p in db.Clients select p; Clients = query; } }
public void Awake() { itemdb = GetComponent <InventoryDB>(); TextAsset tempAsset = Resources.Load("global/INVENTORY", typeof(TextAsset)) as TextAsset; text = tempAsset.text; itemList = new List <Item>(); }
public InventoryDB NewInventoryDB() { InventoryDB inventoryDB = new InventoryDB(); inventoryDB.InventoryId = Inventory.Id; inventoryDB.Num = Num; inventoryDB.Level = Level; inventoryDB.IsDress = IsDress; return(inventoryDB); }
public async Task Delete(int Id) { using (InventoryDB db = new InventoryDB()) { Category categoryToDelete = await db.Categories.FindAsync(Id); categoryToDelete.Deleted = true; await db.SaveChangesAsync(); } }
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; }
public void UpdateInventoryDB(InventoryDB itemDb) { using (var session = NhibernateHelper.OpenSession()) { using (var transaction = session.BeginTransaction()) { session.Update(itemDb); transaction.Commit(); } } }