有人可以帮助我如何创建库存或只是如何从库存中扣除数量? [英] Can someone help me how to create an inventory or simply how to deduct quantity from inventory?

查看:86
本文介绍了有人可以帮助我如何创建库存或只是如何从库存中扣除数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如:



我有一位需要药物的病人。如果我给他药,它会自动扣除药品的库存数量。



我尝试过的方法:



i我是vb的新手,我不知道如何在这里解释我的问题-_-我不知道从哪里开始:(

抱歉我的英语不好XD

请帮助。谢谢youuuu

example:

i have a patient who needs a medicine. if i give him a medicine it will automatically deduct the medicine's quantity in inventory.

What I have tried:

i am new in vb and i dont know how to explain my issue here -_- i dont know where to begin :(
sorry for my poor english XD
Please help. thank youuuu

推荐答案

在现实生活中考虑问题。库存只是一个项目列表,每个项目都有一个计算或衡量商店的总金额。每次从商店中取出一定数量的商品,你必须首先检查商店中是否有足够的商品,然后从计数中减去该数量。所以至少你需要



  • 一类库存物品类型,包括名称,数量,最低库存等等。
  • 某种列出< T>或数组以保存物品清单
  • 一些减少库存量的方法,检查该数量何时低于某个t阈值,将库存添加到商店等等>
Think about the problem in real life terms. An inventory is just a list of items, each with a count or measure of the total amount in store. Each time you take an amount of an item out of the store you have to first check that there is enough in store, and then subtract that amount from the count. So at minimum you need

  • a class of the inventory item types, containing name, amount , minimum stock level, etc.
  • some sort of List<T> or array to hold the inventory of items
  • some methods to reduce the stock amount, check when that amount gets below a certain threshold, add stock to the store, etc>


这篇关于有人可以帮助我如何创建库存或只是如何从库存中扣除数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆