Exemplo n.º 1
0
        /// <summary>
        /// 销售物品。
        /// </summary>
        /// <param name="store">要销售的物品所在的仓库</param>
        /// <param name="target">要销售的物品</param>
        /// <param name="cost">总售价</param>
        /// <param name="customer">购买人</param>
        /// <param name="Taxed">是否含税</param>
        /// <returns>购买是否成功</returns>
        public bool sold(Store store, List <ProductStorage> target, List <Money> cost, Customer customer, bool Taxed, string solderName)
        {
            if (User.GetUserByName(solderName).m_userType >= userType.USER_SOLDER)
            {
                SoldLog log = new SoldLog((Solder)User.GetUserByName(solderName), customer, store, target, cost, Taxed, "");
                soldLogList.Add(log);

                foreach (ProductStorage pro in target)
                {
                    store.Export(pro);
                }

                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        private void فتحToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            SoldLog sl = new SoldLog();

            sl.ShowDialog();
        }