Browse Source

二维码

master
wugang 8 years ago
parent
commit
97577f6cbc
2 changed files with 21 additions and 14 deletions
  1. +6
    -2
      BO/BarCodeScan/BwpBarCodeUtil.cs
  2. +15
    -12
      TrunksIousOutInStore/TrunksIousOutInStoreForm.cs

+ 6
- 2
BO/BarCodeScan/BwpBarCodeUtil.cs View File

@ -20,15 +20,19 @@ namespace BO.BarCodeScan
{
return "&";
}
if (e.KeyData == (Keys.ProcessKey | Keys.Shift))
if (e.KeyData == (Keys.Oem1 | Keys.Shift))
{
return "&";
return ":";
}
if (e.KeyData == (Keys.Oem2))
{
return "/";
}
if (e.KeyData == (Keys.OemPeriod))
{
return ".";
}
if (e.KeyData == (Keys.Oem2 | Keys.Shift))
{
return "?";


+ 15
- 12
TrunksIousOutInStore/TrunksIousOutInStoreForm.cs View File

@ -28,7 +28,7 @@ namespace TrunksIousOutInStore
private readonly string ClientGoodsSetApplyClient = "白条出入库";
public const string DATA_PATH = "LocalData/TrunksIousOutInStore";
// BardCodeHooK BarCode = new BardCodeHooK();
// BardCodeHooK BarCode = new BardCodeHooK();
#region weightNeed
SerialPort weightPort;
@ -57,7 +57,7 @@ namespace TrunksIousOutInStore
// syncToServer.Abort();
};
// BarCode.BarCodeEvent += new BardCodeHooK.BardCodeDeletegate(BarCode_BarCodeEvent);
// BarCode.BarCodeEvent += new BardCodeHooK.BardCodeDeletegate(BarCode_BarCodeEvent);
if (!Directory.Exists(DATA_PATH))
{
@ -80,9 +80,9 @@ namespace TrunksIousOutInStore
{
if (barCode.IsValid)
{
// var code = UrlUtil.GetBarCode(barCode.BarCode.Trim());
// var goodsName = UrlUtil.GetGoodsName(barCode.BarCode);
var code = barCode.BarCode.Trim();
// var code = UrlUtil.GetBarCode(barCode.BarCode.Trim());
// var goodsName = UrlUtil.GetGoodsName(barCode.BarCode);
var code = barCode.BarCode.Trim();
doInsertUnSubmit(code, "", null);
}
}
@ -386,7 +386,7 @@ var code = barCode.BarCode.Trim();
private void TrunksIousOutInStoreForm_Load(object sender, EventArgs e)
{
// BarCode.Start();
// BarCode.Start();
InitLocalList();
@ -398,7 +398,7 @@ var code = barCode.BarCode.Trim();
private void InitGoodsControl()
{
flpClass.Controls.Clear();
foreach (IGrouping<string, TrunksIousOutInStoreClientGoodsSet> grouping in mLocaList.Where(x=>!string.IsNullOrWhiteSpace(x.Name)).GroupBy(x=>x.Name))
foreach (IGrouping<string, TrunksIousOutInStoreClientGoodsSet> grouping in mLocaList.Where(x => !string.IsNullOrWhiteSpace(x.Name)).GroupBy(x => x.Name))
{
var btn = CreateClassButton(grouping.Key);
flpClass.Controls.Add(btn);
@ -407,7 +407,7 @@ var code = barCode.BarCode.Trim();
private Button CreateClassButton(string text)
{
var btn = new Button(){Text = text};
var btn = new Button() { Text = text };
btn.Width = 100;
btn.Height = 60;
btn.Click += BtnClass_Click;
@ -418,7 +418,7 @@ var code = barCode.BarCode.Trim();
{
var btnClass = sender as Button;
flpGoods.Controls.Clear();
foreach (TrunksIousOutInStoreClientGoodsSet set in mLocaList.Where(x=>x.Name== btnClass.Text))
foreach (TrunksIousOutInStoreClientGoodsSet set in mLocaList.Where(x => x.Name == btnClass.Text))
{
var btn = CreateGoodsSetButton(set);
flpGoods.Controls.Add(btn);
@ -546,7 +546,7 @@ var code = barCode.BarCode.Trim();
private void TrunksIousOutInStoreForm_FormClosed(object sender, FormClosedEventArgs e)
{
// BarCode.Stop();
// BarCode.Stop();
}
@ -642,8 +642,11 @@ var code = barCode.BarCode.Trim();
{
// MessageBox.Show(barCodes.BarCode);
doInsertUnSubmit(barCodes.BarCode, "", null);
// MessageBox.Show(barCodes.BarCode);
var code = UrlUtil.GetBarCode(barCodes.BarCode.ToLower().Trim());
var goodsName = UrlUtil.GetGoodsName(barCodes.BarCode.ToLower());
doInsertUnSubmit(code, goodsName, null);
barCodes.StringBuilder = new StringBuilder();
}
}


Loading…
Cancel
Save