資源簡介
C#開發收銀系統簡單收銀源代碼.

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.IO;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
namespace?MiniCashier
{
????class?commodity
????{
????????public?static?Shop[]?shop?=?new?Shop[20];
????????//數量
????????public?static?int?count?=?0;
????????public?void?function()
????????{
????????????string?iscon?=?““;
????????????do
????????????{
????????????????string?scan;
????????????????Console.WriteLine(“請輸入功能指令“);
????????????????Console.WriteLine(“↓↓↓↓↓↓↓↓↓↓“);
????????????????Console.WriteLine(“|---------------------------------|“);
????????????????Console.WriteLine(“|---【1】掃描商品-----------------|“);
????????????????Console.WriteLine(“|---【2】輸入商品信息-------------|“);
????????????????Console.WriteLine(“|---【3】修改商品信息-------------|“);
????????????????Console.WriteLine(“|---【4】查詢已有的商品信息-------|“);
????????????????Console.WriteLine(“|---【5】錄入商品信息-------------|“);
????????????????Console.WriteLine(“|---------------------------------|“);
????????????????scan?=?Console.ReadLine();
????????????????switch?(scan)
????????????????{
????????????????????case?“1“:
????????????????????????Console.WriteLine(“|---------掃描商品--------|“);
????????????????????????try
????????????????????????{
????????????????????????????if?(count?!=?0)
????????????????????????????{
????????????????????????????????//掃描條碼查詢
????????????????????????????????Select(shop);
????????????????????????????}
????????????????????????????else
????????????????????????????????Console.WriteLine(“沒有查詢到此條碼“);
????????????????????????}
????????????????????????catch?(Exception?ep)
????????????????????????{
????????????????????????????Console.WriteLine(ep.Message);
????????????????????????}
????????????????????????Console.WriteLine(“是否繼續輸入指令(y/n)“);
????????????????????????iscon?=?Console.ReadLine();
????????????????????????break;
????????????????????case?“2“:
????????????????????????Console.WriteLine(“|------輸入商品信息------|“);
????????????????????????Add(shop);//商品添加
????????????????????????Console.WriteLine(“是否繼續輸入功能指令(y/n)“);
????????????????????????iscon?=?Console.ReadLine();
????????????????????????break;
????????????????????case?“3“:
????????????????????????Console.WriteLine(“------修改商品信息-------“);
????????????????????????try
????????????????????????{
????????????????????????????if?(count?!=?0)
????????????????????????????{
????????????????????????????????Modify(shop);//商品修改
????????????????????????????}
????????????????????????????else
????????????????????????????????Console.WriteLine(“沒有商品可修改“);
????????????????????????}
????????????????????????catch?(Exception?ep)
????????????????????????{
????????????????????????????Console.WriteLine(ep.Message);
????????????????????????}
????????????????????????Console.WriteLine(“是否繼續輸入功能指令(y/n)“);
????????????????????????iscon?=?Console.ReadLine();
????????????????????????break;
????????????????????case?“4“:
????????????????????????Console.Wr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-18?17:08??MiniCashier\
?????目錄???????????0??2017-09-18?17:08??MiniCashier\.vs\
?????目錄???????????0??2017-09-18?17:08??MiniCashier\.vs\MiniCashier\
?????目錄???????????0??2017-09-18?17:08??MiniCashier\.vs\MiniCashier\v15\
?????文件???????37376??2017-09-18?17:08??MiniCashier\.vs\MiniCashier\v15\.suo
?????目錄???????????0??2017-09-18?17:08??MiniCashier\.vs\MiniCashier\v15\sqlite3\
?????文件??????434176??2017-09-18?17:05??MiniCashier\.vs\MiniCashier\v15\sqlite3\storage.ide
?????目錄???????????0??2017-09-18?17:08??MiniCashier\MiniCashier\
?????文件?????????187??2017-09-14?16:39??MiniCashier\MiniCashier\App.config
?????文件????????2638??2017-09-14?17:23??MiniCashier\MiniCashier\MiniCashier.csproj
?????文件?????????328??2017-09-14?17:23??MiniCashier\MiniCashier\Program.cs
?????目錄???????????0??2017-09-18?17:08??MiniCashier\MiniCashier\Properties\
?????文件????????1342??2017-09-14?16:39??MiniCashier\MiniCashier\Properties\AssemblyInfo.cs
?????文件?????????979??2017-09-15?15:23??MiniCashier\MiniCashier\Shop.cs
?????目錄???????????0??2017-09-18?17:08??MiniCashier\MiniCashier\bin\
?????目錄???????????0??2017-09-18?17:08??MiniCashier\MiniCashier\bin\Debug\
?????文件????????9728??2017-09-18?17:20??MiniCashier\MiniCashier\bin\Debug\MiniCashier.exe
?????文件?????????187??2017-09-14?16:39??MiniCashier\MiniCashier\bin\Debug\MiniCashier.exe.config
?????文件???????28160??2017-09-18?17:20??MiniCashier\MiniCashier\bin\Debug\MiniCashier.pdb
?????文件???????22984??2017-09-18?17:08??MiniCashier\MiniCashier\bin\Debug\MiniCashier.vshost.exe
?????文件?????????187??2017-09-14?16:39??MiniCashier\MiniCashier\bin\Debug\MiniCashier.vshost.exe.config
?????文件?????????490??2010-03-17?22:39??MiniCashier\MiniCashier\bin\Debug\MiniCashier.vshost.exe.manifest
?????文件???????10659??2017-09-18?17:26??MiniCashier\MiniCashier\commodity.cs
?????目錄???????????0??2017-09-18?17:08??MiniCashier\MiniCashier\obj\
?????目錄???????????0??2017-09-18?17:20??MiniCashier\MiniCashier\obj\Debug\
?????文件????????6683??2017-09-18?17:08??MiniCashier\MiniCashier\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????????42??2017-09-18?16:25??MiniCashier\MiniCashier\obj\Debug\MiniCashier.csproj.CoreCompileInputs.cache
?????文件????????1329??2017-09-18?17:10??MiniCashier\MiniCashier\obj\Debug\MiniCashier.csproj.FileListAbsolute.txt
?????文件????????1753??2017-09-18?17:10??MiniCashier\MiniCashier\obj\Debug\MiniCashier.csprojResolveAssemblyReference.cache
?????文件????????9728??2017-09-18?17:20??MiniCashier\MiniCashier\obj\Debug\MiniCashier.exe
?????文件???????28160??2017-09-18?17:20??MiniCashier\MiniCashier\obj\Debug\MiniCashier.pdb
............此處省略6個文件信息
評論
共有 條評論