宁红钢
3 years ago
1133 changed files with 158611 additions and 0 deletions
@ -0,0 +1,266 @@ |
|||
## Ignore Visual Studio temporary files, build results, and |
|||
## files generated by popular Visual Studio add-ons. |
|||
|
|||
# User-specific files |
|||
*.suo |
|||
*.user |
|||
*.userosscache |
|||
*.sln.docstates |
|||
|
|||
# User-specific files (MonoDevelop/Xamarin Studio) |
|||
*.userprefs |
|||
|
|||
# Build results |
|||
[Dd]ebug/ |
|||
[Dd]ebugPublic/ |
|||
[Rr]elease/ |
|||
[Rr]eleases/ |
|||
x64/ |
|||
x86/ |
|||
bld/ |
|||
[Bb]in/ |
|||
[Oo]bj/ |
|||
[Ll]og/ |
|||
|
|||
# Visual Studio 2015 cache/options directory |
|||
.vs/ |
|||
# Uncomment if you have tasks that create the project's static files in wwwroot |
|||
#wwwroot/ |
|||
|
|||
# MSTest test Results |
|||
[Tt]est[Rr]esult*/ |
|||
[Bb]uild[Ll]og.* |
|||
|
|||
# NUNIT |
|||
*.VisualState.xml |
|||
TestResult.xml |
|||
|
|||
# Build Results of an ATL Project |
|||
[Dd]ebugPS/ |
|||
[Rr]eleasePS/ |
|||
dlldata.c |
|||
|
|||
# DNX |
|||
project.lock.json |
|||
project.fragment.lock.json |
|||
artifacts/ |
|||
|
|||
*_i.c |
|||
*_p.c |
|||
*_i.h |
|||
*.ilk |
|||
*.meta |
|||
*.obj |
|||
*.pch |
|||
*.pdb |
|||
*.pgc |
|||
*.pgd |
|||
*.rsp |
|||
*.sbr |
|||
*.tlb |
|||
*.tli |
|||
*.tlh |
|||
*.tmp |
|||
*.tmp_proj |
|||
*.log |
|||
*.vspscc |
|||
*.vssscc |
|||
.builds |
|||
*.pidb |
|||
*.svclog |
|||
*.scc |
|||
|
|||
# Chutzpah Test files |
|||
_Chutzpah* |
|||
|
|||
# Visual C++ cache files |
|||
ipch/ |
|||
*.aps |
|||
*.ncb |
|||
*.opendb |
|||
*.opensdf |
|||
*.sdf |
|||
*.cachefile |
|||
*.VC.db |
|||
*.VC.VC.opendb |
|||
|
|||
# Visual Studio profiler |
|||
*.psess |
|||
*.vsp |
|||
*.vspx |
|||
*.sap |
|||
|
|||
# TFS 2012 Local Workspace |
|||
$tf/ |
|||
|
|||
# Guidance Automation Toolkit |
|||
*.gpState |
|||
|
|||
# ReSharper is a .NET coding add-in |
|||
_ReSharper*/ |
|||
*.[Rr]e[Ss]harper |
|||
*.DotSettings.user |
|||
|
|||
# JustCode is a .NET coding add-in |
|||
.JustCode |
|||
|
|||
# TeamCity is a build add-in |
|||
_TeamCity* |
|||
|
|||
# DotCover is a Code Coverage Tool |
|||
*.dotCover |
|||
|
|||
# NCrunch |
|||
_NCrunch_* |
|||
.*crunch*.local.xml |
|||
nCrunchTemp_* |
|||
|
|||
# MightyMoose |
|||
*.mm.* |
|||
AutoTest.Net/ |
|||
|
|||
# Web workbench (sass) |
|||
.sass-cache/ |
|||
|
|||
# Installshield output folder |
|||
[Ee]xpress/ |
|||
|
|||
# DocProject is a documentation generator add-in |
|||
DocProject/buildhelp/ |
|||
DocProject/Help/*.HxT |
|||
DocProject/Help/*.HxC |
|||
DocProject/Help/*.hhc |
|||
DocProject/Help/*.hhk |
|||
DocProject/Help/*.hhp |
|||
DocProject/Help/Html2 |
|||
DocProject/Help/html |
|||
|
|||
# Click-Once directory |
|||
publish/ |
|||
|
|||
# Publish Web Output |
|||
*.[Pp]ublish.xml |
|||
*.azurePubxml |
|||
# TODO: Comment the next line if you want to checkin your web deploy settings |
|||
# but database connection strings (with potential passwords) will be unencrypted |
|||
#*.pubxml |
|||
*.publishproj |
|||
|
|||
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
|||
# checkin your Azure Web App publish settings, but sensitive information contained |
|||
# in these scripts will be unencrypted |
|||
PublishScripts/ |
|||
|
|||
# NuGet Packages |
|||
*.nupkg |
|||
# The packages folder can be ignored because of Package Restore |
|||
**/packages/* |
|||
# except build/, which is used as an MSBuild target. |
|||
!**/packages/build/ |
|||
# Uncomment if necessary however generally it will be regenerated when needed |
|||
#!**/packages/repositories.config |
|||
# NuGet v3's project.json files produces more ignoreable files |
|||
*.nuget.props |
|||
*.nuget.targets |
|||
|
|||
# Microsoft Azure Build Output |
|||
csx/ |
|||
*.build.csdef |
|||
|
|||
# Microsoft Azure Emulator |
|||
ecf/ |
|||
rcf/ |
|||
|
|||
# Windows Store app package directories and files |
|||
AppPackages/ |
|||
BundleArtifacts/ |
|||
Package.StoreAssociation.xml |
|||
_pkginfo.txt |
|||
|
|||
# Visual Studio cache files |
|||
# files ending in .cache can be ignored |
|||
*.[Cc]ache |
|||
# but keep track of directories ending in .cache |
|||
!*.[Cc]ache/ |
|||
|
|||
# Others |
|||
ClientBin/ |
|||
~$* |
|||
*~ |
|||
*.dbmdl |
|||
*.dbproj.schemaview |
|||
*.jfm |
|||
*.pfx |
|||
*.publishsettings |
|||
node_modules/ |
|||
orleans.codegen.cs |
|||
|
|||
# Since there are multiple workflows, uncomment next line to ignore bower_components |
|||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
|||
#bower_components/ |
|||
|
|||
# RIA/Silverlight projects |
|||
Generated_Code/ |
|||
|
|||
# Backup & report files from converting an old project file |
|||
# to a newer Visual Studio version. Backup files are not needed, |
|||
# because we have git ;-) |
|||
_UpgradeReport_Files/ |
|||
Backup*/ |
|||
UpgradeLog*.XML |
|||
UpgradeLog*.htm |
|||
|
|||
# SQL Server files |
|||
*.mdf |
|||
*.ldf |
|||
|
|||
# Business Intelligence projects |
|||
*.rdl.data |
|||
*.bim.layout |
|||
*.bim_*.settings |
|||
|
|||
# Microsoft Fakes |
|||
FakesAssemblies/ |
|||
|
|||
# GhostDoc plugin setting file |
|||
*.GhostDoc.xml |
|||
|
|||
# Node.js Tools for Visual Studio |
|||
.ntvs_analysis.dat |
|||
|
|||
# Visual Studio 6 build log |
|||
*.plg |
|||
|
|||
# Visual Studio 6 workspace options file |
|||
*.opt |
|||
|
|||
# Visual Studio LightSwitch build output |
|||
**/*.HTMLClient/GeneratedArtifacts |
|||
**/*.DesktopClient/GeneratedArtifacts |
|||
**/*.DesktopClient/ModelManifest.xml |
|||
**/*.Server/GeneratedArtifacts |
|||
**/*.Server/ModelManifest.xml |
|||
_Pvt_Extensions |
|||
|
|||
# Paket dependency manager |
|||
.paket/paket.exe |
|||
paket-files/ |
|||
|
|||
# FAKE - F# Make |
|||
.fake/ |
|||
|
|||
# JetBrains Rider |
|||
.idea/ |
|||
*.sln.iml |
|||
|
|||
# CodeRush |
|||
.cr/ |
|||
|
|||
# Python Tools for Visual Studio (PTVS) |
|||
__pycache__/ |
|||
*.pyc |
|||
/OpenAuth.Mvc/Properties/PublishProfiles |
|||
*.pubxml |
|||
/OpenAuth.WebApi/temp-keys |
|||
/OpenAuthPro_3_1/Client/dist.rar |
|||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,50 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class F_Message |
|||
{ |
|||
private static PDAForm.Comm.PDAService.Service service; |
|||
static F_Message() |
|||
{ |
|||
service = new PDAForm.Comm.PDAService.Service(); |
|||
service.Url = MyAppconfig.GetValue("WebService"); |
|||
} |
|||
|
|||
public static DataSet ServiceMessage(DataSet dsCommand) |
|||
{ |
|||
string ErrMessage = ""; |
|||
try |
|||
{ |
|||
DataSet dsResult = service.ServiceMessage(dsCommand, null, ref ErrMessage); |
|||
if (ErrMessage != "") throw new Exception(ErrMessage); |
|||
|
|||
return dsResult; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
public static DataSet ServiceMessage(DataSet dsCommand, DataSet dsData) |
|||
{ |
|||
string ErrMessage = ""; |
|||
try |
|||
{ |
|||
DataSet dsResult = service.ServiceMessage(dsCommand, dsData, ref ErrMessage); |
|||
if (ErrMessage != "") throw new Exception(ErrMessage); |
|||
|
|||
return dsResult; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Net; |
|||
using System.Net.Sockets; |
|||
using System.IO; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class F_Socket |
|||
{ |
|||
public static void Send(string msg) |
|||
{ |
|||
string PrintServer = MyAppconfig.GetValue("PrintServer"); |
|||
if (PrintServer == "") throw new Exception("未配置打印服务器的IP地址!"); |
|||
|
|||
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
|||
IPAddress ip = IPAddress.Parse(PrintServer); |
|||
IPEndPoint ipoint = new IPEndPoint(ip, 8001); |
|||
socket.Connect(ipoint); |
|||
|
|||
byte[] buffer = Encoding.UTF8.GetBytes(msg); |
|||
socket.Send(buffer); |
|||
socket.Close(); |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,319 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.IO; |
|||
using System.Collections; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MD5 |
|||
{ |
|||
//static state variables
|
|||
private static UInt32 A; |
|||
private static UInt32 B; |
|||
private static UInt32 C; |
|||
private static UInt32 D; |
|||
|
|||
//number of bits to rotate in tranforming
|
|||
private const int S11 = 7; |
|||
private const int S12 = 12; |
|||
private const int S13 = 17; |
|||
private const int S14 = 22; |
|||
private const int S21 = 5; |
|||
private const int S22 = 9; |
|||
private const int S23 = 14; |
|||
private const int S24 = 20; |
|||
private const int S31 = 4; |
|||
private const int S32 = 11; |
|||
private const int S33 = 16; |
|||
private const int S34 = 23; |
|||
private const int S41 = 6; |
|||
private const int S42 = 10; |
|||
private const int S43 = 15; |
|||
private const int S44 = 21; |
|||
|
|||
|
|||
/* F, G, H and I are basic MD5 functions. |
|||
* 四个非线性函数: |
|||
* |
|||
* F(X,Y,Z) =(X&Y)|((~X)&Z) |
|||
* G(X,Y,Z) =(X&Z)|(Y&(~Z)) |
|||
* H(X,Y,Z) =X^Y^Z |
|||
* I(X,Y,Z)=Y^(X|(~Z)) |
|||
* |
|||
* (&与,|或,~非,^异或) |
|||
*/ |
|||
private static UInt32 F(UInt32 x, UInt32 y, UInt32 z) |
|||
{ |
|||
return (x & y) | ((~x) & z); |
|||
} |
|||
private static UInt32 G(UInt32 x, UInt32 y, UInt32 z) |
|||
{ |
|||
return (x & z) | (y & (~z)); |
|||
} |
|||
private static UInt32 H(UInt32 x, UInt32 y, UInt32 z) |
|||
{ |
|||
return x ^ y ^ z; |
|||
} |
|||
private static UInt32 I(UInt32 x, UInt32 y, UInt32 z) |
|||
{ |
|||
return y ^ (x | (~z)); |
|||
} |
|||
|
|||
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. |
|||
* Rotation is separate from addition to prevent recomputation. |
|||
*/ |
|||
private static void FF(ref UInt32 a, UInt32 b, UInt32 c, UInt32 d, UInt32 mj, int s, UInt32 ti) |
|||
{ |
|||
a = a + F(b, c, d) + mj + ti; |
|||
a = a << s | a >> (32 - s); |
|||
a += b; |
|||
} |
|||
private static void GG(ref UInt32 a, UInt32 b, UInt32 c, UInt32 d, UInt32 mj, int s, UInt32 ti) |
|||
{ |
|||
a = a + G(b, c, d) + mj + ti; |
|||
a = a << s | a >> (32 - s); |
|||
a += b; |
|||
} |
|||
private static void HH(ref UInt32 a, UInt32 b, UInt32 c, UInt32 d, UInt32 mj, int s, UInt32 ti) |
|||
{ |
|||
a = a + H(b, c, d) + mj + ti; |
|||
a = a << s | a >> (32 - s); |
|||
a += b; |
|||
} |
|||
private static void II(ref UInt32 a, UInt32 b, UInt32 c, UInt32 d, UInt32 mj, int s, UInt32 ti) |
|||
{ |
|||
a = a + I(b, c, d) + mj + ti; |
|||
a = a << s | a >> (32 - s); |
|||
a += b; |
|||
} |
|||
|
|||
private static void MD5_Init() |
|||
{ |
|||
A = 0x67452301; //in memory, this is 0x01234567
|
|||
B = 0xefcdab89; //in memory, this is 0x89abcdef
|
|||
C = 0x98badcfe; //in memory, this is 0xfedcba98
|
|||
D = 0x10325476; //in memory, this is 0x76543210
|
|||
} |
|||
|
|||
private static UInt32[] MD5_Append(byte[] input) |
|||
{ |
|||
int zeros = 0; |
|||
int ones = 1; |
|||
int size = 0; |
|||
int n = input.Length; |
|||
int m = n % 64; |
|||
if (m < 56) |
|||
{ |
|||
zeros = 55 - m; |
|||
size = n - m + 64; |
|||
} |
|||
else if (m == 56) |
|||
{ |
|||
zeros = 0; |
|||
ones = 0; |
|||
size = n + 8; |
|||
} |
|||
else |
|||
{ |
|||
zeros = 63 - m + 56; |
|||
size = n + 64 - m + 64; |
|||
} |
|||
|
|||
ArrayList bs = new ArrayList(input); |
|||
if (ones == 1) |
|||
{ |
|||
bs.Add((byte)0x80); // 0x80 = $10000000
|
|||
} |
|||
for (int i = 0; i < zeros; i++) |
|||
{ |
|||
bs.Add((byte)0); |
|||
} |
|||
|
|||
UInt64 N = (UInt64)n * 8; |
|||
byte h1 = (byte)(N & 0xFF); |
|||
byte h2 = (byte)((N >> 8) & 0xFF); |
|||
byte h3 = (byte)((N >> 16) & 0xFF); |
|||
byte h4 = (byte)((N >> 24) & 0xFF); |
|||
byte h5 = (byte)((N >> 32) & 0xFF); |
|||
byte h6 = (byte)((N >> 40) & 0xFF); |
|||
byte h7 = (byte)((N >> 48) & 0xFF); |
|||
byte h8 = (byte)(N >> 56); |
|||
bs.Add(h1); |
|||
bs.Add(h2); |
|||
bs.Add(h3); |
|||
bs.Add(h4); |
|||
bs.Add(h5); |
|||
bs.Add(h6); |
|||
bs.Add(h7); |
|||
bs.Add(h8); |
|||
byte[] ts = (byte[])bs.ToArray(typeof(byte)); |
|||
|
|||
/* Decodes input (byte[]) into output (UInt32[]). Assumes len is |
|||
* a multiple of 4. |
|||
*/ |
|||
UInt32[] output = new UInt32[size / 4]; |
|||
for (Int64 i = 0, j = 0; i < size; j++, i += 4) |
|||
{ |
|||
output[j] = (UInt32)(ts[i] | ts[i + 1] << 8 | ts[i + 2] << 16 | ts[i + 3] << 24); |
|||
} |
|||
return output; |
|||
} |
|||
|
|||
private static UInt32[] MD5_Trasform(UInt32[] x) |
|||
{ |
|||
|
|||
UInt32 a, b, c, d; |
|||
|
|||
for (int k = 0; k < x.Length; k += 16) |
|||
{ |
|||
a = A; |
|||
b = B; |
|||
c = C; |
|||
d = D; |
|||
|
|||
/* Round 1 */ |
|||
FF(ref a, b, c, d, x[k + 0], S11, 0xd76aa478); /* 1 */ |
|||
FF(ref d, a, b, c, x[k + 1], S12, 0xe8c7b756); /* 2 */ |
|||
FF(ref c, d, a, b, x[k + 2], S13, 0x242070db); /* 3 */ |
|||
FF(ref b, c, d, a, x[k + 3], S14, 0xc1bdceee); /* 4 */ |
|||
FF(ref a, b, c, d, x[k + 4], S11, 0xf57c0faf); /* 5 */ |
|||
FF(ref d, a, b, c, x[k + 5], S12, 0x4787c62a); /* 6 */ |
|||
FF(ref c, d, a, b, x[k + 6], S13, 0xa8304613); /* 7 */ |
|||
FF(ref b, c, d, a, x[k + 7], S14, 0xfd469501); /* 8 */ |
|||
FF(ref a, b, c, d, x[k + 8], S11, 0x698098d8); /* 9 */ |
|||
FF(ref d, a, b, c, x[k + 9], S12, 0x8b44f7af); /* 10 */ |
|||
FF(ref c, d, a, b, x[k + 10], S13, 0xffff5bb1); /* 11 */ |
|||
FF(ref b, c, d, a, x[k + 11], S14, 0x895cd7be); /* 12 */ |
|||
FF(ref a, b, c, d, x[k + 12], S11, 0x6b901122); /* 13 */ |
|||
FF(ref d, a, b, c, x[k + 13], S12, 0xfd987193); /* 14 */ |
|||
FF(ref c, d, a, b, x[k + 14], S13, 0xa679438e); /* 15 */ |
|||
FF(ref b, c, d, a, x[k + 15], S14, 0x49b40821); /* 16 */ |
|||
|
|||
/* Round 2 */ |
|||
GG(ref a, b, c, d, x[k + 1], S21, 0xf61e2562); /* 17 */ |
|||
GG(ref d, a, b, c, x[k + 6], S22, 0xc040b340); /* 18 */ |
|||
GG(ref c, d, a, b, x[k + 11], S23, 0x265e5a51); /* 19 */ |
|||
GG(ref b, c, d, a, x[k + 0], S24, 0xe9b6c7aa); /* 20 */ |
|||
GG(ref a, b, c, d, x[k + 5], S21, 0xd62f105d); /* 21 */ |
|||
GG(ref d, a, b, c, x[k + 10], S22, 0x2441453); /* 22 */ |
|||
GG(ref c, d, a, b, x[k + 15], S23, 0xd8a1e681); /* 23 */ |
|||
GG(ref b, c, d, a, x[k + 4], S24, 0xe7d3fbc8); /* 24 */ |
|||
GG(ref a, b, c, d, x[k + 9], S21, 0x21e1cde6); /* 25 */ |
|||
GG(ref d, a, b, c, x[k + 14], S22, 0xc33707d6); /* 26 */ |
|||
GG(ref c, d, a, b, x[k + 3], S23, 0xf4d50d87); /* 27 */ |
|||
GG(ref b, c, d, a, x[k + 8], S24, 0x455a14ed); /* 28 */ |
|||
GG(ref a, b, c, d, x[k + 13], S21, 0xa9e3e905); /* 29 */ |
|||
GG(ref d, a, b, c, x[k + 2], S22, 0xfcefa3f8); /* 30 */ |
|||
GG(ref c, d, a, b, x[k + 7], S23, 0x676f02d9); /* 31 */ |
|||
GG(ref b, c, d, a, x[k + 12], S24, 0x8d2a4c8a); /* 32 */ |
|||
|
|||
/* Round 3 */ |
|||
HH(ref a, b, c, d, x[k + 5], S31, 0xfffa3942); /* 33 */ |
|||
HH(ref d, a, b, c, x[k + 8], S32, 0x8771f681); /* 34 */ |
|||
HH(ref c, d, a, b, x[k + 11], S33, 0x6d9d6122); /* 35 */ |
|||
HH(ref b, c, d, a, x[k + 14], S34, 0xfde5380c); /* 36 */ |
|||
HH(ref a, b, c, d, x[k + 1], S31, 0xa4beea44); /* 37 */ |
|||
HH(ref d, a, b, c, x[k + 4], S32, 0x4bdecfa9); /* 38 */ |
|||
HH(ref c, d, a, b, x[k + 7], S33, 0xf6bb4b60); /* 39 */ |
|||
HH(ref b, c, d, a, x[k + 10], S34, 0xbebfbc70); /* 40 */ |
|||
HH(ref a, b, c, d, x[k + 13], S31, 0x289b7ec6); /* 41 */ |
|||
HH(ref d, a, b, c, x[k + 0], S32, 0xeaa127fa); /* 42 */ |
|||
HH(ref c, d, a, b, x[k + 3], S33, 0xd4ef3085); /* 43 */ |
|||
HH(ref b, c, d, a, x[k + 6], S34, 0x4881d05); /* 44 */ |
|||
HH(ref a, b, c, d, x[k + 9], S31, 0xd9d4d039); /* 45 */ |
|||
HH(ref d, a, b, c, x[k + 12], S32, 0xe6db99e5); /* 46 */ |
|||
HH(ref c, d, a, b, x[k + 15], S33, 0x1fa27cf8); /* 47 */ |
|||
HH(ref b, c, d, a, x[k + 2], S34, 0xc4ac5665); /* 48 */ |
|||
|
|||
/* Round 4 */ |
|||
II(ref a, b, c, d, x[k + 0], S41, 0xf4292244); /* 49 */ |
|||
II(ref d, a, b, c, x[k + 7], S42, 0x432aff97); /* 50 */ |
|||
II(ref c, d, a, b, x[k + 14], S43, 0xab9423a7); /* 51 */ |
|||
II(ref b, c, d, a, x[k + 5], S44, 0xfc93a039); /* 52 */ |
|||
II(ref a, b, c, d, x[k + 12], S41, 0x655b59c3); /* 53 */ |
|||
II(ref d, a, b, c, x[k + 3], S42, 0x8f0ccc92); /* 54 */ |
|||
II(ref c, d, a, b, x[k + 10], S43, 0xffeff47d); /* 55 */ |
|||
II(ref b, c, d, a, x[k + 1], S44, 0x85845dd1); /* 56 */ |
|||
II(ref a, b, c, d, x[k + 8], S41, 0x6fa87e4f); /* 57 */ |
|||
II(ref d, a, b, c, x[k + 15], S42, 0xfe2ce6e0); /* 58 */ |
|||
II(ref c, d, a, b, x[k + 6], S43, 0xa3014314); /* 59 */ |
|||
II(ref b, c, d, a, x[k + 13], S44, 0x4e0811a1); /* 60 */ |
|||
II(ref a, b, c, d, x[k + 4], S41, 0xf7537e82); /* 61 */ |
|||
II(ref d, a, b, c, x[k + 11], S42, 0xbd3af235); /* 62 */ |
|||
II(ref c, d, a, b, x[k + 2], S43, 0x2ad7d2bb); /* 63 */ |
|||
II(ref b, c, d, a, x[k + 9], S44, 0xeb86d391); /* 64 */ |
|||
|
|||
A += a; |
|||
B += b; |
|||
C += c; |
|||
D += d; |
|||
} |
|||
return new UInt32[] { A, B, C, D }; |
|||
} |
|||
|
|||
|
|||
public static byte[] MD5Array(byte[] input) |
|||
{ |
|||
MD5_Init(); |
|||
UInt32[] block = MD5_Append(input); |
|||
UInt32[] bits = MD5_Trasform(block); |
|||
|
|||
/* Encodes bits (UInt32[]) into output (byte[]). Assumes len is |
|||
* a multiple of 4. |
|||
*/ |
|||
byte[] output = new byte[bits.Length * 4]; |
|||
for (int i = 0, j = 0; i < bits.Length; i++, j += 4) |
|||
{ |
|||
output[j] = (byte)(bits[i] & 0xff); |
|||
output[j + 1] = (byte)((bits[i] >> 8) & 0xff); |
|||
output[j + 2] = (byte)((bits[i] >> 16) & 0xff); |
|||
output[j + 3] = (byte)((bits[i] >> 24) & 0xff); |
|||
} |
|||
return output; |
|||
} |
|||
|
|||
public static string ArrayToHexString(byte[] array, bool uppercase) |
|||
{ |
|||
string hexString = ""; |
|||
string format = "x2"; |
|||
if (uppercase) |
|||
{ |
|||
format = "X2"; |
|||
} |
|||
foreach (byte b in array) |
|||
{ |
|||
hexString += b.ToString(format); |
|||
} |
|||
return hexString; |
|||
} |
|||
|
|||
public static string MDString(string message) |
|||
{ |
|||
char[] c = message.ToCharArray(); |
|||
byte[] b = new byte[c.Length]; |
|||
for (int i = 0; i < c.Length; i++) |
|||
{ |
|||
b[i] = (byte)c[i]; |
|||
} |
|||
byte[] digest = MD5Array(b); |
|||
return ArrayToHexString(digest, false); |
|||
} |
|||
public static string MDFile(string fileName) |
|||
{ |
|||
FileStream fs = File.Open(fileName, FileMode.Open, FileAccess.Read); |
|||
byte[] array = new byte[fs.Length]; |
|||
fs.Read(array, 0, (int)fs.Length); |
|||
byte[] digest = MD5Array(array); |
|||
fs.Close(); |
|||
return ArrayToHexString(digest, false); |
|||
} |
|||
|
|||
public static string Test(string message) |
|||
{ |
|||
return MD5.MDString(message); |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,107 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
|
|||
using System.Windows.Forms; |
|||
using System.IO; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MyAppconfig |
|||
{ |
|||
private static DataSet dsData = null; |
|||
private static string patch = string.Empty; |
|||
static MyAppconfig() |
|||
{ |
|||
try |
|||
{ |
|||
patch = MyFileManager.GetApplicationPath() + @"PDAForm.xml"; |
|||
dsData = new DataSet(); |
|||
|
|||
if (!File.Exists(patch)) |
|||
{ |
|||
dsData = new DataSet(); |
|||
|
|||
DataTable dtConfig = new DataTable("ConfigList"); |
|||
dtConfig.Columns.Add("Name"); |
|||
dtConfig.Columns.Add("Value"); |
|||
|
|||
dsData.Tables.Add(dtConfig); |
|||
dsData.WriteXml(patch); |
|||
} |
|||
else |
|||
{ |
|||
dsData.ReadXml(patch); |
|||
} |
|||
} |
|||
catch { } |
|||
} |
|||
|
|||
public static string GetValue(string name) |
|||
{ |
|||
try |
|||
{ |
|||
DataRow[] drs = dsData.Tables[0].Select("Name='" + name.Trim() + "'"); |
|||
if (drs.Length > 0) |
|||
{ |
|||
return drs[0]["Value"].ToString().Trim(); |
|||
} |
|||
else |
|||
{ |
|||
return ""; |
|||
} |
|||
} |
|||
catch |
|||
{ |
|||
return ""; |
|||
} |
|||
|
|||
} |
|||
|
|||
public static void SetValue(string name, string configvalue) |
|||
{ |
|||
try |
|||
{ |
|||
DataRow[] drs = dsData.Tables[0].Select("Name='" + name.Trim() + "'"); |
|||
|
|||
if (drs.Length == 0) |
|||
{ |
|||
DataRow dr = dsData.Tables[0].NewRow(); |
|||
dr["Name"] = name; |
|||
dr["Value"] = configvalue; |
|||
dsData.Tables[0].Rows.Add(dr); |
|||
} |
|||
else |
|||
{ |
|||
drs[0]["Value"] = configvalue; |
|||
} |
|||
|
|||
dsData.WriteXml(patch); |
|||
} |
|||
catch { } |
|||
} |
|||
|
|||
private static DataTable GetTable() |
|||
{ |
|||
if (dsData != null) |
|||
{ |
|||
return dsData.Tables[0]; |
|||
} |
|||
else |
|||
{ |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
private static void Save() |
|||
{ |
|||
try |
|||
{ |
|||
dsData.WriteXml(patch); |
|||
} |
|||
catch { } |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MyCommand |
|||
{ |
|||
private DataSet dsCommand; |
|||
private DataTable dtCommand; |
|||
|
|||
public MyCommand(string Cmd, string Pars) |
|||
{ |
|||
dsCommand = new DataSet(); |
|||
dtCommand = new DataTable("Command"); |
|||
dtCommand.Columns.Add("Cmd"); |
|||
dtCommand.Columns.Add("Pars"); |
|||
DataRow dr = dtCommand.NewRow(); |
|||
dr["Cmd"] = Cmd; |
|||
dr["Pars"] = Pars; |
|||
dtCommand.Rows.Add(dr); |
|||
dsCommand.Tables.Add(dtCommand); |
|||
} |
|||
|
|||
public DataSet GetCommand() |
|||
{ |
|||
return dsCommand; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.IO; |
|||
using System.Reflection; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MyFileManager |
|||
{ |
|||
/// <summary>
|
|||
/// 读取当前应用程序的路径
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public static string GetApplicationPath() |
|||
{ |
|||
string path; |
|||
path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); |
|||
path = path.Replace(@"file:\", ""); |
|||
if (path.Substring(path.Length - 1, 1) != @"\") |
|||
{ |
|||
path += @"\"; |
|||
} |
|||
return path; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Text.RegularExpressions; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MyMath |
|||
{ |
|||
/// <summary>
|
|||
/// 判断是否为整数型
|
|||
/// </summary>
|
|||
/// <param name="inString"></param>
|
|||
/// <returns></returns>
|
|||
public static bool IsInt(string inString) |
|||
{ |
|||
Regex regex = new Regex("^[0-9]*[0-9][0-9]*$"); |
|||
return regex.IsMatch(inString.Trim()); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 判断是否为浮点型
|
|||
/// </summary>
|
|||
/// <param name="inString"></param>
|
|||
/// <returns></returns>
|
|||
public static bool IsFloat(string inString) |
|||
{ |
|||
Regex regex = new Regex(@"^\d*\.?\d*$"); |
|||
return regex.IsMatch(inString.Trim()); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public class MyMessageBox |
|||
{ |
|||
public static void ShowErrorMessage(string MessageInfo) |
|||
{ |
|||
MessageBox.Show(MessageInfo, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); |
|||
} |
|||
|
|||
public static void ShowInfoMessage(string MessageInfo) |
|||
{ |
|||
MessageBox.Show(MessageInfo, "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); |
|||
} |
|||
|
|||
public static bool ShowQuestion(string MessageInfo) |
|||
{ |
|||
bool result = false; |
|||
if (MessageBox.Show(MessageInfo, "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) |
|||
{ |
|||
result = true; |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,125 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{7A2139CA-5092-4E9A-800E-ED548DE86BC9}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>PDAForm.Comm</RootNamespace> |
|||
<AssemblyName>PDAForm.Comm</AssemblyName> |
|||
<ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<PlatformFamilyName>WindowsCE</PlatformFamilyName> |
|||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID> |
|||
<OSVersion>5.00</OSVersion> |
|||
<DeployDirSuffix>PDAForm.Comm</DeployDirSuffix> |
|||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> |
|||
<FormFactorID> |
|||
</FormFactorID> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE;$(PlatformFamilyName)</DefineConstants> |
|||
<NoStdLib>true</NoStdLib> |
|||
<NoConfig>true</NoConfig> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<FileAlignment>512</FileAlignment> |
|||
<WarningLevel>4</WarningLevel> |
|||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants> |
|||
<NoStdLib>true</NoStdLib> |
|||
<NoConfig>true</NoConfig> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<FileAlignment>512</FileAlignment> |
|||
<WarningLevel>4</WarningLevel> |
|||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Web.Services" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="frmSetServer.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="frmSetServer.Designer.cs"> |
|||
<DependentUpon>frmSetServer.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="F_Message.cs" /> |
|||
<Compile Include="F_Socket.cs" /> |
|||
<Compile Include="MD5.cs" /> |
|||
<Compile Include="MyAppconfig.cs" /> |
|||
<Compile Include="MyCommand.cs" /> |
|||
<Compile Include="MyFileManager.cs" /> |
|||
<Compile Include="MyMath.cs" /> |
|||
<Compile Include="MyMessageBox.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="Web References\PDAService\Reference.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DesignTime>True</DesignTime> |
|||
<DependentUpon>Reference.map</DependentUpon> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<WebReferences Include="Web References\" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<WebReferenceUrl Include="http://192.168.0.11:1010/Service.asmx"> |
|||
<UrlBehavior>Static</UrlBehavior> |
|||
<RelPath>Web References\PDAService\</RelPath> |
|||
<UpdateFromURL>http://192.168.0.11:1010/Service.asmx</UpdateFromURL> |
|||
<ServiceLocationURL> |
|||
</ServiceLocationURL> |
|||
<CachedDynamicPropName> |
|||
</CachedDynamicPropName> |
|||
<CachedAppSettingsObjectName> |
|||
</CachedAppSettingsObjectName> |
|||
<CachedSettingsPropName> |
|||
</CachedSettingsPropName> |
|||
</WebReferenceUrl> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="Web References\PDAService\Reference.map"> |
|||
<Generator>MSDiscoCodeGenerator</Generator> |
|||
<LastGenOutput>Reference.cs</LastGenOutput> |
|||
</None> |
|||
<None Include="Web References\PDAService\Service.disco" /> |
|||
<None Include="Web References\PDAService\Service.wsdl" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<EmbeddedResource Include="frmSetServer.resx"> |
|||
<DependentUpon>frmSetServer.cs</DependentUpon> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
</ItemGroup> |
|||
<Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> |
|||
<Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> |
|||
<ProjectExtensions> |
|||
<VisualStudio> |
|||
<FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"> |
|||
<HostingProcess disable="1" /> |
|||
</FlavorProperties> |
|||
</VisualStudio> |
|||
</ProjectExtensions> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
@ -0,0 +1,35 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的常规信息通过下列属性集
|
|||
// 控制。更改这些属性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("PDAForm.Comm")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("Microsoft")] |
|||
[assembly: AssemblyProduct("PDAForm.Comm")] |
|||
[assembly: AssemblyCopyright("版权所有 (C) Microsoft 2010")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
|||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
|||
// 则将该类型上的 ComVisible 属性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("60fa876d-9403-4668-88eb-dedc03edb681")] |
|||
|
|||
// 程序集的版本信息由下面四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 内部版本号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
|
|||
// 方法是按如下所示使用“*”:
|
|||
[assembly: AssemblyVersion("1.0.*")] |
|||
|
@ -0,0 +1,79 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
// 运行时版本:2.0.50727.4952
|
|||
//
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
|||
// 重新生成代码,这些更改将会丢失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
//
|
|||
// 此源代码是由 Microsoft.CompactFramework.Design.Data 2.0.50727.4952 版自动生成。
|
|||
//
|
|||
namespace PDAForm.Comm.PDAService { |
|||
using System.Diagnostics; |
|||
using System.Web.Services; |
|||
using System.ComponentModel; |
|||
using System.Web.Services.Protocols; |
|||
using System; |
|||
using System.Xml.Serialization; |
|||
using System.Data; |
|||
|
|||
|
|||
/// <remarks/>
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.ComponentModel.DesignerCategoryAttribute("code")] |
|||
[System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://tempuri.org/")] |
|||
public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol { |
|||
|
|||
/// <remarks/>
|
|||
public Service() { |
|||
this.Url = "http://192.168.0.11:1010/Service.asmx"; |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] |
|||
public string HelloWorld() { |
|||
object[] results = this.Invoke("HelloWorld", new object[0]); |
|||
return ((string)(results[0])); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
public System.IAsyncResult BeginHelloWorld(System.AsyncCallback callback, object asyncState) { |
|||
return this.BeginInvoke("HelloWorld", new object[0], callback, asyncState); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
public string EndHelloWorld(System.IAsyncResult asyncResult) { |
|||
object[] results = this.EndInvoke(asyncResult); |
|||
return ((string)(results[0])); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ServiceMessage", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] |
|||
public System.Data.DataSet ServiceMessage(System.Data.DataSet dsCommand, System.Data.DataSet dsData, ref string ErrMessage) { |
|||
object[] results = this.Invoke("ServiceMessage", new object[] { |
|||
dsCommand, |
|||
dsData, |
|||
ErrMessage}); |
|||
ErrMessage = ((string)(results[1])); |
|||
return ((System.Data.DataSet)(results[0])); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
public System.IAsyncResult BeginServiceMessage(System.Data.DataSet dsCommand, System.Data.DataSet dsData, string ErrMessage, System.AsyncCallback callback, object asyncState) { |
|||
return this.BeginInvoke("ServiceMessage", new object[] { |
|||
dsCommand, |
|||
dsData, |
|||
ErrMessage}, callback, asyncState); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
public System.Data.DataSet EndServiceMessage(System.IAsyncResult asyncResult, out string ErrMessage) { |
|||
object[] results = this.EndInvoke(asyncResult); |
|||
ErrMessage = ((string)(results[1])); |
|||
return ((System.Data.DataSet)(results[0])); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|||
<Results> |
|||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://192.168.0.11:1010/Service.asmx?disco" filename="Service.disco" /> |
|||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://192.168.0.11:1010/Service.asmx?wsdl" filename="Service.wsdl" /> |
|||
</Results> |
|||
</DiscoveryClientResultsFile> |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> |
|||
<contractRef ref="http://192.168.0.11:1010/Service.asmx?wsdl" docRef="http://192.168.0.11:1010/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> |
|||
<soap address="http://192.168.0.11:1010/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> |
|||
<soap address="http://192.168.0.11:1010/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> |
|||
</discovery> |
@ -0,0 +1,127 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> |
|||
<wsdl:types> |
|||
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> |
|||
<s:element name="HelloWorld"> |
|||
<s:complexType /> |
|||
</s:element> |
|||
<s:element name="HelloWorldResponse"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
<s:element name="ServiceMessage"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element minOccurs="0" maxOccurs="1" name="dsCommand"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element ref="s:schema" /> |
|||
<s:any /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
<s:element minOccurs="0" maxOccurs="1" name="dsData"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element ref="s:schema" /> |
|||
<s:any /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
<s:element minOccurs="0" maxOccurs="1" name="ErrMessage" type="s:string" /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
<s:element name="ServiceMessageResponse"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element minOccurs="0" maxOccurs="1" name="ServiceMessageResult"> |
|||
<s:complexType> |
|||
<s:sequence> |
|||
<s:element ref="s:schema" /> |
|||
<s:any /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
<s:element minOccurs="0" maxOccurs="1" name="ErrMessage" type="s:string" /> |
|||
</s:sequence> |
|||
</s:complexType> |
|||
</s:element> |
|||
</s:schema> |
|||
</wsdl:types> |
|||
<wsdl:message name="HelloWorldSoapIn"> |
|||
<wsdl:part name="parameters" element="tns:HelloWorld" /> |
|||
</wsdl:message> |
|||
<wsdl:message name="HelloWorldSoapOut"> |
|||
<wsdl:part name="parameters" element="tns:HelloWorldResponse" /> |
|||
</wsdl:message> |
|||
<wsdl:message name="ServiceMessageSoapIn"> |
|||
<wsdl:part name="parameters" element="tns:ServiceMessage" /> |
|||
</wsdl:message> |
|||
<wsdl:message name="ServiceMessageSoapOut"> |
|||
<wsdl:part name="parameters" element="tns:ServiceMessageResponse" /> |
|||
</wsdl:message> |
|||
<wsdl:portType name="ServiceSoap"> |
|||
<wsdl:operation name="HelloWorld"> |
|||
<wsdl:input message="tns:HelloWorldSoapIn" /> |
|||
<wsdl:output message="tns:HelloWorldSoapOut" /> |
|||
</wsdl:operation> |
|||
<wsdl:operation name="ServiceMessage"> |
|||
<wsdl:input message="tns:ServiceMessageSoapIn" /> |
|||
<wsdl:output message="tns:ServiceMessageSoapOut" /> |
|||
</wsdl:operation> |
|||
</wsdl:portType> |
|||
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> |
|||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> |
|||
<wsdl:operation name="HelloWorld"> |
|||
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" /> |
|||
<wsdl:input> |
|||
<soap:body use="literal" /> |
|||
</wsdl:input> |
|||
<wsdl:output> |
|||
<soap:body use="literal" /> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
<wsdl:operation name="ServiceMessage"> |
|||
<soap:operation soapAction="http://tempuri.org/ServiceMessage" style="document" /> |
|||
<wsdl:input> |
|||
<soap:body use="literal" /> |
|||
</wsdl:input> |
|||
<wsdl:output> |
|||
<soap:body use="literal" /> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> |
|||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> |
|||
<wsdl:operation name="HelloWorld"> |
|||
<soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" /> |
|||
<wsdl:input> |
|||
<soap12:body use="literal" /> |
|||
</wsdl:input> |
|||
<wsdl:output> |
|||
<soap12:body use="literal" /> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
<wsdl:operation name="ServiceMessage"> |
|||
<soap12:operation soapAction="http://tempuri.org/ServiceMessage" style="document" /> |
|||
<wsdl:input> |
|||
<soap12:body use="literal" /> |
|||
</wsdl:input> |
|||
<wsdl:output> |
|||
<soap12:body use="literal" /> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
<wsdl:service name="Service"> |
|||
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> |
|||
<soap:address location="http://192.168.0.11:1010/Service.asmx" /> |
|||
</wsdl:port> |
|||
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> |
|||
<soap12:address location="http://192.168.0.11:1010/Service.asmx" /> |
|||
</wsdl:port> |
|||
</wsdl:service> |
|||
</wsdl:definitions> |
@ -0,0 +1,110 @@ |
|||
namespace PDAForm.Comm |
|||
{ |
|||
partial class frmSetServer |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtWebService = new System.Windows.Forms.TextBox(); |
|||
this.btnTest = new System.Windows.Forms.Button(); |
|||
this.btnSave = new System.Windows.Forms.Button(); |
|||
this.btnClose = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(18, 67); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(140, 20); |
|||
this.label1.Text = "设置服务器地址:"; |
|||
//
|
|||
// txtWebService
|
|||
//
|
|||
this.txtWebService.Location = new System.Drawing.Point(18, 91); |
|||
this.txtWebService.Multiline = true; |
|||
this.txtWebService.Name = "txtWebService"; |
|||
this.txtWebService.Size = new System.Drawing.Size(203, 77); |
|||
this.txtWebService.TabIndex = 1; |
|||
//
|
|||
// btnTest
|
|||
//
|
|||
this.btnTest.Location = new System.Drawing.Point(18, 174); |
|||
this.btnTest.Name = "btnTest"; |
|||
this.btnTest.Size = new System.Drawing.Size(57, 29); |
|||
this.btnTest.TabIndex = 10; |
|||
this.btnTest.Text = "测试"; |
|||
this.btnTest.Click += new System.EventHandler(this.btnTest_Click); |
|||
//
|
|||
// btnSave
|
|||
//
|
|||
this.btnSave.Location = new System.Drawing.Point(91, 174); |
|||
this.btnSave.Name = "btnSave"; |
|||
this.btnSave.Size = new System.Drawing.Size(57, 29); |
|||
this.btnSave.TabIndex = 11; |
|||
this.btnSave.Text = "保存"; |
|||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click); |
|||
//
|
|||
// btnClose
|
|||
//
|
|||
this.btnClose.Location = new System.Drawing.Point(164, 174); |
|||
this.btnClose.Name = "btnClose"; |
|||
this.btnClose.Size = new System.Drawing.Size(57, 29); |
|||
this.btnClose.TabIndex = 12; |
|||
this.btnClose.Text = "关闭"; |
|||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); |
|||
//
|
|||
// frmSetServer
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.btnClose); |
|||
this.Controls.Add(this.btnSave); |
|||
this.Controls.Add(this.btnTest); |
|||
this.Controls.Add(this.txtWebService); |
|||
this.Controls.Add(this.label1); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmSetServer"; |
|||
this.Text = "服务器设置"; |
|||
this.Load += new System.EventHandler(this.frmSetServer_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox txtWebService; |
|||
private System.Windows.Forms.Button btnTest; |
|||
private System.Windows.Forms.Button btnSave; |
|||
private System.Windows.Forms.Button btnClose; |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Comm |
|||
{ |
|||
public partial class frmSetServer : Form |
|||
{ |
|||
public frmSetServer() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmSetServer_Load(object sender, EventArgs e) |
|||
{ |
|||
this.txtWebService.Text = MyAppconfig.GetValue("WebService"); |
|||
} |
|||
|
|||
private void btnTest_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
PDAForm.Comm.PDAService.Service service = new PDAForm.Comm.PDAService.Service(); |
|||
service.Url = this.txtWebService.Text; |
|||
if (service.HelloWorld() == "Hello World") |
|||
{ |
|||
MyMessageBox.ShowInfoMessage("测试成功!"); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("测试失败,详细原因如下:\r\n" + ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnSave_Click(object sender, EventArgs e) |
|||
{ |
|||
if (this.txtWebService.Text.Trim() != "") |
|||
{ |
|||
MyAppconfig.SetValue("WebService", this.txtWebService.Text.Trim()); |
|||
MyMessageBox.ShowInfoMessage("设置成功,重启程序生效!"); |
|||
} |
|||
else |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("请行输入服务器连接地址!"); |
|||
} |
|||
} |
|||
|
|||
private void btnClose_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,78 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{865F1158-A388-47F7-962F-91F803139A39}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>PDAForm.SDK</RootNamespace> |
|||
<AssemblyName>PDAForm.SDK</AssemblyName> |
|||
<ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<PlatformFamilyName>WindowsCE</PlatformFamilyName> |
|||
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID> |
|||
<OSVersion>5.00</OSVersion> |
|||
<DeployDirSuffix>PDAForm.SDK</DeployDirSuffix> |
|||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> |
|||
<FormFactorID> |
|||
</FormFactorID> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE;$(PlatformFamilyName)</DefineConstants> |
|||
<NoStdLib>true</NoStdLib> |
|||
<NoConfig>true</NoConfig> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<FileAlignment>512</FileAlignment> |
|||
<WarningLevel>4</WarningLevel> |
|||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants> |
|||
<NoStdLib>true</NoStdLib> |
|||
<NoConfig>true</NoConfig> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<FileAlignment>512</FileAlignment> |
|||
<WarningLevel>4</WarningLevel> |
|||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="ScanerBase.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\PDAForm.Comm\PDAForm.Comm.csproj"> |
|||
<Project>{7A2139CA-5092-4E9A-800E-ED548DE86BC9}</Project> |
|||
<Name>PDAForm.Comm</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> |
|||
<Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> |
|||
<ProjectExtensions> |
|||
<VisualStudio> |
|||
<FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"> |
|||
<HostingProcess disable="1" /> |
|||
</FlavorProperties> |
|||
</VisualStudio> |
|||
</ProjectExtensions> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
@ -0,0 +1,35 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的常规信息通过下列属性集
|
|||
// 控制。更改这些属性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("PDAForm.SDK")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("Microsoft")] |
|||
[assembly: AssemblyProduct("PDAForm.SDK")] |
|||
[assembly: AssemblyCopyright("版权所有 (C) Microsoft 2010")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
|||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
|||
// 则将该类型上的 ComVisible 属性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("cd4edb79-99a3-4b20-8838-3fa955398923")] |
|||
|
|||
// 程序集的版本信息由下面四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 内部版本号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
|
|||
// 方法是按如下所示使用“*”:
|
|||
[assembly: AssemblyVersion("1.0.*")] |
|||
|
@ -0,0 +1,50 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.SDK |
|||
{ |
|||
public class ScanerBase |
|||
{ |
|||
public delegate void MyEventHandler(string ScanData); //委托
|
|||
//public event MyEventHandler onData; //事件
|
|||
|
|||
public bool Enabled = true; //是否允许使用
|
|||
|
|||
public ScanerBase() |
|||
{ |
|||
if (MyAppconfig.GetValue("PDA_Run") == "False") |
|||
{ |
|||
Enabled = false; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 打开扫描头
|
|||
/// </summary>
|
|||
public virtual void Open() |
|||
{ |
|||
if (Enabled) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 关闭扫描头
|
|||
/// </summary>
|
|||
public virtual void Close() |
|||
{ |
|||
if (Enabled) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDAForm", "PDAForm\PDAForm.csproj", "{6B9249A0-CACF-4DBB-8281-EF43C9078100}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDAForm.SDK", "PDAForm.SDK\PDAForm.SDK.csproj", "{865F1158-A388-47F7-962F-91F803139A39}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDAForm.Comm", "PDAForm.Comm\PDAForm.Comm.csproj", "{7A2139CA-5092-4E9A-800E-ED548DE86BC9}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Debug|Any CPU.Deploy.0 = Debug|Any CPU |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{6B9249A0-CACF-4DBB-8281-EF43C9078100}.Release|Any CPU.Deploy.0 = Release|Any CPU |
|||
{865F1158-A388-47F7-962F-91F803139A39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{865F1158-A388-47F7-962F-91F803139A39}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{865F1158-A388-47F7-962F-91F803139A39}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{865F1158-A388-47F7-962F-91F803139A39}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{7A2139CA-5092-4E9A-800E-ED548DE86BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{7A2139CA-5092-4E9A-800E-ED548DE86BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{7A2139CA-5092-4E9A-800E-ED548DE86BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{7A2139CA-5092-4E9A-800E-ED548DE86BC9}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
@ -0,0 +1,59 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using System.Data; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.AsnBill |
|||
{ |
|||
public class F_AsnBill |
|||
{ |
|||
//单据编号
|
|||
public string BillNo = ""; |
|||
public string billType = "ASNBill"; |
|||
public DataSet dsBill = null; |
|||
|
|||
/// <summary>
|
|||
/// 新建单据
|
|||
/// </summary>
|
|||
public void BillNew(DataGrid dg) |
|||
{ |
|||
string Cmd = "BILL_NEW_" + billType; |
|||
string Pars = BillNo + ";" + UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dg.DataSource = dsBill.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["PackageNo"].HeaderText = "装箱单号"; |
|||
dg.TableStyles[0].GridColumnStyles["PackageNo"].Width = 150; |
|||
dg.TableStyles[0].GridColumnStyles["IsCheck"].HeaderText = "是否扫描"; |
|||
dg.TableStyles[0].GridColumnStyles["AsnNumber"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["IsShipingVerification"].Width = 0; |
|||
|
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 提交单据
|
|||
/// </summary>
|
|||
public void BillSubmit() |
|||
{ |
|||
string Cmd = "BILL_SUBMIT_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBill); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,156 @@ |
|||
namespace PDAForm.Bill.AsnBill |
|||
{ |
|||
partial class frmAsnBill |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtBillNo = new System.Windows.Forms.TextBox(); |
|||
this.txtBarCode = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.btnSubmit = new System.Windows.Forms.Button(); |
|||
this.btnExit = new System.Windows.Forms.Button(); |
|||
this.btnDelete = new System.Windows.Forms.Button(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(2, 58); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(234, 165); |
|||
this.dgShow.TabIndex = 3; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(3, 6); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "ASN编号:"; |
|||
//
|
|||
// txtBillNo
|
|||
//
|
|||
this.txtBillNo.Location = new System.Drawing.Point(76, 2); |
|||
this.txtBillNo.MaxLength = 30; |
|||
this.txtBillNo.Name = "txtBillNo"; |
|||
this.txtBillNo.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBillNo.TabIndex = 0; |
|||
this.txtBillNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBillNo_KeyDown); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Location = new System.Drawing.Point(76, 29); |
|||
this.txtBarCode.MaxLength = 40; |
|||
this.txtBarCode.Name = "txtBarCode"; |
|||
this.txtBarCode.Size = new System.Drawing.Size(159, 23); |
|||
this.txtBarCode.TabIndex = 2; |
|||
this.txtBarCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode_KeyDown); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(3, 32); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "装箱单号:"; |
|||
//
|
|||
// btnSubmit
|
|||
//
|
|||
this.btnSubmit.Location = new System.Drawing.Point(7, 241); |
|||
this.btnSubmit.Name = "btnSubmit"; |
|||
this.btnSubmit.Size = new System.Drawing.Size(72, 33); |
|||
this.btnSubmit.TabIndex = 4; |
|||
this.btnSubmit.Text = "提交数据"; |
|||
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); |
|||
//
|
|||
// btnExit
|
|||
//
|
|||
this.btnExit.Location = new System.Drawing.Point(163, 241); |
|||
this.btnExit.Name = "btnExit"; |
|||
this.btnExit.Size = new System.Drawing.Size(72, 33); |
|||
this.btnExit.TabIndex = 5; |
|||
this.btnExit.Text = "返回主菜单"; |
|||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click); |
|||
//
|
|||
// btnDelete
|
|||
//
|
|||
this.btnDelete.Location = new System.Drawing.Point(85, 241); |
|||
this.btnDelete.Name = "btnDelete"; |
|||
this.btnDelete.Size = new System.Drawing.Size(72, 33); |
|||
this.btnDelete.TabIndex = 14; |
|||
this.btnDelete.Text = "删除记录"; |
|||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.lblState.Location = new System.Drawing.Point(5, 225); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(228, 15); |
|||
this.lblState.TextAlign = System.Drawing.ContentAlignment.TopCenter; |
|||
//
|
|||
// frmAsnBill
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtBarCode); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.btnDelete); |
|||
this.Controls.Add(this.btnExit); |
|||
this.Controls.Add(this.btnSubmit); |
|||
this.Controls.Add(this.txtBillNo); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.lblState); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmAsnBill"; |
|||
this.Text = "发货校验"; |
|||
this.Load += new System.EventHandler(this.frmVerify_Load); |
|||
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmVerify_Closing); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox txtBillNo; |
|||
private System.Windows.Forms.TextBox txtBarCode; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.Button btnSubmit; |
|||
private System.Windows.Forms.Button btnExit; |
|||
private System.Windows.Forms.Button btnDelete; |
|||
private System.Windows.Forms.Label lblState; |
|||
} |
|||
} |
@ -0,0 +1,197 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.SelectComm; |
|||
|
|||
namespace PDAForm.Bill.AsnBill |
|||
{ |
|||
public partial class frmAsnBill : Form |
|||
{ |
|||
public F_AsnBill m_base = null; |
|||
public frmAsnBill() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmVerify_Load(object sender, EventArgs e) |
|||
{ |
|||
this.txtBillNo.Focus(); |
|||
} |
|||
|
|||
private void txtBillNo_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (this.txtBillNo.Text.Trim() == "") |
|||
{ |
|||
throw new Exception("ASN编号不能为空!"); |
|||
} |
|||
|
|||
this.txtBillNo.Enabled = false; |
|||
this.Update(); |
|||
m_base = new F_AsnBill(); |
|||
m_base.BillNo = this.txtBillNo.Text.Trim(); |
|||
m_base.BillNew(this.dgShow); |
|||
|
|||
Total(); |
|||
|
|||
this.txtBillNo.Enabled = true; |
|||
} |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
m_base = null; |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBillNo.Enabled = true; |
|||
this.txtBillNo.Focus(); |
|||
this.txtBillNo.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
private void txtBarCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (m_base == null) throw new Exception("请选扫ASN编号!"); |
|||
|
|||
string BarCode = this.txtBarCode.Text.Trim(); |
|||
if (BarCode.Length < 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("装箱单号不能为空!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
DataRow[] drs = m_base.dsBill.Tables[0].Select("[PackageNo]='" + BarCode + "'"); |
|||
if (drs.Length == 0) |
|||
{ |
|||
throw new Exception("装箱单号 " + BarCode + " 在系统中不存在"); |
|||
} |
|||
|
|||
if (Convert.ToInt32(drs[0]["IsCheck"]) == 1) |
|||
{ |
|||
throw new Exception("装箱单号 " + BarCode + " 重复扫描"); |
|||
} |
|||
|
|||
drs[0]["IsCheck"] = 1; |
|||
|
|||
Total(); |
|||
|
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
private void btnSubmit_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
this.btnSubmit.Enabled = false; |
|||
this.Update(); |
|||
|
|||
if (m_base == null) throw new Exception("没有需要提示的数据!"); |
|||
if (MyMessageBox.ShowQuestion("是否要提交数据?")) |
|||
{ |
|||
if (m_base.dsBill.Tables[0].Select("[IsCheck]=0").Length > 0) |
|||
{ |
|||
throw new Exception("有未扫描记录!"); |
|||
} |
|||
|
|||
|
|||
m_base.BillSubmit(); |
|||
m_base = null; |
|||
Total(); |
|||
|
|||
this.txtBillNo.Text = ""; |
|||
this.txtBarCode.Text = ""; |
|||
this.dgShow.DataSource = null; |
|||
MyMessageBox.ShowInfoMessage("数据提交成功!"); |
|||
this.txtBillNo.Focus(); |
|||
this.txtBillNo.SelectAll(); |
|||
|
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
finally |
|||
{ |
|||
this.btnSubmit.Enabled = true; |
|||
} |
|||
} |
|||
|
|||
private void btnDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (m_base == null) throw new Exception("请选扫描ASN单号!"); |
|||
|
|||
if (MyMessageBox.ShowQuestion("是否要删除选择的记录!")) |
|||
{ |
|||
m_base.dsBill.Tables[0].Rows[dgShow.CurrentRowIndex]["BarCode"] = ""; |
|||
|
|||
Total(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnExit_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void frmVerify_Closing(object sender, CancelEventArgs e) |
|||
{ |
|||
if (m_base != null) |
|||
{ |
|||
if (!MyMessageBox.ShowQuestion("未提交数据,是否要退出!")) e.Cancel = true; |
|||
} |
|||
} |
|||
|
|||
private void Total() |
|||
{ |
|||
if (m_base == null) |
|||
{ |
|||
this.lblState.Text = ""; |
|||
} |
|||
else |
|||
{ |
|||
int a1 = m_base.dsBill.Tables[0].Rows.Count; |
|||
int a2 = m_base.dsBill.Tables[0].Select("[IsCheck]=1").Length; |
|||
|
|||
this.lblState.Text = a2 + "/" + a1; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,100 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
public class F_BillBarCode : F_BillBase |
|||
{ |
|||
public DataSet dsLocation = null; |
|||
public F_BillBarCode() |
|||
{ |
|||
this.billType = "BarCode"; |
|||
this.billName = "条码扫描"; |
|||
} |
|||
|
|||
public override void BillList(System.Windows.Forms.DataGrid dg) |
|||
{ |
|||
base.BillList(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].HeaderText = "单据号"; |
|||
dg.TableStyles[0].GridColumnStyles["Type"].HeaderText = "扫描类型"; |
|||
dg.TableStyles[0].GridColumnStyles["QtyTotal"].HeaderText = "单据数量"; |
|||
dg.TableStyles[0].GridColumnStyles["BillTime"].HeaderText = "单据时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Memo"].HeaderText = "备注"; |
|||
dg.TableStyles[0].GridColumnStyles["UserName"].HeaderText = "操作员"; |
|||
} |
|||
|
|||
public override void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["AddTime"].HeaderText = "扫描时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Name"].HeaderText = "名称"; |
|||
dg.TableStyles[0].GridColumnStyles["State"].HeaderText = "状态/代码"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCodeID"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["RejectCode"].HeaderText = "报废原因"; |
|||
dg.TableStyles[0].GridColumnStyles["Type"].HeaderText = "类型"; |
|||
dg.TableStyles[0].GridColumnStyles["BatchYqj"].HeaderText = "油漆件批次"; |
|||
dg.TableStyles[0].GridColumnStyles["SupplierYqj"].HeaderText = "面漆供应商"; |
|||
dg.TableStyles[0].GridColumnStyles["SupplierYqj1"].HeaderText = "清漆供应商"; |
|||
dg.TableStyles[0].GridColumnStyles["SupplierYqj2"].HeaderText = "底漆供应商"; |
|||
|
|||
|
|||
} |
|||
|
|||
public void LocationList(string Code, string Batch, int Qty, string BillNo) |
|||
{ |
|||
//string StockAreaCode = UserInfo.UserStockArea;
|
|||
string StockAreaCode = dsBill.Tables["BillHead"].Rows[0]["StockAreaCode"].ToString(); |
|||
string Cmd = "BILL_LOCATION_LIST_" + billType; |
|||
string Pars = Code + ";" + Batch + ";" + Qty + ";" + BillNo + ";" + StockAreaCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsLocation = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public void LocationView(DataGrid dg) |
|||
{ |
|||
dg.DataSource = dsLocation.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsLocation.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["Location"].HeaderText = "库位"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "剩余容量"; |
|||
} |
|||
|
|||
public void LocationExit(string Location) |
|||
{ |
|||
if (dsLocation.Tables[0].Select("[Location]='" + Location + "'").Length <= 0) |
|||
{ |
|||
throw new Exception(Location + " 不在优先库位之列!"); |
|||
} |
|||
} |
|||
|
|||
public void LocationExit(string Location, int Qty) |
|||
{ |
|||
if (dsLocation.Tables[0].Select("[Location]='" + Location + "' and [Qty]>=" + Qty).Length <= 0) |
|||
{ |
|||
throw new Exception("数量不能大于库位指定的容量!"); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
partial class frmBarCode |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.txtType = new System.Windows.Forms.TextBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Location = new System.Drawing.Point(4, 85); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "扫描类别:"; |
|||
//
|
|||
// txtType
|
|||
//
|
|||
this.txtType.Location = new System.Drawing.Point(80, 83); |
|||
this.txtType.Name = "txtType"; |
|||
this.txtType.ReadOnly = true; |
|||
this.txtType.Size = new System.Drawing.Size(154, 23); |
|||
this.txtType.TabIndex = 23; |
|||
//
|
|||
// frmBarCode
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = false; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtType); |
|||
this.Controls.Add(this.label4); |
|||
this.Name = "frmBarCode"; |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtType, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label4; |
|||
private System.Windows.Forms.TextBox txtType; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
public partial class frmBarCode : PDAForm.Bill.frmBillBase |
|||
{ |
|||
public frmBarCode() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override void BillBind() |
|||
{ |
|||
base.BillBind(); |
|||
this.txtType.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["Type"].ToString(); |
|||
} |
|||
|
|||
public override void BillClear() |
|||
{ |
|||
base.BillClear(); |
|||
this.txtType.Text = ""; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,97 @@ |
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
partial class frmBarCodeNew |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtType = new System.Windows.Forms.ComboBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtMemo
|
|||
//
|
|||
this.txtMemo.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtMemo.Location = new System.Drawing.Point(82, 35); |
|||
this.txtMemo.Size = new System.Drawing.Size(144, 23); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(8, 39); |
|||
//
|
|||
// txtBillTypeU8Code
|
|||
//
|
|||
this.txtBillTypeU8Code.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBillTypeU8Code.Location = new System.Drawing.Point(72, 147); |
|||
this.txtBillTypeU8Code.Size = new System.Drawing.Size(151, 23); |
|||
this.txtBillTypeU8Code.Visible = false; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(8, 150); |
|||
this.label3.Visible = false; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(7, 9); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "扫描类别:"; |
|||
//
|
|||
// txtType
|
|||
//
|
|||
this.txtType.Location = new System.Drawing.Point(82, 4); |
|||
this.txtType.Name = "txtType"; |
|||
this.txtType.Size = new System.Drawing.Size(143, 23); |
|||
this.txtType.TabIndex = 33; |
|||
//
|
|||
// frmBarCodeNew
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtType); |
|||
this.Controls.Add(this.label1); |
|||
this.Name = "frmBarCodeNew"; |
|||
this.Load += new System.EventHandler(this.frmConverNew_Load); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.label3, 0); |
|||
this.Controls.SetChildIndex(this.txtBillTypeU8Code, 0); |
|||
this.Controls.SetChildIndex(this.txtMemo, 0); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.txtType, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.ComboBox txtType; |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.SelectComm; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
public partial class frmBarCodeNew : PDAForm.Bill.frmBillNewBase |
|||
{ |
|||
public frmBarCodeNew() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override string BillNew() |
|||
{ |
|||
string Memo = this.txtMemo.Text.Trim(); |
|||
string Type = this.txtType.Text.Trim(); |
|||
|
|||
if (Type == "") throw new Exception("请选择扫描类别!"); |
|||
|
|||
string Pars = Memo + ";" + UserInfo.UserName + ";" + Type; |
|||
return Pars; |
|||
} |
|||
|
|||
private void frmConverNew_Load(object sender, EventArgs e) |
|||
{ |
|||
//this.txtType.Items.Add("塑件");
|
|||
this.txtType.Items.Add("上线"); |
|||
//this.txtType.Items.Add("下线颜色附加");
|
|||
//this.txtType.Items.Add("油漆件");
|
|||
//this.txtType.Items.Add("装配件");
|
|||
this.txtType.Items.Add("待定品处理"); |
|||
this.txtType.Items.Add("退货"); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,227 @@ |
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
partial class frmBarCodeScan |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.lblName = new System.Windows.Forms.Label(); |
|||
this.txtName = new System.Windows.Forms.ComboBox(); |
|||
this.btnDel = new System.Windows.Forms.Button(); |
|||
this.lblRejectCode = new System.Windows.Forms.Label(); |
|||
this.txtRejectCode = new System.Windows.Forms.ComboBox(); |
|||
this.lblBatchYqj = new System.Windows.Forms.Label(); |
|||
this.txtBatchYqj = new System.Windows.Forms.TextBox(); |
|||
this.txtRejectCodeType = new System.Windows.Forms.ComboBox(); |
|||
this.btnSupplierYqj = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBarCode.Location = new System.Drawing.Point(53, 29); |
|||
this.txtBarCode.Size = new System.Drawing.Size(182, 23); |
|||
//
|
|||
// btnSave
|
|||
//
|
|||
this.btnSave.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// txtQty
|
|||
//
|
|||
this.txtQty.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtQty.Location = new System.Drawing.Point(113, 105); |
|||
this.txtQty.Size = new System.Drawing.Size(58, 23); |
|||
//
|
|||
// ctrProduct1
|
|||
//
|
|||
this.ctrProduct1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular); |
|||
this.ctrProduct1.Location = new System.Drawing.Point(7, 100); |
|||
this.ctrProduct1.Size = new System.Drawing.Size(228, 77); |
|||
this.ctrProduct1.Visible = false; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(7, 34); |
|||
this.label2.Text = "条码:"; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label1.Location = new System.Drawing.Point(53, 105); |
|||
this.label1.Visible = false; |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(4, 100); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(231, 106); |
|||
this.dgShow.TabIndex = 21; |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(113, 208); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(122, 22); |
|||
this.lblState.Text = "记录:0"; |
|||
//
|
|||
// lblName
|
|||
//
|
|||
this.lblName.Location = new System.Drawing.Point(7, 7); |
|||
this.lblName.Name = "lblName"; |
|||
this.lblName.Size = new System.Drawing.Size(100, 20); |
|||
this.lblName.Text = "名称:"; |
|||
//
|
|||
// txtName
|
|||
//
|
|||
this.txtName.Location = new System.Drawing.Point(53, 1); |
|||
this.txtName.Name = "txtName"; |
|||
this.txtName.Size = new System.Drawing.Size(182, 23); |
|||
this.txtName.TabIndex = 34; |
|||
this.txtName.SelectedIndexChanged += new System.EventHandler(this.txtName_SelectedIndexChanged); |
|||
//
|
|||
// btnDel
|
|||
//
|
|||
this.btnDel.Location = new System.Drawing.Point(4, 206); |
|||
this.btnDel.Name = "btnDel"; |
|||
this.btnDel.Size = new System.Drawing.Size(70, 22); |
|||
this.btnDel.TabIndex = 37; |
|||
this.btnDel.Text = "删除"; |
|||
this.btnDel.Click += new System.EventHandler(this.btnDel_Click); |
|||
//
|
|||
// lblRejectCode
|
|||
//
|
|||
this.lblRejectCode.Location = new System.Drawing.Point(7, 61); |
|||
this.lblRejectCode.Name = "lblRejectCode"; |
|||
this.lblRejectCode.Size = new System.Drawing.Size(100, 20); |
|||
this.lblRejectCode.Text = "原因:"; |
|||
this.lblRejectCode.Visible = false; |
|||
//
|
|||
// txtRejectCode
|
|||
//
|
|||
this.txtRejectCode.Location = new System.Drawing.Point(139, 57); |
|||
this.txtRejectCode.Name = "txtRejectCode"; |
|||
this.txtRejectCode.Size = new System.Drawing.Size(96, 23); |
|||
this.txtRejectCode.TabIndex = 41; |
|||
this.txtRejectCode.Visible = false; |
|||
//
|
|||
// lblBatchYqj
|
|||
//
|
|||
this.lblBatchYqj.Location = new System.Drawing.Point(4, 56); |
|||
this.lblBatchYqj.Name = "lblBatchYqj"; |
|||
this.lblBatchYqj.Size = new System.Drawing.Size(100, 20); |
|||
this.lblBatchYqj.Text = "油漆件批次:"; |
|||
this.lblBatchYqj.Visible = false; |
|||
//
|
|||
// txtBatchYqj
|
|||
//
|
|||
this.txtBatchYqj.Location = new System.Drawing.Point(96, 53); |
|||
this.txtBatchYqj.MaxLength = 6; |
|||
this.txtBatchYqj.Name = "txtBatchYqj"; |
|||
this.txtBatchYqj.Size = new System.Drawing.Size(139, 23); |
|||
this.txtBatchYqj.TabIndex = 46; |
|||
this.txtBatchYqj.Visible = false; |
|||
//
|
|||
// txtRejectCodeType
|
|||
//
|
|||
this.txtRejectCodeType.Location = new System.Drawing.Point(53, 56); |
|||
this.txtRejectCodeType.Name = "txtRejectCodeType"; |
|||
this.txtRejectCodeType.Size = new System.Drawing.Size(80, 23); |
|||
this.txtRejectCodeType.TabIndex = 51; |
|||
this.txtRejectCodeType.SelectedIndexChanged += new System.EventHandler(this.txtRejectCodeType_SelectedIndexChanged); |
|||
//
|
|||
// btnSupplierYqj
|
|||
//
|
|||
this.btnSupplierYqj.Location = new System.Drawing.Point(96, 77); |
|||
this.btnSupplierYqj.Name = "btnSupplierYqj"; |
|||
this.btnSupplierYqj.Size = new System.Drawing.Size(139, 22); |
|||
this.btnSupplierYqj.TabIndex = 60; |
|||
this.btnSupplierYqj.Text = "油漆供应商选择"; |
|||
this.btnSupplierYqj.Visible = false; |
|||
this.btnSupplierYqj.Click += new System.EventHandler(this.btnSupplierYqj_Click); |
|||
//
|
|||
// frmBarCodeScan
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.btnSupplierYqj); |
|||
this.Controls.Add(this.txtBatchYqj); |
|||
this.Controls.Add(this.lblBatchYqj); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.txtRejectCode); |
|||
this.Controls.Add(this.btnDel); |
|||
this.Controls.Add(this.txtName); |
|||
this.Controls.Add(this.lblName); |
|||
this.Controls.Add(this.lblState); |
|||
this.Controls.Add(this.txtRejectCodeType); |
|||
this.Controls.Add(this.lblRejectCode); |
|||
this.Name = "frmBarCodeScan"; |
|||
this.Load += new System.EventHandler(this.frmPackageScan_Load); |
|||
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmBarCodeScan_Closing); |
|||
this.Controls.SetChildIndex(this.lblRejectCode, 0); |
|||
this.Controls.SetChildIndex(this.txtRejectCodeType, 0); |
|||
this.Controls.SetChildIndex(this.lblState, 0); |
|||
this.Controls.SetChildIndex(this.lblName, 0); |
|||
this.Controls.SetChildIndex(this.txtName, 0); |
|||
this.Controls.SetChildIndex(this.btnDel, 0); |
|||
this.Controls.SetChildIndex(this.txtRejectCode, 0); |
|||
this.Controls.SetChildIndex(this.txtQty, 0); |
|||
this.Controls.SetChildIndex(this.ctrProduct1, 0); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.txtBarCode, 0); |
|||
this.Controls.SetChildIndex(this.btnSave, 0); |
|||
this.Controls.SetChildIndex(this.dgShow, 0); |
|||
this.Controls.SetChildIndex(this.lblBatchYqj, 0); |
|||
this.Controls.SetChildIndex(this.txtBatchYqj, 0); |
|||
this.Controls.SetChildIndex(this.btnSupplierYqj, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Label lblState; |
|||
private System.Windows.Forms.Label lblName; |
|||
private System.Windows.Forms.ComboBox txtName; |
|||
public System.Windows.Forms.Button btnDel; |
|||
private System.Windows.Forms.Label lblRejectCode; |
|||
private System.Windows.Forms.ComboBox txtRejectCode; |
|||
private System.Windows.Forms.Label lblBatchYqj; |
|||
private System.Windows.Forms.TextBox txtBatchYqj; |
|||
private System.Windows.Forms.ComboBox txtRejectCodeType; |
|||
private System.Windows.Forms.Button btnSupplierYqj; |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,258 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.Bill.Receive; |
|||
using PDAForm.SelectComm; |
|||
|
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
public partial class frmBarCodeScan : PDAForm.Bill.frmBillScanBase |
|||
{ |
|||
string SupplieYqjr = ""; |
|||
string SupplieYqjr1 = ""; |
|||
string SupplieYqjr2 = ""; |
|||
|
|||
public frmBarCodeScan() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public DataTable GetRejectTypeList() |
|||
{ |
|||
string Cmd = "REJECTTYPE_LIST"; |
|||
string Pars = ""; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()).Tables[0]; |
|||
} |
|||
|
|||
public DataTable GetRejectCodeList(string TypeCode) |
|||
{ |
|||
string Cmd = "REJECT_LIST"; |
|||
string Pars = TypeCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()).Tables[0]; |
|||
} |
|||
|
|||
private void frmPackageScan_Load(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
ShowView(); |
|||
|
|||
string Type = m_Base.dsBill.Tables["BillHead"].Rows[0]["Type"].ToString(); |
|||
|
|||
if (Type == "下线颜色附加") |
|||
{ |
|||
this.txtName.DataSource = F_BarCode.GetColorList().Tables[0]; |
|||
this.txtName.DisplayMember = "Name"; |
|||
this.txtName.ValueMember = "Code"; |
|||
|
|||
this.txtBatchYqj.Visible = true; |
|||
this.lblBatchYqj.Visible = true; |
|||
|
|||
this.btnSupplierYqj.Visible = true; |
|||
|
|||
|
|||
SupplieYqjr = MyAppconfig.GetValue("SupplieYqjr"); |
|||
SupplieYqjr1 = MyAppconfig.GetValue("SupplieYqjr1"); |
|||
SupplieYqjr2 = MyAppconfig.GetValue("SupplieYqjr2"); |
|||
|
|||
|
|||
} |
|||
else |
|||
{ |
|||
this.txtName.DataSource = F_BarCode.GetStateList(Type).Tables[0]; |
|||
this.txtName.DisplayMember = "State"; |
|||
this.txtName.ValueMember = ""; |
|||
} |
|||
|
|||
this.txtRejectCodeType.DataSource = GetRejectTypeList(); |
|||
this.txtRejectCodeType.DisplayMember = "Name"; |
|||
this.txtRejectCodeType.ValueMember = "Code"; |
|||
|
|||
|
|||
this.txtRejectCode.DataSource = GetRejectCodeList(""); |
|||
this.txtRejectCode.DisplayMember = "Name"; |
|||
this.txtRejectCode.ValueMember = "Code"; |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw new Exception(ex.Message); |
|||
} |
|||
} |
|||
|
|||
public override void ScanBarCode(string _BarCode) |
|||
{ |
|||
Save(); |
|||
} |
|||
|
|||
public override void Save() |
|||
{ |
|||
try |
|||
{ |
|||
string Type = m_Base.dsBill.Tables["BillHead"].Rows[0]["Type"].ToString(); |
|||
|
|||
string bar = this.txtBarCode.Text.Trim().ToUpper(); |
|||
if (bar == "") throw new Exception("条码不能为空!"); |
|||
F_BarCode f_bar = new F_BarCode(bar); |
|||
|
|||
if (Type == "上线") |
|||
{ |
|||
DataSet dsBarCodeState = F_BarCode.GetBarCodeState(bar, "塑件", "下线", "条码打印"); |
|||
f_bar.BarCode = bar; |
|||
f_bar.Code = dsBarCodeState.Tables[0].Rows[0]["ProductCode"].ToString(); |
|||
f_bar.Batch = dsBarCodeState.Tables[0].Rows[0]["Batch"].ToString(); |
|||
f_bar.Sn = bar.Substring(bar.Length - 4, 4); |
|||
} |
|||
|
|||
if (this.txtBatchYqj.Visible) |
|||
{ |
|||
if (this.txtBatchYqj.Text.Trim().Length != 6) |
|||
throw new Exception("请输入6位数字的油漆件条码!"); |
|||
try{ |
|||
Convert.ToInt32(this.txtBatchYqj.Text.Trim()); |
|||
}catch{ |
|||
throw new Exception("油漆件条码只能是数字!"); |
|||
} |
|||
} |
|||
|
|||
if (this.txtRejectCode.Visible) |
|||
{ |
|||
if (this.txtRejectCode.SelectedValue.ToString() == "") |
|||
throw new Exception("必需选择报废原因!"); |
|||
} |
|||
|
|||
DataRow drData = m_Base.dsBill.Tables["BillDetail"].NewRow(); |
|||
drData["BillNo"] = m_Base.dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
drData["BarCode"] = f_bar.BarCode; |
|||
drData["ProductCode"] = f_bar.Code; |
|||
drData["Batch"] = f_bar.Batch; |
|||
drData["Name"] = this.txtName.Text.ToString(); |
|||
drData["RejectCode"] = this.txtRejectCode.SelectedValue.ToString(); |
|||
drData["BatchYqj"] = this.txtBatchYqj.Text.Trim(); |
|||
drData["SupplierYqj"] = SupplieYqjr; |
|||
drData["SupplierYqj1"] = SupplieYqjr1; |
|||
drData["SupplierYqj2"] = SupplieYqjr2; |
|||
|
|||
|
|||
|
|||
if (Type == "下线颜色附加") |
|||
{ |
|||
drData["State"] = this.txtName.SelectedValue.ToString(); |
|||
} |
|||
else |
|||
{ |
|||
drData["State"] = ""; |
|||
} |
|||
|
|||
m_Base.BillDetailAdd(drData); |
|||
|
|||
ShowView(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
finally |
|||
{ |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
public void ShowView() |
|||
{ |
|||
m_Base.BillDetailShowGrid(this.dgShow); |
|||
this.lblState.Text = "记录:" + m_Base.dsBill.Tables["BillDetail"].Rows.Count.ToString(); |
|||
} |
|||
|
|||
private void btnDel_Click(object sender, EventArgs e) |
|||
{ |
|||
this.btnDel.Enabled = false; |
|||
this.Update(); |
|||
try |
|||
{ |
|||
if (this.dgShow.CurrentRowIndex < 0) throw new Exception("请选择一行记录!"); |
|||
|
|||
if (MyMessageBox.ShowQuestion("是否要删除选择记录?")) |
|||
{ |
|||
string ID = m_Base.dsBill.Tables["BillDetail"].Rows[this.dgShow.CurrentRowIndex]["ID"].ToString(); |
|||
m_Base.BillDetailDel(ID); |
|||
m_Base.BillDetailShowGrid(this.dgShow); |
|||
this.lblState.Text = "记录:" + m_Base.dsBill.Tables["BillDetail"].Rows.Count.ToString(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
finally |
|||
{ |
|||
this.btnDel.Enabled = true; |
|||
} |
|||
|
|||
} |
|||
|
|||
private void txtName_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
if (this.txtName.Text.ToString() == "报废" || this.txtName.Text.ToString() == "不合格") |
|||
{ |
|||
this.txtRejectCodeType.Visible = true; |
|||
this.txtRejectCode.Visible = true; |
|||
this.lblRejectCode.Visible = true; |
|||
} |
|||
else |
|||
{ |
|||
this.txtRejectCodeType.Visible = false; |
|||
this.txtRejectCode.Visible = false; |
|||
this.lblRejectCode.Visible = false; |
|||
|
|||
this.txtRejectCodeType.SelectedValue = ""; |
|||
this.txtRejectCode.SelectedValue = ""; |
|||
|
|||
} |
|||
} |
|||
|
|||
private void txtRejectCodeType_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
this.txtRejectCode.DataSource = GetRejectCodeList(this.txtRejectCodeType.SelectedValue.ToString()); |
|||
this.txtRejectCode.DisplayMember = "Name"; |
|||
this.txtRejectCode.ValueMember = "Code"; |
|||
} |
|||
|
|||
private void frmBarCodeScan_Closing(object sender, CancelEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void btnSupplierYqj_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
frmSelectYqgys frm = new frmSelectYqgys(); |
|||
frm.ShowDialog(); |
|||
frm.Dispose(); |
|||
|
|||
SupplieYqjr = MyAppconfig.GetValue("SupplieYqjr"); |
|||
SupplieYqjr1 = MyAppconfig.GetValue("SupplieYqjr1"); |
|||
SupplieYqjr2 = MyAppconfig.GetValue("SupplieYqjr2"); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,136 @@ |
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
partial class frmSelectYqgys |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtSupplierYqj = new System.Windows.Forms.ComboBox(); |
|||
this.txtSupplierYqj1 = new System.Windows.Forms.ComboBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txtSupplierYqj2 = new System.Windows.Forms.ComboBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.btnOK = new System.Windows.Forms.Button(); |
|||
this.btnCancel = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(14, 31); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "面漆供应商:"; |
|||
//
|
|||
// txtSupplierYqj
|
|||
//
|
|||
this.txtSupplierYqj.Location = new System.Drawing.Point(14, 54); |
|||
this.txtSupplierYqj.Name = "txtSupplierYqj"; |
|||
this.txtSupplierYqj.Size = new System.Drawing.Size(206, 23); |
|||
this.txtSupplierYqj.TabIndex = 55; |
|||
//
|
|||
// txtSupplierYqj1
|
|||
//
|
|||
this.txtSupplierYqj1.Location = new System.Drawing.Point(14, 115); |
|||
this.txtSupplierYqj1.Name = "txtSupplierYqj1"; |
|||
this.txtSupplierYqj1.Size = new System.Drawing.Size(206, 23); |
|||
this.txtSupplierYqj1.TabIndex = 57; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(14, 92); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(100, 20); |
|||
this.label2.Text = "清漆供应商:"; |
|||
//
|
|||
// txtSupplierYqj2
|
|||
//
|
|||
this.txtSupplierYqj2.Location = new System.Drawing.Point(14, 174); |
|||
this.txtSupplierYqj2.Name = "txtSupplierYqj2"; |
|||
this.txtSupplierYqj2.Size = new System.Drawing.Size(206, 23); |
|||
this.txtSupplierYqj2.TabIndex = 60; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(14, 151); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "底漆供应商:"; |
|||
//
|
|||
// btnOK
|
|||
//
|
|||
this.btnOK.Location = new System.Drawing.Point(14, 216); |
|||
this.btnOK.Name = "btnOK"; |
|||
this.btnOK.Size = new System.Drawing.Size(78, 33); |
|||
this.btnOK.TabIndex = 62; |
|||
this.btnOK.Text = "确定"; |
|||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); |
|||
//
|
|||
// btnCancel
|
|||
//
|
|||
this.btnCancel.Location = new System.Drawing.Point(142, 216); |
|||
this.btnCancel.Name = "btnCancel"; |
|||
this.btnCancel.Size = new System.Drawing.Size(78, 33); |
|||
this.btnCancel.TabIndex = 63; |
|||
this.btnCancel.Text = "取消"; |
|||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); |
|||
//
|
|||
// frmSelectYqgys
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.btnCancel); |
|||
this.Controls.Add(this.btnOK); |
|||
this.Controls.Add(this.txtSupplierYqj2); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.txtSupplierYqj1); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.txtSupplierYqj); |
|||
this.Controls.Add(this.label1); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmSelectYqgys"; |
|||
this.Text = "油漆供应商选择"; |
|||
this.Load += new System.EventHandler(this.frmSelectYqgys_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.ComboBox txtSupplierYqj; |
|||
private System.Windows.Forms.ComboBox txtSupplierYqj1; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.ComboBox txtSupplierYqj2; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.Button btnOK; |
|||
private System.Windows.Forms.Button btnCancel; |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.SelectComm; |
|||
|
|||
namespace PDAForm.Bill.BarCode |
|||
{ |
|||
public partial class frmSelectYqgys : Form |
|||
{ |
|||
public frmSelectYqgys() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void btnOK_Click(object sender, EventArgs e) |
|||
{ |
|||
MyAppconfig.SetValue("SupplieYqjr", this.txtSupplierYqj.SelectedValue.ToString()); |
|||
MyAppconfig.SetValue("SupplieYqjr1", this.txtSupplierYqj1.SelectedValue.ToString()); |
|||
MyAppconfig.SetValue("SupplieYqjr2", this.txtSupplierYqj2.SelectedValue.ToString()); |
|||
|
|||
this.Close(); |
|||
} |
|||
|
|||
private void btnCancel_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void frmSelectYqgys_Load(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
DataTable dtSupplier = F_Update.GetDataSupplier().Tables[0].Clone(); |
|||
DataTable dtSupplier1 = F_Update.GetDataSupplier().Tables[0].Clone(); |
|||
DataTable dtSupplier2 = F_Update.GetDataSupplier().Tables[0].Clone(); |
|||
|
|||
DataRow[] drs = F_Update.GetDataSupplier().Tables[0].Select("[Groups]='ÓÍÆṩӦÉÌ'"); |
|||
foreach (DataRow dr in drs) |
|||
{ |
|||
dtSupplier.Rows.Add(dr.ItemArray); |
|||
dtSupplier1.Rows.Add(dr.ItemArray); |
|||
dtSupplier2.Rows.Add(dr.ItemArray); |
|||
} |
|||
|
|||
this.txtSupplierYqj.DataSource = dtSupplier; |
|||
this.txtSupplierYqj.DisplayMember = "Name"; |
|||
this.txtSupplierYqj.ValueMember = "Name"; |
|||
|
|||
this.txtSupplierYqj1.DataSource = dtSupplier1; |
|||
this.txtSupplierYqj1.DisplayMember = "Name"; |
|||
this.txtSupplierYqj1.ValueMember = "Name"; |
|||
|
|||
this.txtSupplierYqj2.DataSource = dtSupplier2; |
|||
this.txtSupplierYqj2.DisplayMember = "Name"; |
|||
this.txtSupplierYqj2.ValueMember = "Name"; |
|||
|
|||
string SupplieYqjr = MyAppconfig.GetValue("SupplieYqjr"); if (SupplieYqjr != "") this.txtSupplierYqj.SelectedValue = SupplieYqjr; |
|||
string SupplieYqjr1 = MyAppconfig.GetValue("SupplieYqjr1"); if (SupplieYqjr1 != "") this.txtSupplierYqj1.SelectedValue = SupplieYqjr1; |
|||
string SupplieYqjr2 = MyAppconfig.GetValue("SupplieYqjr2"); if (SupplieYqjr2 != "") this.txtSupplierYqj2.SelectedValue = SupplieYqjr2; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,107 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using System.Data; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
|
|||
namespace PDAForm.Bill.BarCodeBL |
|||
{ |
|||
public class F_RKBarCodeBL |
|||
{ |
|||
public static DataSet dsBill = null; |
|||
|
|||
public static void ShowGrid(DataGrid dg, string BillNo) |
|||
{ |
|||
string Cmd = "BARCODEBL_RK_NEWBILL"; |
|||
string Pars = BillNo + ";" + UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dg.DataSource = dsBill.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
|
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].Width = 0; |
|||
|
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].Width = 120; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
|
|||
dg.TableStyles[0].GridColumnStyles["BarCode1"].Width = 120; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode1"].HeaderText = "备料条码"; |
|||
|
|||
dg.TableStyles[0].GridColumnStyles["BarCode2"].Width = 120; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode2"].HeaderText = "油漆件条码"; |
|||
|
|||
dg.TableStyles[0].GridColumnStyles["BarCode3"].Width = 120; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode3"].HeaderText = "单上条码"; |
|||
|
|||
} |
|||
|
|||
public static void ShowLable(Label lblState) |
|||
{ |
|||
object obj = dsBill.Tables[0].Select("[BarCode1]<>''").Length.ToString(); |
|||
|
|||
lblState.Text = "待入库数:" + dsBill.Tables[0].Rows.Count.ToString(); |
|||
lblState.Text += ",已经入库数:" + obj; |
|||
} |
|||
|
|||
public static void Add( string BarCode, string BarCodeYqj) |
|||
{ |
|||
if (dsBill.Tables[0].Select("[BarCode3]='" + BarCode + "'").Length == 0) |
|||
throw new Exception(BarCode + " 在单据中不存在!"); |
|||
|
|||
if (dsBill.Tables[0].Select("[BarCode1]='" + BarCode + "'").Length > 0) |
|||
throw new Exception(BarCode + " 已经扫描过了!"); |
|||
|
|||
int rowIndex = SearchBarCode(BarCode); |
|||
if (rowIndex == -1) throw new Exception(BarCode + " 在单据中不存在!"); |
|||
|
|||
dsBill.Tables[0].Rows[rowIndex]["BarCode1"] = BarCode; |
|||
dsBill.Tables[0].Rows[rowIndex]["BarCode2"] = BarCodeYqj; |
|||
|
|||
} |
|||
|
|||
public static int SearchBarCode(string BarCode) |
|||
{ |
|||
int ret = -1; |
|||
for (int i = 0; i < dsBill.Tables[0].Rows.Count; i++) |
|||
{ |
|||
if (dsBill.Tables[0].Rows[i]["BarCode3"].ToString().ToUpper() == BarCode) |
|||
{ |
|||
ret = i; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
return ret; |
|||
} |
|||
|
|||
|
|||
public static void BillSubmit() |
|||
{ |
|||
|
|||
if (dsBill.Tables[0].Rows.Count == 0) throw new Exception("没有可提交的数据!"); |
|||
|
|||
if (dsBill.Tables[0].Select("[BarCode1]=''").Length > 0) |
|||
throw new Exception("还有记录未扫描备料条码!"); |
|||
|
|||
string Cmd = "BARCODEBL_RK_SUBMIT"; |
|||
string Pars = dsBill.Tables[0].Rows[0]["BillNo"].ToString() + ";" + UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBill); |
|||
|
|||
dsBill.Tables[0].Rows.Clear(); |
|||
dsBill = null; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,177 @@ |
|||
namespace PDAForm.Bill.BarCodeBL |
|||
{ |
|||
partial class frmRKBarCodeBL |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.btnDelete = new System.Windows.Forms.Button(); |
|||
this.btnExit = new System.Windows.Forms.Button(); |
|||
this.btnSubmit = new System.Windows.Forms.Button(); |
|||
this.txtBarCode = new System.Windows.Forms.TextBox(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.txtBillNo = new System.Windows.Forms.TextBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txtBarCodeYqj = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// btnDelete
|
|||
//
|
|||
this.btnDelete.Location = new System.Drawing.Point(82, 246); |
|||
this.btnDelete.Name = "btnDelete"; |
|||
this.btnDelete.Size = new System.Drawing.Size(72, 24); |
|||
this.btnDelete.TabIndex = 27; |
|||
this.btnDelete.Text = "删除记录"; |
|||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); |
|||
//
|
|||
// btnExit
|
|||
//
|
|||
this.btnExit.Location = new System.Drawing.Point(163, 246); |
|||
this.btnExit.Name = "btnExit"; |
|||
this.btnExit.Size = new System.Drawing.Size(72, 24); |
|||
this.btnExit.TabIndex = 26; |
|||
this.btnExit.Text = "返回主菜单"; |
|||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click); |
|||
//
|
|||
// btnSubmit
|
|||
//
|
|||
this.btnSubmit.Location = new System.Drawing.Point(1, 246); |
|||
this.btnSubmit.Name = "btnSubmit"; |
|||
this.btnSubmit.Size = new System.Drawing.Size(72, 24); |
|||
this.btnSubmit.TabIndex = 25; |
|||
this.btnSubmit.Text = "提交数据"; |
|||
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Location = new System.Drawing.Point(82, 32); |
|||
this.txtBarCode.MaxLength = 30; |
|||
this.txtBarCode.Name = "txtBarCode"; |
|||
this.txtBarCode.Size = new System.Drawing.Size(154, 23); |
|||
this.txtBarCode.TabIndex = 1; |
|||
this.txtBarCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode_KeyDown); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(4, 36); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "备料条码:"; |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(3, 89); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(234, 137); |
|||
this.dgShow.TabIndex = 24; |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(5, 229); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(231, 17); |
|||
//
|
|||
// txtBillNo
|
|||
//
|
|||
this.txtBillNo.Location = new System.Drawing.Point(82, 3); |
|||
this.txtBillNo.MaxLength = 30; |
|||
this.txtBillNo.Name = "txtBillNo"; |
|||
this.txtBillNo.Size = new System.Drawing.Size(153, 23); |
|||
this.txtBillNo.TabIndex = 0; |
|||
this.txtBillNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBillNo_KeyDown); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(3, 7); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(100, 20); |
|||
this.label2.Text = "计划单号:"; |
|||
//
|
|||
// txtBarCodeYqj
|
|||
//
|
|||
this.txtBarCodeYqj.Location = new System.Drawing.Point(81, 61); |
|||
this.txtBarCodeYqj.MaxLength = 30; |
|||
this.txtBarCodeYqj.Name = "txtBarCodeYqj"; |
|||
this.txtBarCodeYqj.Size = new System.Drawing.Size(154, 23); |
|||
this.txtBarCodeYqj.TabIndex = 34; |
|||
this.txtBarCodeYqj.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCodeYqj_KeyDown); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(3, 65); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "油漆件条码:"; |
|||
//
|
|||
// frmRKBarCodeBL
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtBarCodeYqj); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.txtBillNo); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.btnDelete); |
|||
this.Controls.Add(this.btnExit); |
|||
this.Controls.Add(this.btnSubmit); |
|||
this.Controls.Add(this.txtBarCode); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.lblState); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmRKBarCodeBL"; |
|||
this.Text = "备料入库"; |
|||
this.Load += new System.EventHandler(this.frmRKBarCodeBL_Load); |
|||
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmRKBarCodeBL_Closing); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button btnDelete; |
|||
private System.Windows.Forms.Button btnExit; |
|||
private System.Windows.Forms.Button btnSubmit; |
|||
private System.Windows.Forms.TextBox txtBarCode; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Label lblState; |
|||
private System.Windows.Forms.TextBox txtBillNo; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.TextBox txtBarCodeYqj; |
|||
private System.Windows.Forms.Label label3; |
|||
} |
|||
} |
@ -0,0 +1,206 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill.BarCodeBL |
|||
{ |
|||
public partial class frmRKBarCodeBL : Form |
|||
{ |
|||
public frmRKBarCodeBL() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmRKBarCodeBL_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void txtBillNo_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
this.txtBillNo.Enabled = false; |
|||
this.Update(); |
|||
|
|||
try |
|||
{ |
|||
string BillNo = this.txtBillNo.Text.Trim().ToUpper(); |
|||
if (BillNo == "") throw new Exception("请先扫描单据编号!"); |
|||
|
|||
if (F_RKBarCodeBL.dsBill != null) throw new Exception("当前还有数据未提交,请先提交再扫描新的单据!"); |
|||
|
|||
F_RKBarCodeBL.ShowGrid(this.dgShow, BillNo); |
|||
F_RKBarCodeBL.ShowLable(this.lblState); |
|||
|
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBillNo.Enabled = true; |
|||
this.txtBillNo.Focus(); |
|||
this.txtBillNo.SelectAll(); |
|||
} |
|||
finally |
|||
{ |
|||
this.txtBillNo.Enabled = true; |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void txtBarCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
if (this.txtBarCode.Text.Trim().Length < 3) throw new Exception("请扫描正确的备料条码!"); |
|||
|
|||
if (this.txtBarCode.Text.Trim().ToUpper().Substring(0, 2) != "BL") throw new Exception("请扫描正确的备料条码!"); |
|||
|
|||
this.txtBarCodeYqj.Focus(); |
|||
this.txtBarCodeYqj.SelectAll(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void txtBarCodeYqj_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
string BarCode = this.txtBarCode.Text.Trim().ToUpper(); |
|||
string BarCodeYqj = this.txtBarCodeYqj.Text.Trim().ToUpper(); |
|||
|
|||
if (BarCode.Length < 3) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("请扫描正确的备料条码!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCode.Substring(0, 2) != "BL") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("请扫描正确的备料条码!"); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (BarCodeYqj.Length > 0) |
|||
{ |
|||
if (BarCodeYqj.Length < 3) throw new Exception("请扫描正确的油漆件条码!"); |
|||
if (BarCodeYqj.Substring(0, 2) != "YT") throw new Exception("请扫描正确的油漆件条码!"); |
|||
} |
|||
|
|||
F_RKBarCodeBL.Add(BarCode, BarCodeYqj); |
|||
F_RKBarCodeBL.ShowLable(this.lblState); |
|||
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtBarCodeYqj.Text = ""; |
|||
this.txtBarCode.Focus(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCodeYqj.Focus(); |
|||
this.txtBarCodeYqj.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
private void btnDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (F_RKBarCodeBL.dsBill == null) throw new Exception("请先扫描单据!"); |
|||
if (F_RKBarCodeBL.dsBill.Tables[0].Rows.Count == 0) throw new Exception("没有需要删除的单据!"); |
|||
|
|||
if (!MyMessageBox.ShowQuestion("是否要删除选择条码!")) return; |
|||
|
|||
F_RKBarCodeBL.dsBill.Tables[0].Rows[0]["BarCode1"] = ""; |
|||
F_RKBarCodeBL.dsBill.Tables[0].Rows[0]["BarCode2"] = ""; |
|||
|
|||
MyMessageBox.ShowInfoMessage("删除成功!"); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnSubmit_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (F_RKBarCodeBL.dsBill == null) throw new Exception("请先扫描单据!"); |
|||
if (F_RKBarCodeBL.dsBill.Tables[0].Rows.Count == 0) throw new Exception("当前没有需要提交的记录!"); |
|||
|
|||
if (!MyMessageBox.ShowQuestion("是否要提交数据?")) return; |
|||
|
|||
F_RKBarCodeBL.BillSubmit(); |
|||
|
|||
this.lblState.Text = ""; |
|||
|
|||
MyMessageBox.ShowInfoMessage("单据提交成功!"); |
|||
|
|||
this.txtBillNo.Text = ""; |
|||
this.txtBillNo.Focus(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
|
|||
} |
|||
|
|||
private void btnExit_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void frmRKBarCodeBL_Closing(object sender, CancelEventArgs e) |
|||
{ |
|||
if (F_RKBarCodeBL.dsBill != null) |
|||
{ |
|||
if (!MyMessageBox.ShowQuestion("当前还有单据未提交,是否要退出?")) |
|||
{ |
|||
e.Cancel = true; |
|||
} |
|||
else |
|||
{ |
|||
F_RKBarCodeBL.dsBill = null; |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,78 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.BarCodeCheck |
|||
{ |
|||
public class F_BarCodeCheck |
|||
{ |
|||
public static DataSet dsBill = null; |
|||
|
|||
public static void ShowGrid(DataGrid dg) |
|||
{ |
|||
dsBill = new DataSet(); |
|||
dsBill.Tables.Add(new DataTable()); |
|||
dsBill.Tables[0].Columns.Add("BarCode"); |
|||
dsBill.Tables[0].Columns.Add("ProductName"); |
|||
dsBill.Tables[0].Columns.Add("LocationCode"); |
|||
|
|||
dg.DataSource = dsBill.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].Width = 80; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].Width = 200; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCode"].HeaderText = "库位"; |
|||
} |
|||
|
|||
public static void AddCheck(string BarCode, string LocationCode, Label lblState) |
|||
{ |
|||
string Cmd = "BARCODECHECK_BARCODE"; |
|||
string Pars = LocationCode + ";" + BarCode + ";" + UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
string ProductName = dsData.Tables[0].Rows[0]["ProductName"].ToString(); |
|||
|
|||
DataRow drData = dsBill.Tables[0].NewRow(); |
|||
drData["BarCode"] = BarCode; |
|||
drData["ProductName"] = ProductName; |
|||
drData["LocationCode"] = LocationCode; |
|||
dsBill.Tables[0].Rows.InsertAt(drData, 0); |
|||
|
|||
lblState.Text = "记录:" + dsBill.Tables[0].Rows.Count.ToString(); |
|||
} |
|||
|
|||
public static void DelCheck(string BarCode, Label lblState, int dgRowIndex) |
|||
{ |
|||
string Cmd = "BARCODECHECK_DEL"; |
|||
string Pars = BarCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dsBill.Tables[0].Rows.RemoveAt(dgRowIndex); |
|||
|
|||
lblState.Text = "记录:" + dsBill.Tables[0].Rows.Count.ToString(); |
|||
} |
|||
|
|||
public static void BindLocation(ComboBox txtLocationCode) |
|||
{ |
|||
string Cmd = "LOCATION_LIST"; |
|||
string Pars = ""; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
txtLocationCode.DataSource = F_Message.ServiceMessage(cmd.GetCommand()).Tables[0]; |
|||
txtLocationCode.DisplayMember = "Code"; |
|||
txtLocationCode.ValueMember = "Code"; |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,139 @@ |
|||
namespace PDAForm.Bill.BarCodeCheck |
|||
{ |
|||
partial class frmBarCodeCheck |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtBarCode = new System.Windows.Forms.TextBox(); |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.btnDel = new System.Windows.Forms.Button(); |
|||
this.btnClose = new System.Windows.Forms.Button(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.txtLocationCode = new System.Windows.Forms.ComboBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(0, 32); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "条码:"; |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Location = new System.Drawing.Point(52, 29); |
|||
this.txtBarCode.Name = "txtBarCode"; |
|||
this.txtBarCode.Size = new System.Drawing.Size(183, 23); |
|||
this.txtBarCode.TabIndex = 0; |
|||
this.txtBarCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode_KeyDown); |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(4, 58); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(231, 178); |
|||
this.dgShow.TabIndex = 15; |
|||
//
|
|||
// btnDel
|
|||
//
|
|||
this.btnDel.Location = new System.Drawing.Point(4, 243); |
|||
this.btnDel.Name = "btnDel"; |
|||
this.btnDel.Size = new System.Drawing.Size(54, 29); |
|||
this.btnDel.TabIndex = 16; |
|||
this.btnDel.Text = "删除"; |
|||
this.btnDel.Click += new System.EventHandler(this.btnDel_Click); |
|||
//
|
|||
// btnClose
|
|||
//
|
|||
this.btnClose.Location = new System.Drawing.Point(159, 242); |
|||
this.btnClose.Name = "btnClose"; |
|||
this.btnClose.Size = new System.Drawing.Size(76, 29); |
|||
this.btnClose.TabIndex = 17; |
|||
this.btnClose.Text = "关闭"; |
|||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(63, 249); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(100, 20); |
|||
this.lblState.Text = "记录:0"; |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Location = new System.Drawing.Point(1, 6); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(100, 20); |
|||
this.label2.Text = "库位:"; |
|||
//
|
|||
// txtLocationCode
|
|||
//
|
|||
this.txtLocationCode.Location = new System.Drawing.Point(52, 2); |
|||
this.txtLocationCode.Name = "txtLocationCode"; |
|||
this.txtLocationCode.Size = new System.Drawing.Size(183, 23); |
|||
this.txtLocationCode.TabIndex = 21; |
|||
//
|
|||
// frmBarCodeCheck
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtLocationCode); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.btnClose); |
|||
this.Controls.Add(this.btnDel); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.txtBarCode); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.lblState); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmBarCodeCheck"; |
|||
this.Text = "油漆件盘点"; |
|||
this.Load += new System.EventHandler(this.frmBarCodeCheck_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox txtBarCode; |
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Button btnDel; |
|||
private System.Windows.Forms.Button btnClose; |
|||
private System.Windows.Forms.Label lblState; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.ComboBox txtLocationCode; |
|||
} |
|||
} |
@ -0,0 +1,85 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill.BarCodeCheck |
|||
{ |
|||
public partial class frmBarCodeCheck : Form |
|||
{ |
|||
public frmBarCodeCheck() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmBarCodeCheck_Load(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
F_BarCodeCheck.BindLocation(this.txtLocationCode); |
|||
F_BarCodeCheck.ShowGrid(dgShow); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnDel_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (F_BarCodeCheck.dsBill.Tables[0].Rows.Count == 0) |
|||
throw new Exception("当前没有盘点数据!"); |
|||
|
|||
if (MyMessageBox.ShowQuestion("是否要删除选择的盘点数据?")) |
|||
{ |
|||
this.Update(); |
|||
|
|||
string BarCode = F_BarCodeCheck.dsBill.Tables[0].Rows[this.dgShow.CurrentRowIndex]["BarCode"].ToString(); |
|||
F_BarCodeCheck.DelCheck(BarCode, lblState, this.dgShow.CurrentRowIndex); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnClose_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void txtBarCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
string BarCode = this.txtBarCode.Text.Trim().ToUpper(); |
|||
if (BarCode == "") throw new Exception("请扫描条码!"); |
|||
|
|||
F_BarCodeCheck.AddCheck(BarCode, this.txtLocationCode.SelectedValue.ToString(), this.lblState); |
|||
|
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
finally |
|||
{ |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,112 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
using System.IO; |
|||
|
|||
namespace PDAForm.Bill.BarCodeReceive |
|||
{ |
|||
public class F_BarCodeReceive |
|||
{ |
|||
public static DataSet dsBill = null; |
|||
public static string billFile = string.Empty; |
|||
|
|||
static F_BarCodeReceive() |
|||
{ |
|||
billFile = MyFileManager.GetApplicationPath() + "\\Data_BarCodeReceive_" + UserInfo.UserName + ".xml"; |
|||
if (File.Exists(billFile)) |
|||
{ |
|||
dsBill = new DataSet(); |
|||
dsBill.ReadXml(billFile); |
|||
} |
|||
else |
|||
{ |
|||
dsBill = new DataSet(); |
|||
dsBill.Tables.Add(new DataTable()); |
|||
dsBill.Tables[0].Columns.Add("BarCode"); |
|||
dsBill.Tables[0].Columns.Add("ProductCode"); |
|||
dsBill.Tables[0].Columns.Add("ProductName"); |
|||
dsBill.Tables[0].Columns.Add("Batch"); |
|||
|
|||
Save(); |
|||
|
|||
} |
|||
} |
|||
|
|||
public static void ShowGrid(DataGrid dg) |
|||
{ |
|||
dg.DataSource = dsBill.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].Width = 100; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].Width = 200; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles.Remove(dg.TableStyles[0].GridColumnStyles["ProductCode"]); |
|||
dg.TableStyles[0].GridColumnStyles.Remove(dg.TableStyles[0].GridColumnStyles["Batch"]); |
|||
|
|||
} |
|||
|
|||
public static void Add(string BarCode, string ProductName, string ProductCode, string Batch) |
|||
{ |
|||
if (dsBill.Tables[0].Rows.Count > 0) |
|||
{ |
|||
if (dsBill.Tables[0].Select("[BarCode]='" + BarCode + "'").Length > 0) |
|||
throw new Exception("条码[" + BarCode + "]已经扫描过了!"); |
|||
|
|||
if (dsBill.Tables[0].Select("[ProductCode]='" + ProductCode + "'").Length == 0) |
|||
throw new Exception("当前扫描的是[" + ProductName + "],如果换型号颜色,请先提交数据后再扫描!"); |
|||
} |
|||
|
|||
DataRow drData = dsBill.Tables[0].NewRow(); |
|||
drData["BarCode"] = BarCode; |
|||
drData["ProductName"] = ProductName; |
|||
drData["ProductCode"] = ProductCode; |
|||
drData["Batch"] = Batch; |
|||
dsBill.Tables[0].Rows.Add(drData); |
|||
|
|||
Save(); |
|||
} |
|||
|
|||
public static void Save() |
|||
{ |
|||
dsBill.WriteXml(billFile, XmlWriteMode.WriteSchema); |
|||
} |
|||
|
|||
public static void Del() |
|||
{ |
|||
if (File.Exists(billFile)) |
|||
{ |
|||
File.Delete(billFile); |
|||
} |
|||
} |
|||
|
|||
public static DataSet GetBarCodeState(string BarCode) |
|||
{ |
|||
string Cmd = "BARCODE_STATE_1"; |
|||
string Pars = BarCode + ";油漆件;下线;条码打印"; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
} |
|||
|
|||
public static void Submit() |
|||
{ |
|||
string Cmd = "BARCODE_YQJ_RECEIVE_SUBMIT"; |
|||
string Pars = UserInfo.UserName; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBill); |
|||
|
|||
dsBill.Tables[0].Rows.Clear(); |
|||
Save(); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,132 @@ |
|||
namespace PDAForm.Bill.BarCodeReceive |
|||
{ |
|||
partial class frmBarCodeReceive |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtBarCode = new System.Windows.Forms.TextBox(); |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.btnDel = new System.Windows.Forms.Button(); |
|||
this.btnClose = new System.Windows.Forms.Button(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.btnSubmit = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(0, 6); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "条码:"; |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Location = new System.Drawing.Point(52, 3); |
|||
this.txtBarCode.Name = "txtBarCode"; |
|||
this.txtBarCode.Size = new System.Drawing.Size(183, 23); |
|||
this.txtBarCode.TabIndex = 0; |
|||
this.txtBarCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBarCode_KeyDown); |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(4, 32); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(231, 204); |
|||
this.dgShow.TabIndex = 15; |
|||
//
|
|||
// btnDel
|
|||
//
|
|||
this.btnDel.Location = new System.Drawing.Point(4, 243); |
|||
this.btnDel.Name = "btnDel"; |
|||
this.btnDel.Size = new System.Drawing.Size(54, 29); |
|||
this.btnDel.TabIndex = 16; |
|||
this.btnDel.Text = "删除"; |
|||
this.btnDel.Click += new System.EventHandler(this.btnDel_Click); |
|||
//
|
|||
// btnClose
|
|||
//
|
|||
this.btnClose.Location = new System.Drawing.Point(179, 243); |
|||
this.btnClose.Name = "btnClose"; |
|||
this.btnClose.Size = new System.Drawing.Size(56, 29); |
|||
this.btnClose.TabIndex = 17; |
|||
this.btnClose.Text = "关闭"; |
|||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(127, 247); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(46, 20); |
|||
this.lblState.Text = "0"; |
|||
this.lblState.TextAlign = System.Drawing.ContentAlignment.TopCenter; |
|||
//
|
|||
// btnSubmit
|
|||
//
|
|||
this.btnSubmit.Location = new System.Drawing.Point(67, 243); |
|||
this.btnSubmit.Name = "btnSubmit"; |
|||
this.btnSubmit.Size = new System.Drawing.Size(54, 29); |
|||
this.btnSubmit.TabIndex = 25; |
|||
this.btnSubmit.Text = "提交"; |
|||
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); |
|||
//
|
|||
// frmBarCodeReceive
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = true; |
|||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.btnSubmit); |
|||
this.Controls.Add(this.btnClose); |
|||
this.Controls.Add(this.btnDel); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Controls.Add(this.txtBarCode); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.lblState); |
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
|||
this.MaximizeBox = false; |
|||
this.MinimizeBox = false; |
|||
this.Name = "frmBarCodeReceive"; |
|||
this.Text = "油漆件入库扫描"; |
|||
this.Load += new System.EventHandler(this.frmBarCodeCheck_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox txtBarCode; |
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Button btnDel; |
|||
private System.Windows.Forms.Button btnClose; |
|||
private System.Windows.Forms.Label lblState; |
|||
private System.Windows.Forms.Button btnSubmit; |
|||
} |
|||
} |
@ -0,0 +1,130 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill.BarCodeReceive |
|||
{ |
|||
public partial class frmBarCodeReceive : Form |
|||
{ |
|||
public frmBarCodeReceive() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmBarCodeCheck_Load(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
F_BarCodeReceive.ShowGrid(dgShow); |
|||
this.lblState.Text = F_BarCodeReceive.dsBill.Tables[0].Rows.Count.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnDel_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (F_BarCodeReceive.dsBill.Tables[0].Rows.Count == 0) |
|||
throw new Exception("没前没有数据!"); |
|||
|
|||
if (MyMessageBox.ShowQuestion("是否要删除选择的条码?")) |
|||
{ |
|||
this.Update(); |
|||
|
|||
F_BarCodeReceive.dsBill.Tables[0].Rows.RemoveAt(this.dgShow.CurrentRowIndex); |
|||
F_BarCodeReceive.Save(); |
|||
|
|||
this.lblState.Text = F_BarCodeReceive.dsBill.Tables[0].Rows.Count.ToString(); |
|||
|
|||
F_BarCodeReceive.ShowGrid(dgShow); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void btnClose_Click(object sender, EventArgs e) |
|||
{ |
|||
this.Close(); |
|||
} |
|||
|
|||
private void txtBarCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
try |
|||
{ |
|||
string BarCode = this.txtBarCode.Text.Trim().ToUpper(); |
|||
if (BarCode == "") throw new Exception("请扫描条码!"); |
|||
|
|||
DataSet dsBarCode = F_BarCodeReceive.GetBarCodeState(BarCode); |
|||
if (dsBarCode.Tables[0].Rows.Count == 0) |
|||
throw new Exception("条码[" + BarCode + "]在系统中不存在!"); |
|||
|
|||
F_BarCodeReceive.Add(BarCode, |
|||
dsBarCode.Tables[0].Rows[0]["ProductName"].ToString(), |
|||
dsBarCode.Tables[0].Rows[0]["ProductCode"].ToString(), |
|||
dsBarCode.Tables[0].Rows[0]["Batch"].ToString() |
|||
); |
|||
|
|||
this.lblState.Text = F_BarCodeReceive.dsBill.Tables[0].Rows.Count.ToString(); |
|||
|
|||
F_BarCodeReceive.ShowGrid(dgShow); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
finally |
|||
{ |
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void btnSubmit_Click(object sender, EventArgs e) |
|||
{ |
|||
this.btnSubmit.Enabled = false; |
|||
this.Update(); |
|||
try |
|||
{ |
|||
if (MyMessageBox.ShowQuestion("是否要提交入库数据?")) |
|||
{ |
|||
this.Update(); |
|||
|
|||
if (F_BarCodeReceive.dsBill.Tables[0].Rows.Count == 0) |
|||
throw new Exception("没有需要提交的数据!"); |
|||
|
|||
F_BarCodeReceive.Submit(); |
|||
this.lblState.Text = F_BarCodeReceive.dsBill.Tables[0].Rows.Count.ToString(); |
|||
F_BarCodeReceive.ShowGrid(dgShow); |
|||
|
|||
MyMessageBox.ShowInfoMessage("数据提交成功!"); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
finally |
|||
{ |
|||
this.btnSubmit.Enabled = true; |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,52 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
public class F_Check : F_BillBase |
|||
{ |
|||
public DataSet dsLocation = null; |
|||
public F_Check() |
|||
{ |
|||
this.billType = "Check"; |
|||
this.billName = "盘点"; |
|||
} |
|||
|
|||
public override void BillList(System.Windows.Forms.DataGrid dg) |
|||
{ |
|||
base.BillList(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].HeaderText = "单据号"; |
|||
dg.TableStyles[0].GridColumnStyles["QtyTotal"].HeaderText = "单据数量"; dg.TableStyles[0].GridColumnStyles["QtyTotal"].NullText = "0"; |
|||
dg.TableStyles[0].GridColumnStyles["StockAreaCode"].HeaderText = "库区代码"; |
|||
dg.TableStyles[0].GridColumnStyles["BillTime"].HeaderText = "单据时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Memo"].HeaderText = "备注"; |
|||
dg.TableStyles[0].GridColumnStyles["UserName"].HeaderText = "操作员"; |
|||
} |
|||
|
|||
public override void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["StockQty"].HeaderText = "库存数量"; |
|||
dg.TableStyles[0].GridColumnStyles["DiffQty"].HeaderText = "盘点差异"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCode"].HeaderText = "盘点库位"; |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].HeaderText = "器具"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
partial class frmCheck |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtStockAreaCode = new System.Windows.Forms.TextBox(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtStockAreaCode
|
|||
//
|
|||
this.txtStockAreaCode.Location = new System.Drawing.Point(80, 85); |
|||
this.txtStockAreaCode.Name = "txtStockAreaCode"; |
|||
this.txtStockAreaCode.ReadOnly = true; |
|||
this.txtStockAreaCode.Size = new System.Drawing.Size(154, 23); |
|||
this.txtStockAreaCode.TabIndex = 29; |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Location = new System.Drawing.Point(4, 87); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "库区代码:"; |
|||
//
|
|||
// frmCheck
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtStockAreaCode); |
|||
this.Controls.Add(this.label4); |
|||
this.Name = "frmCheck"; |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtStockAreaCode, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txtStockAreaCode; |
|||
private System.Windows.Forms.Label label4; |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
public partial class frmCheck : PDAForm.Bill.frmBillBase |
|||
{ |
|||
public frmCheck() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override void BillBind() |
|||
{ |
|||
base.BillBind(); |
|||
this.txtStockAreaCode.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["StockAreaCode"].ToString(); |
|||
} |
|||
|
|||
public override void BillClear() |
|||
{ |
|||
base.BillClear(); |
|||
this.txtStockAreaCode.Text = ""; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,71 @@ |
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
partial class frmCheckNew |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtMemo
|
|||
//
|
|||
this.txtMemo.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtMemo.Location = new System.Drawing.Point(85, 6); |
|||
this.txtMemo.Size = new System.Drawing.Size(151, 23); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(8, 11); |
|||
//
|
|||
// txtBillTypeU8Code
|
|||
//
|
|||
this.txtBillTypeU8Code.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBillTypeU8Code.Location = new System.Drawing.Point(87, 92); |
|||
this.txtBillTypeU8Code.Size = new System.Drawing.Size(151, 23); |
|||
this.txtBillTypeU8Code.Visible = false; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(10, 95); |
|||
this.label3.Visible = false; |
|||
//
|
|||
// frmCheckNew
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Name = "frmCheckNew"; |
|||
this.Load += new System.EventHandler(this.frmCheckNew_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
public partial class frmCheckNew : PDAForm.Bill.frmBillNewBase |
|||
{ |
|||
public frmCheckNew() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmCheckNew_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override string BillNew() |
|||
{ |
|||
string Memo = this.txtMemo.Text.Trim(); |
|||
string Pars = Memo + ";" + UserInfo.UserName + ";" + StockAreaCode; |
|||
return Pars; |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,145 @@ |
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
partial class frmCheckScan |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtLocationCode = new System.Windows.Forms.TextBox(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.btnStockQuery = new System.Windows.Forms.Button(); |
|||
this.txtTrayCode = new System.Windows.Forms.TextBox(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBarCode.Location = new System.Drawing.Point(67, 32); |
|||
this.txtBarCode.Size = new System.Drawing.Size(168, 23); |
|||
this.txtBarCode.TabIndex = 2; |
|||
//
|
|||
// btnSave
|
|||
//
|
|||
this.btnSave.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// txtQty
|
|||
//
|
|||
this.txtQty.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtQty.Location = new System.Drawing.Point(52, 204); |
|||
this.txtQty.Size = new System.Drawing.Size(79, 23); |
|||
this.txtQty.TabIndex = 3; |
|||
//
|
|||
// ctrProduct1
|
|||
//
|
|||
this.ctrProduct1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular); |
|||
this.ctrProduct1.Location = new System.Drawing.Point(7, 60); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(7, 37); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label1.Location = new System.Drawing.Point(7, 209); |
|||
//
|
|||
// txtLocationCode
|
|||
//
|
|||
this.txtLocationCode.Location = new System.Drawing.Point(46, 3); |
|||
this.txtLocationCode.Name = "txtLocationCode"; |
|||
this.txtLocationCode.Size = new System.Drawing.Size(63, 23); |
|||
this.txtLocationCode.TabIndex = 0; |
|||
this.txtLocationCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtLocationCode_KeyDown); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Location = new System.Drawing.Point(3, 7); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "库位:"; |
|||
//
|
|||
// btnStockQuery
|
|||
//
|
|||
this.btnStockQuery.Location = new System.Drawing.Point(150, 204); |
|||
this.btnStockQuery.Name = "btnStockQuery"; |
|||
this.btnStockQuery.Size = new System.Drawing.Size(72, 25); |
|||
this.btnStockQuery.TabIndex = 26; |
|||
this.btnStockQuery.Text = "库存查询"; |
|||
this.btnStockQuery.Click += new System.EventHandler(this.btnStockQuery_Click); |
|||
//
|
|||
// txtTrayCode
|
|||
//
|
|||
this.txtTrayCode.Location = new System.Drawing.Point(154, 5); |
|||
this.txtTrayCode.Name = "txtTrayCode"; |
|||
this.txtTrayCode.Size = new System.Drawing.Size(81, 23); |
|||
this.txtTrayCode.TabIndex = 1; |
|||
this.txtTrayCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTrayCode_KeyDown); |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Location = new System.Drawing.Point(112, 9); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "器具:"; |
|||
//
|
|||
// frmCheckScan
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtTrayCode); |
|||
this.Controls.Add(this.label4); |
|||
this.Controls.Add(this.btnStockQuery); |
|||
this.Controls.Add(this.txtLocationCode); |
|||
this.Controls.Add(this.label3); |
|||
this.Name = "frmCheckScan"; |
|||
this.Load += new System.EventHandler(this.frmCheckScan_Load); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.label3, 0); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.txtBarCode, 0); |
|||
this.Controls.SetChildIndex(this.btnSave, 0); |
|||
this.Controls.SetChildIndex(this.ctrProduct1, 0); |
|||
this.Controls.SetChildIndex(this.txtQty, 0); |
|||
this.Controls.SetChildIndex(this.txtLocationCode, 0); |
|||
this.Controls.SetChildIndex(this.btnStockQuery, 0); |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtTrayCode, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txtLocationCode; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.Button btnStockQuery; |
|||
private System.Windows.Forms.TextBox txtTrayCode; |
|||
private System.Windows.Forms.Label label4; |
|||
} |
|||
} |
@ -0,0 +1,155 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.Bill.Stock; |
|||
|
|||
namespace PDAForm.Bill.Check |
|||
{ |
|||
public partial class frmCheckScan : PDAForm.Bill.frmBillScanBase |
|||
{ |
|||
public frmCheckScan() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmCheckScan_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void txtLocationCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (this.txtLocationCode.Text.Trim() == "") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("库位条码不能为空!"); |
|||
this.txtLocationCode.Focus(); |
|||
} |
|||
else |
|||
{ |
|||
this.txtTrayCode.Focus(); |
|||
this.txtTrayCode.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void txtTrayCode_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
if (this.txtTrayCode.Text.Trim() != "") |
|||
{ |
|||
if (this.txtTrayCode.Text.Trim().Length < 5) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码不能小于5位!"); |
|||
this.txtTrayCode.Focus(); |
|||
this.txtTrayCode.SelectAll(); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
if (this.txtTrayCode.Text.Trim().Substring(0, 1).ToUpper() != "R") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码只能以R开头!"); |
|||
this.txtTrayCode.Focus(); |
|||
this.txtTrayCode.SelectAll(); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
this.txtBarCode.Focus(); |
|||
this.txtBarCode.SelectAll(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override void ScanBarCode(string _BarCode) |
|||
{ |
|||
base.ScanBarCode(_BarCode); |
|||
if (BarCode.BarCode.Substring(0, 2) == "YT") |
|||
{ |
|||
this.txtQty.ReadOnly = true; |
|||
this.txtQty.Text = "1"; |
|||
} |
|||
} |
|||
|
|||
public override void ScanQty(int _Qty) |
|||
{ |
|||
base.ScanQty(_Qty); |
|||
Save(); |
|||
} |
|||
|
|||
public override void Save() |
|||
{ |
|||
base.Save(); |
|||
|
|||
if (this.txtLocationCode.Text.Trim() == "") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("库位不能为空!"); |
|||
this.txtLocationCode.Focus(); |
|||
return; |
|||
} |
|||
|
|||
if (this.txtTrayCode.Text.Trim() != "") |
|||
{ |
|||
if (this.txtTrayCode.Text.Trim().Length < 5) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码不能小于5位!"); |
|||
this.txtTrayCode.Focus(); |
|||
this.txtTrayCode.SelectAll(); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
if (this.txtTrayCode.Text.Trim().Substring(0, 1).ToUpper() != "R") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码只能以R开头!"); |
|||
this.txtTrayCode.Focus(); |
|||
this.txtTrayCode.SelectAll(); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
DataRow drData = m_Base.dsBill.Tables["BillDetail"].NewRow(); |
|||
drData["BillNo"] = m_Base.dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
drData["ProductCode"] = this.ctrProduct1.BarCode.Code; |
|||
drData["Batch"] = this.ctrProduct1.BarCode.Batch; |
|||
drData["Qty"] = this.txtQty.Text.Trim(); |
|||
drData["LocationCode"] = this.txtLocationCode.Text.Trim().ToUpper(); |
|||
drData["TrayCode"] = this.txtTrayCode.Text.Trim().ToUpper(); |
|||
drData["BarCode"] = this.ctrProduct1.BarCode.BarCode.Substring(0, 2) == "YT" ? this.ctrProduct1.BarCode.BarCode : ""; |
|||
m_Base.BillDetailAdd(drData); |
|||
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtQty.Text = ""; |
|||
this.ctrProduct1.Clear(); |
|||
this.txtBarCode.Focus(); |
|||
BarCode = null; |
|||
} |
|||
|
|||
private void btnStockQuery_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
frmStockQuery frm = new frmStockQuery(); |
|||
frm.ShowDialog(); |
|||
frm.Dispose(); |
|||
|
|||
//GC.Collect();
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,122 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
public class F_Conver : F_BillBase |
|||
{ |
|||
public DataSet dsLocation = null; |
|||
public F_Conver() |
|||
{ |
|||
this.billType = "Conver"; |
|||
this.billName = "转序"; |
|||
} |
|||
|
|||
public override void BillList(System.Windows.Forms.DataGrid dg) |
|||
{ |
|||
base.BillList(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].HeaderText = "单据号"; |
|||
dg.TableStyles[0].GridColumnStyles["QtyTotal"].HeaderText = "单据数量"; dg.TableStyles[0].GridColumnStyles["QtyTotal"].NullText = "0"; |
|||
dg.TableStyles[0].GridColumnStyles["RKName"].HeaderText = "上架员工"; |
|||
dg.TableStyles[0].GridColumnStyles["RKDepName"].HeaderText = "上架部门"; |
|||
dg.TableStyles[0].GridColumnStyles["CKName"].HeaderText = "下架员工"; |
|||
dg.TableStyles[0].GridColumnStyles["CKDepName"].HeaderText = "下架部门"; dg.TableStyles[0].GridColumnStyles["StockAreaCode"].HeaderText = "库区代码"; |
|||
dg.TableStyles[0].GridColumnStyles["BillTime"].HeaderText = "单据时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Memo"].HeaderText = "备注"; |
|||
dg.TableStyles[0].GridColumnStyles["UserName"].HeaderText = "操作员"; |
|||
} |
|||
|
|||
public override void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCode"].HeaderText = "转序库位"; |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].HeaderText = "器具"; |
|||
dg.TableStyles[0].GridColumnStyles["ProjectNumber"].HeaderText = "项目编号"; |
|||
dg.TableStyles[0].GridColumnStyles["ProjectName"].HeaderText = "项目名称"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
|
|||
} |
|||
|
|||
public void LocationList(string Code, string Batch, int Qty, string BillNo) |
|||
{ |
|||
//string StockAreaCode = UserInfo.UserStockArea;
|
|||
string StockAreaCode = dsBill.Tables["BillHead"].Rows[0]["StockAreaCode"].ToString(); |
|||
string Cmd = "BILL_LOCATION_LIST_" + billType; |
|||
string Pars = Code + ";" + Batch + ";" + Qty + ";" + BillNo + ";" + StockAreaCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsLocation = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public void LocationView(DataGrid dg) |
|||
{ |
|||
dg.DataSource = dsLocation.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsLocation.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["Location"].HeaderText = "库位"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "剩余容易"; |
|||
} |
|||
|
|||
public void LocationExit(string Location) |
|||
{ |
|||
if (dsLocation.Tables[0].Select("[Location]='" + Location + "'").Length <= 0) |
|||
{ |
|||
throw new Exception(Location + " 不在优先库位之列!"); |
|||
} |
|||
} |
|||
|
|||
public void LocationExit(string Location, int Qty) |
|||
{ |
|||
if (dsLocation.Tables[0].Select("[Location]='" + Location + "' and [Qty]>=" + Qty).Length <= 0) |
|||
{ |
|||
throw new Exception("数量不能大于库位指定的容量!"); |
|||
} |
|||
} |
|||
|
|||
public void ScanTrayCode(string TrayCode, DataGrid dg, Label lblState) |
|||
{ |
|||
string BillNo = dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
|
|||
string Cmd = "BILL_SCANTRAYCODE_" + billType; |
|||
string Pars = BillNo + ";" + TrayCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsPackage = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dg.DataSource = dsPackage.Tables[0]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsPackage.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["Code"].HeaderText = "器具"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
|
|||
lblState.Text = "记录:" + dsPackage.Tables[0].Rows.Count.ToString(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,166 @@ |
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
partial class frmConver |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtRKDepName = new System.Windows.Forms.TextBox(); |
|||
this.label5 = new System.Windows.Forms.Label(); |
|||
this.txtRKEmp = new System.Windows.Forms.TextBox(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.txtStockAreaCode = new System.Windows.Forms.TextBox(); |
|||
this.label6 = new System.Windows.Forms.Label(); |
|||
this.txtCKEmp = new System.Windows.Forms.TextBox(); |
|||
this.label7 = new System.Windows.Forms.Label(); |
|||
this.txtCKDepName = new System.Windows.Forms.TextBox(); |
|||
this.label8 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtRKDepName
|
|||
//
|
|||
this.txtRKDepName.Location = new System.Drawing.Point(58, 107); |
|||
this.txtRKDepName.Name = "txtRKDepName"; |
|||
this.txtRKDepName.ReadOnly = true; |
|||
this.txtRKDepName.Size = new System.Drawing.Size(62, 23); |
|||
this.txtRKDepName.TabIndex = 35; |
|||
//
|
|||
// label5
|
|||
//
|
|||
this.label5.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label5.Location = new System.Drawing.Point(-1, 111); |
|||
this.label5.Name = "label5"; |
|||
this.label5.Size = new System.Drawing.Size(100, 20); |
|||
this.label5.Text = "上架部门:"; |
|||
//
|
|||
// txtRKEmp
|
|||
//
|
|||
this.txtRKEmp.Location = new System.Drawing.Point(179, 107); |
|||
this.txtRKEmp.Name = "txtRKEmp"; |
|||
this.txtRKEmp.ReadOnly = true; |
|||
this.txtRKEmp.Size = new System.Drawing.Size(55, 23); |
|||
this.txtRKEmp.TabIndex = 38; |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label4.Location = new System.Drawing.Point(121, 111); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "上架员工:"; |
|||
//
|
|||
// txtStockAreaCode
|
|||
//
|
|||
this.txtStockAreaCode.Location = new System.Drawing.Point(80, 82); |
|||
this.txtStockAreaCode.Name = "txtStockAreaCode"; |
|||
this.txtStockAreaCode.ReadOnly = true; |
|||
this.txtStockAreaCode.Size = new System.Drawing.Size(154, 23); |
|||
this.txtStockAreaCode.TabIndex = 40; |
|||
//
|
|||
// label6
|
|||
//
|
|||
this.label6.Location = new System.Drawing.Point(3, 86); |
|||
this.label6.Name = "label6"; |
|||
this.label6.Size = new System.Drawing.Size(100, 20); |
|||
this.label6.Text = "库区代码:"; |
|||
//
|
|||
// txtCKEmp
|
|||
//
|
|||
this.txtCKEmp.Location = new System.Drawing.Point(179, 132); |
|||
this.txtCKEmp.Name = "txtCKEmp"; |
|||
this.txtCKEmp.ReadOnly = true; |
|||
this.txtCKEmp.Size = new System.Drawing.Size(55, 23); |
|||
this.txtCKEmp.TabIndex = 46; |
|||
//
|
|||
// label7
|
|||
//
|
|||
this.label7.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label7.Location = new System.Drawing.Point(121, 136); |
|||
this.label7.Name = "label7"; |
|||
this.label7.Size = new System.Drawing.Size(100, 20); |
|||
this.label7.Text = "下架员工:"; |
|||
//
|
|||
// txtCKDepName
|
|||
//
|
|||
this.txtCKDepName.Location = new System.Drawing.Point(58, 132); |
|||
this.txtCKDepName.Name = "txtCKDepName"; |
|||
this.txtCKDepName.ReadOnly = true; |
|||
this.txtCKDepName.Size = new System.Drawing.Size(62, 23); |
|||
this.txtCKDepName.TabIndex = 45; |
|||
//
|
|||
// label8
|
|||
//
|
|||
this.label8.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label8.Location = new System.Drawing.Point(-1, 136); |
|||
this.label8.Name = "label8"; |
|||
this.label8.Size = new System.Drawing.Size(100, 20); |
|||
this.label8.Text = "下架部门:"; |
|||
//
|
|||
// frmConver
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = false; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtCKEmp); |
|||
this.Controls.Add(this.label7); |
|||
this.Controls.Add(this.txtCKDepName); |
|||
this.Controls.Add(this.label8); |
|||
this.Controls.Add(this.txtStockAreaCode); |
|||
this.Controls.Add(this.txtRKEmp); |
|||
this.Controls.Add(this.label4); |
|||
this.Controls.Add(this.txtRKDepName); |
|||
this.Controls.Add(this.label5); |
|||
this.Controls.Add(this.label6); |
|||
this.Name = "frmConver"; |
|||
this.Controls.SetChildIndex(this.label6, 0); |
|||
this.Controls.SetChildIndex(this.label5, 0); |
|||
this.Controls.SetChildIndex(this.txtRKDepName, 0); |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtRKEmp, 0); |
|||
this.Controls.SetChildIndex(this.txtStockAreaCode, 0); |
|||
this.Controls.SetChildIndex(this.label8, 0); |
|||
this.Controls.SetChildIndex(this.txtCKDepName, 0); |
|||
this.Controls.SetChildIndex(this.label7, 0); |
|||
this.Controls.SetChildIndex(this.txtCKEmp, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txtRKDepName; |
|||
private System.Windows.Forms.Label label5; |
|||
private System.Windows.Forms.TextBox txtRKEmp; |
|||
private System.Windows.Forms.Label label4; |
|||
private System.Windows.Forms.TextBox txtStockAreaCode; |
|||
private System.Windows.Forms.Label label6; |
|||
private System.Windows.Forms.TextBox txtCKEmp; |
|||
private System.Windows.Forms.Label label7; |
|||
private System.Windows.Forms.TextBox txtCKDepName; |
|||
private System.Windows.Forms.Label label8; |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
public partial class frmConver : PDAForm.Bill.frmBillBase |
|||
{ |
|||
public frmConver() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override void BillBind() |
|||
{ |
|||
base.BillBind(); |
|||
this.txtRKDepName.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["RKDepName"].ToString(); |
|||
this.txtRKEmp.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["RKName"].ToString(); |
|||
this.txtCKDepName.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["CKDepName"].ToString(); |
|||
this.txtCKEmp.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["CKName"].ToString(); |
|||
this.txtStockAreaCode.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["StockAreaCode"].ToString(); |
|||
} |
|||
|
|||
public override void BillClear() |
|||
{ |
|||
base.BillClear(); |
|||
this.txtRKDepName.Text = ""; |
|||
this.txtRKEmp.Text = ""; |
|||
this.txtCKDepName.Text = ""; |
|||
this.txtCKEmp.Text = ""; |
|||
this.txtStockAreaCode.Text = ""; |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,172 @@ |
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
partial class frmConverNew |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtRKEmpCode = new PDAForm.PDAControl.ctrSelect(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.txtCKEmpCode = new PDAForm.PDAControl.ctrSelect(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.txtGroups = new PDAForm.PDAControl.ctrSelect(); |
|||
this.label5 = new System.Windows.Forms.Label(); |
|||
this.txtSubmitType = new System.Windows.Forms.ComboBox(); |
|||
this.label6 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtMemo
|
|||
//
|
|||
this.txtMemo.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtMemo.Location = new System.Drawing.Point(81, 116); |
|||
this.txtMemo.Size = new System.Drawing.Size(151, 23); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(7, 120); |
|||
//
|
|||
// txtBillTypeU8Code
|
|||
//
|
|||
this.txtBillTypeU8Code.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBillTypeU8Code.Location = new System.Drawing.Point(81, 161); |
|||
this.txtBillTypeU8Code.Size = new System.Drawing.Size(151, 23); |
|||
this.txtBillTypeU8Code.Visible = false; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(5, 166); |
|||
this.label3.Visible = false; |
|||
//
|
|||
// txtRKEmpCode
|
|||
//
|
|||
this.txtRKEmpCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.txtRKEmpCode.Location = new System.Drawing.Point(82, 31); |
|||
this.txtRKEmpCode.Name = "txtRKEmpCode"; |
|||
this.txtRKEmpCode.ReadOnly = false; |
|||
this.txtRKEmpCode.Size = new System.Drawing.Size(151, 23); |
|||
this.txtRKEmpCode.TabIndex = 25; |
|||
this.txtRKEmpCode.OnSelectClick += new System.EventHandler(this.txtRKEmpCode_OnSelectClick); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Location = new System.Drawing.Point(7, 36); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(100, 20); |
|||
this.label1.Text = "上架员工:"; |
|||
//
|
|||
// txtCKEmpCode
|
|||
//
|
|||
this.txtCKEmpCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.txtCKEmpCode.Location = new System.Drawing.Point(81, 60); |
|||
this.txtCKEmpCode.Name = "txtCKEmpCode"; |
|||
this.txtCKEmpCode.ReadOnly = false; |
|||
this.txtCKEmpCode.Size = new System.Drawing.Size(151, 23); |
|||
this.txtCKEmpCode.TabIndex = 30; |
|||
this.txtCKEmpCode.OnSelectClick += new System.EventHandler(this.txtCKEmpCode_OnSelectClick); |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Location = new System.Drawing.Point(7, 65); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "下架员工:"; |
|||
//
|
|||
// txtGroups
|
|||
//
|
|||
this.txtGroups.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); |
|||
this.txtGroups.Location = new System.Drawing.Point(81, 89); |
|||
this.txtGroups.Name = "txtGroups"; |
|||
this.txtGroups.ReadOnly = false; |
|||
this.txtGroups.Size = new System.Drawing.Size(151, 23); |
|||
this.txtGroups.TabIndex = 41; |
|||
this.txtGroups.OnSelectClick += new System.EventHandler(this.txtGroups_OnSelectClick); |
|||
//
|
|||
// label5
|
|||
//
|
|||
this.label5.Location = new System.Drawing.Point(4, 92); |
|||
this.label5.Name = "label5"; |
|||
this.label5.Size = new System.Drawing.Size(100, 20); |
|||
this.label5.Text = "上架班组:"; |
|||
//
|
|||
// txtSubmitType
|
|||
//
|
|||
this.txtSubmitType.Location = new System.Drawing.Point(81, 4); |
|||
this.txtSubmitType.Name = "txtSubmitType"; |
|||
this.txtSubmitType.Size = new System.Drawing.Size(154, 23); |
|||
this.txtSubmitType.TabIndex = 45; |
|||
//
|
|||
// label6
|
|||
//
|
|||
this.label6.Location = new System.Drawing.Point(7, 8); |
|||
this.label6.Name = "label6"; |
|||
this.label6.Size = new System.Drawing.Size(100, 20); |
|||
this.label6.Text = "转序类型:"; |
|||
//
|
|||
// frmConverNew
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtSubmitType); |
|||
this.Controls.Add(this.txtGroups); |
|||
this.Controls.Add(this.label5); |
|||
this.Controls.Add(this.txtCKEmpCode); |
|||
this.Controls.Add(this.label4); |
|||
this.Controls.Add(this.txtRKEmpCode); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.label6); |
|||
this.Name = "frmConverNew"; |
|||
this.Load += new System.EventHandler(this.frmConverNew_Load); |
|||
this.Controls.SetChildIndex(this.label6, 0); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.label3, 0); |
|||
this.Controls.SetChildIndex(this.txtBillTypeU8Code, 0); |
|||
this.Controls.SetChildIndex(this.txtMemo, 0); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.txtRKEmpCode, 0); |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.txtCKEmpCode, 0); |
|||
this.Controls.SetChildIndex(this.label5, 0); |
|||
this.Controls.SetChildIndex(this.txtGroups, 0); |
|||
this.Controls.SetChildIndex(this.txtSubmitType, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private PDAForm.PDAControl.ctrSelect txtRKEmpCode; |
|||
private System.Windows.Forms.Label label1; |
|||
private PDAForm.PDAControl.ctrSelect txtCKEmpCode; |
|||
private System.Windows.Forms.Label label4; |
|||
private PDAForm.PDAControl.ctrSelect txtGroups; |
|||
private System.Windows.Forms.Label label5; |
|||
private System.Windows.Forms.ComboBox txtSubmitType; |
|||
private System.Windows.Forms.Label label6; |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.SelectComm; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
public partial class frmConverNew : PDAForm.Bill.frmBillNewBase |
|||
{ |
|||
public frmConverNew() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override string BillNew() |
|||
{ |
|||
if (this.txtSubmitType.SelectedValue == null) throw new Exception("请选择转序类型!"); |
|||
|
|||
string Memo = this.txtMemo.Text.Trim(); |
|||
string RKEmpCode = this.txtRKEmpCode.Text.Trim(); |
|||
string CKEmpCode = this.txtCKEmpCode.Text.Trim(); |
|||
string Groups = this.txtGroups.Text.Trim(); |
|||
string SubmitType = this.txtSubmitType.SelectedValue.ToString(); |
|||
|
|||
F_Update.GetDataEmp(RKEmpCode); //判断这个员工编码是否存在
|
|||
F_Update.GetDataEmp(CKEmpCode); //判断这个员工编码是否存在
|
|||
|
|||
if (Groups == "") throw new Exception("班组不能为空!"); |
|||
|
|||
MyAppconfig.SetValue("默认上架员工", RKEmpCode); |
|||
MyAppconfig.SetValue("默认下架员工", CKEmpCode); |
|||
MyAppconfig.SetValue("默认转序班组", Groups); |
|||
|
|||
string Pars = Memo + ";" + UserInfo.UserName + ";" + RKEmpCode + ";" + CKEmpCode + ";" + StockAreaCode + ";" + Groups + ";" + SubmitType; |
|||
return Pars; |
|||
} |
|||
|
|||
private void txtRKEmpCode_OnSelectClick(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
frmSelectBase frm = new frmSelectBase(); |
|||
frm.m_Base = new F_SelectEmp(); |
|||
frm.selectValue = this.txtRKEmpCode.Text; |
|||
if (frm.ShowSelect() == DialogResult.OK) |
|||
{ |
|||
this.txtRKEmpCode.Text = frm.selectValue; |
|||
this.txtRKEmpCode.Focus(); |
|||
this.txtRKEmpCode.SelectAll(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
|
|||
private void txtCKEmpCode_OnSelectClick(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
frmSelectBase frm = new frmSelectBase(); |
|||
frm.m_Base = new F_SelectEmp(); |
|||
frm.selectValue = this.txtCKEmpCode.Text; |
|||
if (frm.ShowSelect() == DialogResult.OK) |
|||
{ |
|||
this.txtCKEmpCode.Text = frm.selectValue; |
|||
this.txtCKEmpCode.Focus(); |
|||
this.txtCKEmpCode.SelectAll(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
|
|||
} |
|||
|
|||
private void frmConverNew_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
this.txtGroups.Text = MyAppconfig.GetValue("默认转序班组"); |
|||
this.txtRKEmpCode.Text = MyAppconfig.GetValue("默认上架员工"); |
|||
this.txtCKEmpCode.Text = MyAppconfig.GetValue("默认下架员工"); |
|||
|
|||
DataTable dtSubmitType = new DataTable(); |
|||
dtSubmitType.Columns.Add("Name"); |
|||
DataRow drSubmitType = dtSubmitType.NewRow(); |
|||
drSubmitType["Name"] = "塑件"; |
|||
dtSubmitType.Rows.Add(drSubmitType); |
|||
|
|||
drSubmitType = dtSubmitType.NewRow(); |
|||
drSubmitType["Name"] = "油漆件"; |
|||
dtSubmitType.Rows.Add(drSubmitType); |
|||
|
|||
this.txtSubmitType.DataSource = dtSubmitType; |
|||
this.txtSubmitType.DisplayMember = "Name"; |
|||
this.txtSubmitType.ValueMember = "Name"; |
|||
} |
|||
|
|||
private void txtGroups_OnSelectClick(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
frmSelectBase frm = new frmSelectBase(); |
|||
frm.m_Base = new F_SelectGroups(); |
|||
frm.selectValue = this.txtGroups.Text; |
|||
if (frm.ShowSelect() == DialogResult.OK) |
|||
{ |
|||
this.txtGroups.Text = frm.selectValue; |
|||
this.txtGroups.Focus(); |
|||
this.txtGroups.SelectAll(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,102 @@ |
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
partial class frmConverScan |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.dgShow = new System.Windows.Forms.DataGrid(); |
|||
this.lblState = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBarCode.Size = new System.Drawing.Size(168, 23); |
|||
//
|
|||
// btnSave
|
|||
//
|
|||
this.btnSave.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// txtQty
|
|||
//
|
|||
this.txtQty.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtQty.Size = new System.Drawing.Size(79, 23); |
|||
//
|
|||
// ctrProduct1
|
|||
//
|
|||
this.ctrProduct1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// dgShow
|
|||
//
|
|||
this.dgShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); |
|||
this.dgShow.Location = new System.Drawing.Point(3, 30); |
|||
this.dgShow.Name = "dgShow"; |
|||
this.dgShow.Size = new System.Drawing.Size(232, 184); |
|||
this.dgShow.TabIndex = 21; |
|||
//
|
|||
// lblState
|
|||
//
|
|||
this.lblState.Location = new System.Drawing.Point(3, 217); |
|||
this.lblState.Name = "lblState"; |
|||
this.lblState.Size = new System.Drawing.Size(232, 20); |
|||
this.lblState.Text = "记录:0"; |
|||
//
|
|||
// frmConverScan
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.lblState); |
|||
this.Controls.Add(this.dgShow); |
|||
this.Name = "frmConverScan"; |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.txtBarCode, 0); |
|||
this.Controls.SetChildIndex(this.btnSave, 0); |
|||
this.Controls.SetChildIndex(this.ctrProduct1, 0); |
|||
this.Controls.SetChildIndex(this.label1, 0); |
|||
this.Controls.SetChildIndex(this.txtQty, 0); |
|||
this.Controls.SetChildIndex(this.dgShow, 0); |
|||
this.Controls.SetChildIndex(this.lblState, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.DataGrid dgShow; |
|||
private System.Windows.Forms.Label lblState; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,80 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.Conver |
|||
{ |
|||
public partial class frmConverScan : PDAForm.Bill.frmBillScanBase |
|||
{ |
|||
public frmConverScan() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override void ScanBarCode(string _BarCode) |
|||
{ |
|||
if (_BarCode.Length <= 0) throw new Exception("条码不能为空!"); |
|||
if (_BarCode.Length < 5) throw new Exception("条码不能小于5位!"); |
|||
|
|||
if (_BarCode.Substring(0, 1) == "R") |
|||
{ |
|||
this.btnSave.Visible = false; |
|||
this.lblState.Visible = true; |
|||
this.dgShow.Visible = true; |
|||
|
|||
((F_Conver)m_Base).ScanTrayCode(_BarCode, dgShow, lblState); |
|||
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtBarCode.Focus(); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
this.btnSave.Visible = true; |
|||
this.lblState.Visible = false; |
|||
this.dgShow.Visible = false; |
|||
|
|||
base.ScanBarCode(_BarCode); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
public override void ScanQty(int _Qty) |
|||
{ |
|||
base.ScanQty(_Qty); |
|||
|
|||
Save(); |
|||
} |
|||
|
|||
public override void Save() |
|||
{ |
|||
base.Save(); |
|||
|
|||
DataRow drData = m_Base.dsBill.Tables["BillDetail"].NewRow(); |
|||
drData["BillNo"] = m_Base.dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
drData["ProductCode"] = this.ctrProduct1.BarCode.Code; |
|||
drData["Batch"] = this.ctrProduct1.BarCode.Batch; |
|||
drData["Qty"] = this.txtQty.Text.Trim(); |
|||
m_Base.BillDetailAdd(drData); |
|||
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtQty.Text = ""; |
|||
this.ctrProduct1.Clear(); |
|||
this.txtBarCode.Focus(); |
|||
BarCode = null; |
|||
} |
|||
|
|||
private void dgShow_DoubleClick(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,182 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill |
|||
{ |
|||
public class F_BarCode |
|||
{ |
|||
public string BarCode = ""; |
|||
public string Code = ""; |
|||
public string Batch = ""; |
|||
public string Sn = ""; |
|||
|
|||
public F_BarCode() |
|||
{ |
|||
} |
|||
|
|||
public F_BarCode(string _BarCode) |
|||
{ |
|||
if (_BarCode.Length < 3) throw new Exception("条码格式错误!"); |
|||
_BarCode = _BarCode.ToUpper(); |
|||
if (_BarCode.Substring(0, 2) == "IM") |
|||
{ |
|||
#region 获取注塑机条码
|
|||
DataTable dtBarCode = GetImData(_BarCode); |
|||
if (dtBarCode.Rows.Count > 0) |
|||
{ |
|||
BarCode = dtBarCode.Rows[0]["Code"].ToString(); |
|||
Code = dtBarCode.Rows[0]["ProductCode"].ToString(); |
|||
Batch = dtBarCode.Rows[0]["Batch"].ToString(); |
|||
Sn = BarCode.Substring(BarCode.Length - 4, 4); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("注塑机条码 " + _BarCode + " 在系统中不存在!"); |
|||
} |
|||
#endregion
|
|||
} |
|||
else if (_BarCode.Substring(0, 2) == "YT") |
|||
{ |
|||
DataSet dsBarCodeState = GetBarCodeState(_BarCode); |
|||
BarCode = _BarCode; |
|||
Code = dsBarCodeState.Tables[0].Rows[0]["ProductCode"].ToString(); |
|||
Batch = dsBarCodeState.Tables[0].Rows[0]["Batch"].ToString(); |
|||
Sn = _BarCode.Substring(_BarCode.Length - 4, 4); |
|||
} |
|||
else |
|||
{ |
|||
if (_BarCode.Length < 10) throw new Exception("条码格式错误!"); |
|||
BarCode = _BarCode; |
|||
Code = F_BarCode.GetProductCode(_BarCode); //油漆件的存货代码
|
|||
//if (Code == "") Code = _BarCode.Substring(0, _BarCode.Length - 10);
|
|||
|
|||
if (Code == "") Code = _BarCode.Substring(0, 10); |
|||
|
|||
DataTable dtBarCode = GetBarCodeData(_BarCode); |
|||
if (dtBarCode.Rows.Count > 0) |
|||
{ |
|||
if (dtBarCode.Rows[0]["BatchGys"].ToString() != "") |
|||
{ |
|||
Batch = dtBarCode.Rows[0]["BatchGys"].ToString(); |
|||
} |
|||
|
|||
if (Batch == "") |
|||
{ |
|||
if (dtBarCode.Rows[0]["BatchYqj"].ToString() != "") |
|||
{ |
|||
Batch = dtBarCode.Rows[0]["BatchYqj"].ToString(); |
|||
} |
|||
} |
|||
} |
|||
if (Batch == "") Batch = _BarCode.Substring(Code.Length, 6); |
|||
Sn = _BarCode.Substring(_BarCode.Length - 4, 4); |
|||
} |
|||
} |
|||
|
|||
public static DataSet GetStateList(string Name) |
|||
{ |
|||
string Cmd = "BARCODE_STATELIST"; |
|||
string Pars = Name; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public static DataSet GetColorList() |
|||
{ |
|||
string Cmd = "PRODUCT_COLOR"; |
|||
string Pars = ""; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
//根据条码获取油漆件的存货代码,如果没有则返回空
|
|||
public static string GetProductCode(string _BarCode) |
|||
{ |
|||
string Cmd = "BARCODE_PRODUCTCODE"; |
|||
string Pars = _BarCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsData.Tables[0].Rows.Count > 0) |
|||
{ |
|||
return dsData.Tables[0].Rows[0]["ProductCode"].ToString(); |
|||
} |
|||
|
|||
return ""; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 取条码状态中的数据
|
|||
/// </summary>
|
|||
/// <param name="_BarCode"></param>
|
|||
/// <returns></returns>
|
|||
public static DataSet GetBarCodeState(string _BarCode) |
|||
{ |
|||
string Cmd = "BARCODE_STATE"; |
|||
string Pars = _BarCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsData.Tables[0].Rows.Count > 0) |
|||
{ |
|||
return dsData; |
|||
} |
|||
|
|||
throw new Exception(_BarCode + " 在系统中不存在!"); |
|||
} |
|||
|
|||
public static DataSet GetBarCodeState(string _BarCode, string ProductType, string Type, string Name) |
|||
{ |
|||
string Cmd = "BARCODE_STATE_TYPE"; |
|||
string Pars = _BarCode + ";" + ProductType + ";" + Type + ";" + Name; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsData.Tables[0].Rows.Count > 0) |
|||
{ |
|||
return dsData; |
|||
} |
|||
|
|||
throw new Exception(_BarCode + " 在系统中不存在!"); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取扫描条码的数据
|
|||
/// </summary>
|
|||
/// <param name="_BarCode"></param>
|
|||
/// <returns></returns>
|
|||
public static DataTable GetBarCodeData(string _BarCode) |
|||
{ |
|||
string Cmd = "BARCODE_DATA"; |
|||
string Pars = _BarCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
return dsData.Tables[0]; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 通过注塑机号,获取条码详细内容
|
|||
/// </summary>
|
|||
/// <param name="ImNumber"></param>
|
|||
/// <returns></returns>
|
|||
public static DataTable GetImData(string ImNumber) |
|||
{ |
|||
string Cmd = "BARCODE_IM"; |
|||
string Pars = ImNumber; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
return dsData.Tables[0]; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill |
|||
{ |
|||
public class F_BarCodeProduct : F_BarCode |
|||
{ |
|||
public F_BarCodeProduct(string _ProductCode) |
|||
{ |
|||
if (_ProductCode.Length == 0) throw new Exception("存货代码格式错误!"); |
|||
|
|||
BarCode = _ProductCode; |
|||
Code = _ProductCode; |
|||
Batch = ""; |
|||
Sn = ""; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 根据存货代码获取存货信息
|
|||
/// </summary>
|
|||
/// <param name="ProductCode"></param>
|
|||
/// <returns></returns>
|
|||
public static DataTable GetProduct(string ProductCode) |
|||
{ |
|||
string Cmd = "PRODUCT_CODE"; |
|||
string Pars = ProductCode; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
return dsData.Tables[0]; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,202 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill |
|||
{ |
|||
public class F_BillBase |
|||
{ |
|||
public string billNo = ""; |
|||
public string billType = ""; |
|||
public string billName = ""; |
|||
public string billTypeU8 = ""; |
|||
public DataSet dsBill = null; |
|||
public DataSet dsBillList = null; |
|||
|
|||
public F_BillBase() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 新建单据
|
|||
/// </summary>
|
|||
public virtual void BillNew(string Pars) |
|||
{ |
|||
string Cmd = "BILL_NEW_" + billType; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 打开一个已经存但未提交的单据
|
|||
/// </summary>
|
|||
/// <param name="Pars"></param>
|
|||
public virtual void BillOpen(string Pars) |
|||
{ |
|||
string Cmd = "BILL_OPEN_" + billType; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 删除一个未提交的单据
|
|||
/// </summary>
|
|||
/// <param name="Pars"></param>
|
|||
public virtual void BillDel(string Pars) |
|||
{ |
|||
string Cmd = "BILL_DEL_" + billType; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand()); |
|||
dsBill = null; |
|||
} |
|||
|
|||
//获取U8单据类别byType
|
|||
public virtual DataSet GetBillU8ByType() |
|||
{ |
|||
string Cmd = "BILLTYPEU8_TYPE"; |
|||
string Pars = billTypeU8; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public virtual DataSet GetBillU8ByType(string ProductType) |
|||
{ |
|||
string Cmd = "BILLTYPEU8_PTYPE"; |
|||
string Pars = billTypeU8 + ";" + ProductType; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
//获取ERP库位列表
|
|||
public virtual DataSet GetErpLocation() |
|||
{ |
|||
string Cmd = "ERPLOCATION_LIST"; |
|||
string Pars = ""; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
//获取U8单据类别byCode
|
|||
public virtual DataSet GetBillU8ByCode(string Code) |
|||
{ |
|||
string Cmd = "BILLTYPEU8_TYPE"; |
|||
string Pars = billTypeU8 + ";" + Code; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
return F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
//获取原材料待检库位
|
|||
public virtual string GetCheckLocation(string ProductCode) |
|||
{ |
|||
string Cmd = "CHECKLOCATION_DATA"; |
|||
string Pars = ProductCode; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsData.Tables[0].Rows.Count == 0) |
|||
throw new Exception(ProductCode + " 未找到待检库位!"); |
|||
|
|||
return dsData.Tables[0].Rows[0]["Code"].ToString(); |
|||
|
|||
} |
|||
|
|||
//获取原材料退货库位
|
|||
public virtual string GetReturnLocation(string ProductCode) |
|||
{ |
|||
string Cmd = "RETURNLOCATION_DATA"; |
|||
string Pars = ProductCode; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
DataSet dsData = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsData.Tables[0].Rows.Count == 0) |
|||
throw new Exception(ProductCode + " 未找到退货库位!"); |
|||
|
|||
return dsData.Tables[0].Rows[0]["Code"].ToString(); |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 获取当前用户未提交的单列表
|
|||
/// </summary>
|
|||
public virtual void BillList(DataGrid dg) |
|||
{ |
|||
string Cmd = "BILL_LIST_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBillList = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
|
|||
dg.DataSource = dsBillList.Tables[0]; |
|||
|
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBillList.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["ID"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["IsSubmit"].Width = 0; |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 添加一行单据明细记录
|
|||
/// </summary>
|
|||
/// <param name="drData"></param>
|
|||
public virtual void BillDetailAdd(DataRow drData) |
|||
{ |
|||
DataSet dsData = dsBill.Clone(); |
|||
dsData.Tables["BillDetail"].Rows.Add(drData.ItemArray); |
|||
|
|||
string Cmd = "BILL_DETAIL_ADD_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsData); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 显示单据明细列表
|
|||
/// </summary>
|
|||
/// <param name="dg"></param>
|
|||
public virtual void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
this.BillOpen(this.dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString()); |
|||
|
|||
dg.DataSource = dsBill.Tables["BillDetail"]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBill.Tables["BillDetail"].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["ID"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].Width = 0; |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 删除一个单据明细
|
|||
/// </summary>
|
|||
/// <param name="Pars"></param>
|
|||
public virtual void BillDetailDel(string Pars) |
|||
{ |
|||
string Cmd = "BILL_DEL_DETAIL_" + billType; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 提交单据
|
|||
/// </summary>
|
|||
public virtual void BillSubmit() |
|||
{ |
|||
if(this.dsBill.Tables["BillDetail"].Rows.Count <= 0) throw new Exception("提交单据失败,并未有任何单据明细!"); |
|||
|
|||
string Cmd = "BILL_SUBMIT_" + billType; |
|||
MyCommand cmd = new MyCommand(Cmd, this.dsBill.Tables["BillDetail"].Rows[0]["BillNo"].ToString()); |
|||
F_Message.ServiceMessage(cmd.GetCommand()); |
|||
dsBill = null; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,191 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using PDAForm.Bill.Receive; |
|||
using PDAForm.Bill.Ship; |
|||
using PDAForm.Bill.Conver; |
|||
using PDAForm.Bill.Move; |
|||
using PDAForm.Bill.Check; |
|||
using PDAForm.Bill.Package; |
|||
using PDAForm.Bill.Recovery; |
|||
using PDAForm.Bill.BarCode; |
|||
using PDAForm.Bill.Sort; |
|||
|
|||
namespace PDAForm.Bill |
|||
{ |
|||
public class F_Factory |
|||
{ |
|||
public static frmBillNewBase ShowBillNew(F_BillBase f_base) |
|||
{ |
|||
if (f_base.billType == "Receive") |
|||
{ |
|||
frmReceiveNew frm = new frmReceiveNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Ship") |
|||
{ |
|||
frmShipNew frm = new frmShipNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "ShipOther") |
|||
{ |
|||
frmShipOtherNew frm = new frmShipOtherNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Conver") |
|||
{ |
|||
frmConverNew frm = new frmConverNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Move") |
|||
{ |
|||
frmMoveNew frm = new frmMoveNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Check") |
|||
{ |
|||
frmCheckNew frm = new frmCheckNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Package") |
|||
{ |
|||
frmPackageNew frm = new frmPackageNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Recovery") |
|||
{ |
|||
frmRecoveryNew frm = new frmRecoveryNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "BarCode") |
|||
{ |
|||
frmBarCodeNew frm = new frmBarCodeNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Sort") |
|||
{ |
|||
frmSortNew frm = new frmSortNew(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
frmBillNewBase frmBase = new frmBillNewBase(); |
|||
frmBase.m_Base = f_base; |
|||
frmBase.Init(); |
|||
return frmBase; |
|||
|
|||
} |
|||
|
|||
public static frmBillScanBase ShowBillScan(F_BillBase f_base) |
|||
{ |
|||
if (f_base.billType == "Receive") |
|||
{ |
|||
frmReceiveScan frm = new frmReceiveScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Ship") |
|||
{ |
|||
frmShipScan frm = new frmShipScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "ShipOther") |
|||
{ |
|||
frmShipScan frm = new frmShipScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Conver") |
|||
{ |
|||
frmConverScan frm = new frmConverScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Move") |
|||
{ |
|||
frmMoveScan frm = new frmMoveScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Check") |
|||
{ |
|||
frmCheckScan frm = new frmCheckScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Package") |
|||
{ |
|||
frmPackageScan frm = new frmPackageScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "Recovery") |
|||
{ |
|||
frmRecoveryScan frm = new frmRecoveryScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
if (f_base.billType == "BarCode") |
|||
{ |
|||
frmBarCodeScan frm = new frmBarCodeScan(); |
|||
frm.m_Base = f_base; |
|||
frm.Init(); |
|||
return frm; |
|||
} |
|||
|
|||
|
|||
frmBillScanBase frmBase = new frmBillScanBase(); |
|||
frmBase.m_Base = f_base; |
|||
frmBase.Init(); |
|||
return frmBase; |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Data; |
|||
using PDAForm.Comm; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill |
|||
{ |
|||
public class F_TrayCode : F_BarCode |
|||
{ |
|||
public DataSet dsPackage = null; |
|||
|
|||
public F_TrayCode() |
|||
{ |
|||
} |
|||
|
|||
public F_TrayCode(string _BarCode) |
|||
{ |
|||
if (_BarCode.Length < 5) throw new Exception("器具条码格式错误!"); |
|||
if (_BarCode.Substring(0, 1).ToUpper() != "R") throw new Exception("器具条码格式错误,器具条码只能以R开头!"); |
|||
|
|||
BarCode = _BarCode; |
|||
Code = ""; |
|||
Batch = ""; |
|||
Sn = ""; |
|||
|
|||
string Cmd = "PACKAGE_LIST"; |
|||
string Pars = _BarCode; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsPackage = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public virtual void PackageShowList(DataGrid dg) |
|||
{ |
|||
dg.DataSource = dsPackage.Tables[0]; |
|||
|
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsPackage.Tables[0].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["ID"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["Code"].HeaderText = "器具"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "规格型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].HeaderText = "单位"; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次号"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["TrayQty"].HeaderText = "器具容量"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
public class F_Move : F_BillBase |
|||
{ |
|||
public DataSet dsLocation = null; |
|||
public F_Move() |
|||
{ |
|||
this.billType = "Move"; |
|||
this.billName = "移位"; |
|||
this.billTypeU8 = "移位单"; |
|||
} |
|||
|
|||
public override void BillList(System.Windows.Forms.DataGrid dg) |
|||
{ |
|||
base.BillList(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].HeaderText = "单据号"; |
|||
dg.TableStyles[0].GridColumnStyles["QtyTotal"].HeaderText = "单据数量"; dg.TableStyles[0].GridColumnStyles["QtyTotal"].NullText = "0"; |
|||
dg.TableStyles[0].GridColumnStyles["StockAreaCode"].HeaderText = "库区代码"; |
|||
dg.TableStyles[0].GridColumnStyles["BillTime"].HeaderText = "单据时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Memo"].HeaderText = "备注"; |
|||
dg.TableStyles[0].GridColumnStyles["UserName"].HeaderText = "操作员"; |
|||
} |
|||
|
|||
public override void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].HeaderText = "器具"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCodeSource"].HeaderText = "原库位"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCodeDest"].HeaderText = "目标库位"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,105 @@ |
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
partial class frmMove |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.txtBillTypeU8Code = new System.Windows.Forms.TextBox(); |
|||
this.label6 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// btnBillNew
|
|||
//
|
|||
this.btnBillNew.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnBillOpen
|
|||
//
|
|||
this.btnBillOpen.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnBillDelete
|
|||
//
|
|||
this.btnBillDelete.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnScan
|
|||
//
|
|||
this.btnScan.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnList
|
|||
//
|
|||
this.btnList.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnSubmit
|
|||
//
|
|||
this.btnSubmit.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// btnExit
|
|||
//
|
|||
this.btnExit.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// txtBillTypeU8Code
|
|||
//
|
|||
this.txtBillTypeU8Code.Location = new System.Drawing.Point(80, 85); |
|||
this.txtBillTypeU8Code.Name = "txtBillTypeU8Code"; |
|||
this.txtBillTypeU8Code.ReadOnly = true; |
|||
this.txtBillTypeU8Code.Size = new System.Drawing.Size(154, 23); |
|||
this.txtBillTypeU8Code.TabIndex = 44; |
|||
//
|
|||
// label6
|
|||
//
|
|||
this.label6.Location = new System.Drawing.Point(3, 89); |
|||
this.label6.Name = "label6"; |
|||
this.label6.Size = new System.Drawing.Size(100, 20); |
|||
this.label6.Text = "业务类型:"; |
|||
//
|
|||
// frmMove
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtBillTypeU8Code); |
|||
this.Controls.Add(this.label6); |
|||
this.Name = "frmMove"; |
|||
this.Controls.SetChildIndex(this.btnBillNew, 0); |
|||
this.Controls.SetChildIndex(this.btnBillOpen, 0); |
|||
this.Controls.SetChildIndex(this.btnBillDelete, 0); |
|||
this.Controls.SetChildIndex(this.btnScan, 0); |
|||
this.Controls.SetChildIndex(this.btnList, 0); |
|||
this.Controls.SetChildIndex(this.btnSubmit, 0); |
|||
this.Controls.SetChildIndex(this.btnExit, 0); |
|||
this.Controls.SetChildIndex(this.label6, 0); |
|||
this.Controls.SetChildIndex(this.txtBillTypeU8Code, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.TextBox txtBillTypeU8Code; |
|||
private System.Windows.Forms.Label label6; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
public partial class frmMove : PDAForm.Bill.frmBillBase |
|||
{ |
|||
public frmMove() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public override void BillBind() |
|||
{ |
|||
base.BillBind(); |
|||
this.txtBillTypeU8Code.Text = m_Base.dsBill.Tables["BillHead"].Rows[0]["BillTypeU8Name"].ToString(); |
|||
} |
|||
|
|||
public override void BillClear() |
|||
{ |
|||
base.BillClear(); |
|||
this.txtBillTypeU8Code.Text = ""; |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,70 @@ |
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
partial class frmMoveNew |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtMemo
|
|||
//
|
|||
this.txtMemo.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtMemo.Location = new System.Drawing.Point(84, 43); |
|||
this.txtMemo.Size = new System.Drawing.Size(151, 23); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label2.Location = new System.Drawing.Point(7, 48); |
|||
//
|
|||
// txtBillTypeU8Code
|
|||
//
|
|||
this.txtBillTypeU8Code.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBillTypeU8Code.Location = new System.Drawing.Point(84, 14); |
|||
this.txtBillTypeU8Code.Size = new System.Drawing.Size(151, 23); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(7, 17); |
|||
//
|
|||
// frmMoveNew
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.AutoScroll = false; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Name = "frmMoveNew"; |
|||
this.Load += new System.EventHandler(this.frmMoveNew_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.SelectComm; |
|||
using PDAForm.PDABiz; |
|||
|
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
public partial class frmMoveNew : PDAForm.Bill.frmBillNewBase |
|||
{ |
|||
public frmMoveNew() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void frmMoveNew_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
|
|||
public override string BillNew() |
|||
{ |
|||
string Memo = this.txtMemo.Text.Trim(); |
|||
string BillTypeU8Code = this.txtBillTypeU8Code.SelectedValue != null ? this.txtBillTypeU8Code.SelectedValue.ToString() : ""; |
|||
|
|||
string Pars = Memo + ";" + UserInfo.UserName + ";" + StockAreaCode + ";" + m_Base.billTypeU8 + ";" + BillTypeU8Code + ";"; |
|||
return Pars; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,122 @@ |
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
partial class frmMoveScan |
|||
{ |
|||
/// <summary>
|
|||
/// 必需的设计器变量。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清理所有正在使用的资源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows 窗体设计器生成的代码
|
|||
|
|||
/// <summary>
|
|||
/// 设计器支持所需的方法 - 不要
|
|||
/// 使用代码编辑器修改此方法的内容。
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.txtLocationCodeSource = new System.Windows.Forms.TextBox(); |
|||
this.txtLocationCodeDest = new System.Windows.Forms.TextBox(); |
|||
this.label4 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// txtBarCode
|
|||
//
|
|||
this.txtBarCode.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtBarCode.Size = new System.Drawing.Size(168, 23); |
|||
//
|
|||
// btnSave
|
|||
//
|
|||
this.btnSave.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// txtQty
|
|||
//
|
|||
this.txtQty.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
this.txtQty.Size = new System.Drawing.Size(79, 23); |
|||
//
|
|||
// ctrProduct1
|
|||
//
|
|||
this.ctrProduct1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular); |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label3.Location = new System.Drawing.Point(7, 209); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(100, 20); |
|||
this.label3.Text = "原库位:"; |
|||
//
|
|||
// txtLocationCodeSource
|
|||
//
|
|||
this.txtLocationCodeSource.Location = new System.Drawing.Point(52, 206); |
|||
this.txtLocationCodeSource.Name = "txtLocationCodeSource"; |
|||
this.txtLocationCodeSource.Size = new System.Drawing.Size(57, 23); |
|||
this.txtLocationCodeSource.TabIndex = 22; |
|||
this.txtLocationCodeSource.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtLocationCodeSource_KeyDown); |
|||
//
|
|||
// txtLocationCodeDest
|
|||
//
|
|||
this.txtLocationCodeDest.Location = new System.Drawing.Point(171, 206); |
|||
this.txtLocationCodeDest.Name = "txtLocationCodeDest"; |
|||
this.txtLocationCodeDest.Size = new System.Drawing.Size(57, 23); |
|||
this.txtLocationCodeDest.TabIndex = 24; |
|||
this.txtLocationCodeDest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtLocationCodeDest_KeyDown); |
|||
//
|
|||
// label4
|
|||
//
|
|||
this.label4.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); |
|||
this.label4.Location = new System.Drawing.Point(114, 209); |
|||
this.label4.Name = "label4"; |
|||
this.label4.Size = new System.Drawing.Size(100, 20); |
|||
this.label4.Text = "目标库位:"; |
|||
//
|
|||
// frmMoveScan
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; |
|||
this.ClientSize = new System.Drawing.Size(238, 275); |
|||
this.Controls.Add(this.txtLocationCodeDest); |
|||
this.Controls.Add(this.txtLocationCodeSource); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.label4); |
|||
this.Name = "frmMoveScan"; |
|||
this.Load += new System.EventHandler(this.frmMoveScan_Load); |
|||
this.Controls.SetChildIndex(this.label4, 0); |
|||
this.Controls.SetChildIndex(this.label3, 0); |
|||
this.Controls.SetChildIndex(this.txtLocationCodeSource, 0); |
|||
this.Controls.SetChildIndex(this.label2, 0); |
|||
this.Controls.SetChildIndex(this.txtBarCode, 0); |
|||
this.Controls.SetChildIndex(this.btnSave, 0); |
|||
this.Controls.SetChildIndex(this.ctrProduct1, 0); |
|||
this.Controls.SetChildIndex(this.txtQty, 0); |
|||
this.Controls.SetChildIndex(this.txtLocationCodeDest, 0); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.TextBox txtLocationCodeSource; |
|||
private System.Windows.Forms.TextBox txtLocationCodeDest; |
|||
private System.Windows.Forms.Label label4; |
|||
} |
|||
} |
@ -0,0 +1,205 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
|
|||
namespace PDAForm.Bill.Move |
|||
{ |
|||
public partial class frmMoveScan : PDAForm.Bill.frmBillScanBase |
|||
{ |
|||
public bool IsTrayScan = false; //拼器具
|
|||
public F_TrayCode TrayCode = null; //如果不为空,就是整器具移库
|
|||
public frmMoveScan() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
public string GetName() |
|||
{ |
|||
if (IsTrayScan) |
|||
{ |
|||
return "器具"; |
|||
} |
|||
else |
|||
{ |
|||
return "库位"; |
|||
} |
|||
} |
|||
|
|||
private void frmMoveScan_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override void ScanBarCode(string _BarCode) |
|||
{ |
|||
TrayCode = null; |
|||
IsTrayScan = false; |
|||
if (_BarCode.ToUpper().Substring(0, 1) == "R") //整器具移库
|
|||
{ |
|||
TrayCode = new F_TrayCode(_BarCode); |
|||
if (TrayCode.dsPackage.Tables[0].Rows.Count == 0) throw new Exception("器具中没有打包记录!"); |
|||
|
|||
BarCode = new F_BarCode(TrayCode.dsPackage.Tables[0].Rows[0]["ProductCode"].ToString() + |
|||
TrayCode.dsPackage.Tables[0].Rows[0]["Batch"].ToString() + "0001"); |
|||
|
|||
this.ctrProduct1.BarCode = BarCode; |
|||
this.ctrProduct1.InitData(); |
|||
|
|||
this.txtQty.Text = TrayCode.dsPackage.Tables[0].Rows[0]["Qty"].ToString(); |
|||
this.txtQty.ReadOnly = true; |
|||
this.label3.Text = "原库位:"; |
|||
this.label4.Text = "目标库位:"; |
|||
|
|||
this.txtLocationCodeSource.Focus(); |
|||
this.txtLocationCodeSource.SelectAll(); |
|||
} |
|||
else |
|||
{ |
|||
base.ScanBarCode(_BarCode); |
|||
|
|||
if (Convert.ToInt32(this.ctrProduct1.drProduct["IsPackage"]) == 1) |
|||
IsTrayScan = true; |
|||
else |
|||
IsTrayScan = false; |
|||
|
|||
this.txtQty.ReadOnly = false; |
|||
this.label3.Text = "原" + GetName() + ":"; |
|||
this.label4.Text = "目标" + GetName() + ":"; |
|||
|
|||
if (m_Base.dsBill.Tables["BillHead"].Rows[0]["BillTypeU8Code"].ToString() == "MK_YCL001" |
|||
|| m_Base.dsBill.Tables["BillHead"].Rows[0]["BillTypeU8Code"].ToString() == "MK_YCL003" |
|||
|| m_Base.dsBill.Tables["BillHead"].Rows[0]["BillTypeU8Code"].ToString() == "MK_YCL004") //原材料合格移位到正常库位
|
|||
{ |
|||
this.txtLocationCodeSource.ReadOnly = true; |
|||
this.txtLocationCodeSource.Text = m_Base.GetCheckLocation(this.ctrProduct1.BarCode.Code); |
|||
} |
|||
|
|||
if (m_Base.dsBill.Tables["BillHead"].Rows[0]["BillTypeU8Code"].ToString() == "MK_YCL002") //原材料不合格移位退货库位
|
|||
{ |
|||
this.txtLocationCodeSource.ReadOnly = true; |
|||
this.txtLocationCodeSource.Text = m_Base.GetCheckLocation(this.ctrProduct1.BarCode.Code); |
|||
|
|||
this.txtLocationCodeDest.ReadOnly = true; |
|||
this.txtLocationCodeDest.Text = m_Base.GetReturnLocation(this.ctrProduct1.BarCode.Code); |
|||
} |
|||
|
|||
if (BarCode.BarCode.Substring(0, 2) == "YT") |
|||
{ |
|||
this.txtQty.Text = "1"; |
|||
this.txtLocationCodeSource.Focus(); |
|||
this.txtLocationCodeSource.SelectAll(); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
public override void ScanQty(int _Qty) |
|||
{ |
|||
base.ScanQty(_Qty); |
|||
this.txtLocationCodeSource.Focus(); |
|||
this.txtLocationCodeSource.SelectAll(); |
|||
} |
|||
|
|||
public override void Save() |
|||
{ |
|||
base.Save(); |
|||
|
|||
string LocationCodeSource = this.txtLocationCodeSource.Text.Trim().ToUpper(); |
|||
string LocationCodeDest = this.txtLocationCodeDest.Text.Trim().ToUpper(); |
|||
|
|||
if (LocationCodeSource == "") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("原" + GetName() + "不能为空!"); |
|||
this.txtLocationCodeSource.Focus(); |
|||
return; |
|||
} |
|||
|
|||
if (LocationCodeDest == "") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("目标" + GetName() + "不能为空!"); |
|||
this.txtLocationCodeDest.Focus(); |
|||
return; |
|||
} |
|||
|
|||
if (IsTrayScan) |
|||
{ |
|||
if (LocationCodeSource.Substring(0, 1) != "R") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码扫描不正确!"); |
|||
this.txtLocationCodeSource.Focus(); |
|||
this.txtLocationCodeSource.SelectAll(); |
|||
return; |
|||
} |
|||
|
|||
if (LocationCodeDest.Substring(0, 1) != "R") |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("器具条码扫描不正确!"); |
|||
this.txtLocationCodeDest.Focus(); |
|||
this.txtLocationCodeDest.SelectAll(); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
DataRow drData = m_Base.dsBill.Tables["BillDetail"].NewRow(); |
|||
drData["BillNo"] = m_Base.dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
if (TrayCode != null) |
|||
{ |
|||
drData["TrayCode"] = TrayCode.dsPackage.Tables[0].Rows[0]["Code"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
drData["TrayCode"] = ""; |
|||
} |
|||
drData["ProductCode"] = this.ctrProduct1.BarCode.Code; |
|||
drData["Batch"] = this.ctrProduct1.BarCode.Batch; |
|||
drData["Qty"] = this.txtQty.Text.Trim(); |
|||
drData["LocationCodeSource"] = this.txtLocationCodeSource.Text.Trim(); |
|||
drData["LocationCodeDest"] = this.txtLocationCodeDest.Text.Trim(); |
|||
drData["BarCode"] = this.ctrProduct1.BarCode.BarCode.Substring(0, 2) == "YT" ? this.ctrProduct1.BarCode.BarCode : ""; |
|||
m_Base.BillDetailAdd(drData); |
|||
|
|||
this.txtBarCode.Text = ""; |
|||
this.txtQty.Text = ""; |
|||
this.txtLocationCodeSource.Text = ""; |
|||
this.txtLocationCodeDest.Text = ""; |
|||
this.ctrProduct1.Clear(); |
|||
this.txtBarCode.Focus(); |
|||
BarCode = null; |
|||
TrayCode = null; |
|||
} |
|||
|
|||
private void txtLocationCodeSource_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
this.txtLocationCodeDest.Focus(); |
|||
this.txtLocationCodeDest.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
private void txtLocationCodeDest_KeyDown(object sender, KeyEventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
if (e.KeyCode == Keys.Enter) |
|||
{ |
|||
Save(); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage(ex.Message); |
|||
this.txtLocationCodeDest.Focus(); |
|||
this.txtLocationCodeDest.SelectAll(); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve"> |
|||
<value>WEBPAD</value> |
|||
</metadata> |
|||
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
|||
<value>False</value> |
|||
</metadata> |
|||
</root> |
@ -0,0 +1,244 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
using System.Data; |
|||
using System.Windows.Forms; |
|||
using PDAForm.Comm; |
|||
using PDAForm.PDABiz; |
|||
using System.Net.Sockets; |
|||
using System.Net; |
|||
|
|||
namespace PDAForm.Bill.Package |
|||
{ |
|||
public class F_Package : F_BillBase |
|||
{ |
|||
public DataSet dsLocation = null; |
|||
public DataSet dsBarCodeList = null; |
|||
public F_Package() |
|||
{ |
|||
this.billType = "Package"; |
|||
this.billName = "打包"; |
|||
this.billTypeU8 = "打包入库"; |
|||
} |
|||
|
|||
public override void BillNew(string Pars) |
|||
{ |
|||
base.BillNew(Pars); |
|||
|
|||
//CkBillNo不为空的时候表示是从下架单直接来推算上架的单的
|
|||
if (dsBill.Tables["BillHead"].Rows[0]["CkBillNo"].ToString() != "") |
|||
{ |
|||
MyCommand cmd = new MyCommand("BILL_SHIP_PACKAGE", |
|||
dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString() |
|||
); |
|||
|
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
//判断QState状态是否一样,不一样的提示
|
|||
if (dsBill.Tables["ErrInfo"].Rows.Count > 0) |
|||
{ |
|||
string err = ""; |
|||
foreach (DataRow drErr in dsBill.Tables["ErrInfo"].Rows) |
|||
{ |
|||
err += drErr["Msg"].ToString() + "\r\n"; |
|||
} |
|||
MyMessageBox.ShowInfoMessage(err); |
|||
} |
|||
|
|||
//判断是否有需要混装的产品,如果有需要混装的产品,就需要手动确认库位
|
|||
if (dsBill.Tables["BillDetail"].Select("[LocationCode]=''").Length > 0) |
|||
{ |
|||
frmPackageScanLocation frm = new frmPackageScanLocation(); |
|||
frm.m_Base = this; |
|||
frm.ShowDialog(); |
|||
frm.Dispose(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override void BillList(System.Windows.Forms.DataGrid dg) |
|||
{ |
|||
base.BillList(dg); |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].HeaderText = "单据号"; |
|||
dg.TableStyles[0].GridColumnStyles["QtyTotal"].HeaderText = "单据数量"; dg.TableStyles[0].GridColumnStyles["QtyTotal"].NullText = "0"; |
|||
dg.TableStyles[0].GridColumnStyles["BillTime"].HeaderText = "单据时间"; |
|||
dg.TableStyles[0].GridColumnStyles["Memo"].HeaderText = "备注"; |
|||
dg.TableStyles[0].GridColumnStyles["UserName"].HeaderText = "操作员"; |
|||
dg.TableStyles[0].GridColumnStyles["CkBillNo"].HeaderText = "发货单号"; |
|||
} |
|||
|
|||
public override void BillDetailShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].HeaderText = "器具代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCode"].HeaderText = "库位"; |
|||
} |
|||
|
|||
public void BillDetailScanLocationShowGrid(DataGrid dg) |
|||
{ |
|||
base.BillDetailShowGrid(dg); |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].HeaderText = "器具代码"; |
|||
//dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码";
|
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
//dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号";
|
|||
dg.TableStyles[0].GridColumnStyles["Model"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
//dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型";
|
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].Width = 0; |
|||
//dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色";
|
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].Width = 0; |
|||
//dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次";
|
|||
dg.TableStyles[0].GridColumnStyles["Batch"].Width = 0; |
|||
//dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量";
|
|||
dg.TableStyles[0].GridColumnStyles["Qty"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["LocationCode"].HeaderText = "库位"; |
|||
} |
|||
|
|||
public void InitBarCodeList() |
|||
{ |
|||
dsBarCodeList = dsBill.Clone(); |
|||
dsBarCodeList.Tables["BillDetail"].Columns.Add("StockAreaCode"); |
|||
dsBarCodeList.Tables["BillDetail"].Columns["ID"].AutoIncrement = true; |
|||
dsBarCodeList.Tables["BillDetail"].Columns["ID"].AutoIncrementStep = 1; |
|||
} |
|||
|
|||
public void BarCodeListShowGrid(DataGrid dg) |
|||
{ |
|||
dg.DataSource = dsBarCodeList.Tables["BillDetail"]; |
|||
DataGridTableStyle style = new DataGridTableStyle(); |
|||
style.MappingName = dsBarCodeList.Tables["BillDetail"].TableName; |
|||
dg.TableStyles.Clear(); |
|||
dg.TableStyles.Add(style); |
|||
dg.TableStyles[0].GridColumnStyles["ID"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["TrayCode"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["BillNo"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["ProductCode"].HeaderText = "存货代码"; |
|||
dg.TableStyles[0].GridColumnStyles["ProductName"].HeaderText = "存货名称"; |
|||
dg.TableStyles[0].GridColumnStyles["Model"].HeaderText = "型号"; |
|||
dg.TableStyles[0].GridColumnStyles["UnitName"].Width = 0; |
|||
dg.TableStyles[0].GridColumnStyles["CarModelName"].HeaderText = "车型"; |
|||
dg.TableStyles[0].GridColumnStyles["ColorName"].HeaderText = "颜色"; |
|||
dg.TableStyles[0].GridColumnStyles["Batch"].HeaderText = "批次"; |
|||
dg.TableStyles[0].GridColumnStyles["Qty"].HeaderText = "数量"; |
|||
dg.TableStyles[0].GridColumnStyles["BarCode"].HeaderText = "条码"; |
|||
dg.TableStyles[0].GridColumnStyles["StockAreaCode"].HeaderText = "库区"; |
|||
} |
|||
|
|||
public DataSet BillDetailAdd() |
|||
{ |
|||
string Cmd = "BILL_DETAIL_ADD_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
|
|||
DataSet dsRet = F_Message.ServiceMessage(cmd.GetCommand(), dsBarCodeList); |
|||
if (dsRet.Tables[0].Rows.Count == 0) |
|||
{ |
|||
throw new Exception("打包失败,请重新扫描器具!"); |
|||
} |
|||
|
|||
dsBarCodeList.Tables["BillDetail"].Rows.Clear(); |
|||
|
|||
return dsRet; |
|||
} |
|||
|
|||
public void BillDetailAddOnly() |
|||
{ |
|||
string Cmd = "BILL_DETAIL_ADD_ONLY_" + billType; |
|||
string Pars = UserInfo.UserName; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
|
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBarCodeList); |
|||
dsBarCodeList.Tables["BillDetail"].Rows.Clear(); |
|||
} |
|||
|
|||
public void BillDetailAddMix(string TrayCode, string Location) |
|||
{ |
|||
if (dsBarCodeList.Tables["BillDetail"].Rows.Count == 0) throw new Exception("请先扫描打包记录!"); |
|||
|
|||
string Cmd = "BILL_DETAIL_ADD_MIX_" + billType; |
|||
string Pars = TrayCode + ";" + Location + ";" + UserInfo.UserName; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
|
|||
F_Message.ServiceMessage(cmd.GetCommand(), dsBarCodeList); |
|||
|
|||
dsBarCodeList.Tables["BillDetail"].Rows.Clear(); |
|||
} |
|||
|
|||
public void ScanTrayCode(string TrayCode, string Location) |
|||
{ |
|||
string BillNo = dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
string Cmd = "BILL_SCAN_TRAYCODE_" + billType; |
|||
string Pars = TrayCode + ";" + Location + ";" + BillNo; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
dsBill = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
public void PrintTrayLable(string DetailID) |
|||
{ |
|||
F_Socket.Send("PRINT_TR" + DetailID); |
|||
} |
|||
|
|||
public void PrintLocationLable(string billNo) |
|||
{ |
|||
F_Socket.Send("PRINT_PG" + billNo); |
|||
} |
|||
|
|||
public override void BillSubmit() |
|||
{ |
|||
if (IsPackageReceive()) |
|||
{ |
|||
if (dsBill.Tables["BillDetail"].Select("[LocationCode] = ''").Length != 0) |
|||
{ |
|||
MyMessageBox.ShowErrorMessage("单据提交失败,还有库位没有扫描完,请扫描完库位再提交!"); |
|||
frmPackageScanLocation frm = new frmPackageScanLocation(); |
|||
frm.m_Base = this; |
|||
frm.ShowDialog(); |
|||
frm.Dispose(); |
|||
|
|||
throw new Exception("请重新提交单据!"); |
|||
} |
|||
} |
|||
|
|||
base.BillSubmit(); |
|||
} |
|||
|
|||
public void ChangLocation(string TrayCode, string Location, string LocationNew) |
|||
{ |
|||
string BillNo = dsBill.Tables["BillHead"].Rows[0]["BillNo"].ToString(); |
|||
string Cmd = "BILL_CHANG_LOCATION_" + billType; |
|||
string Pars = BillNo + ";" + TrayCode + ";" + Location + ";" + LocationNew; |
|||
|
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
F_Message.ServiceMessage(cmd.GetCommand()); |
|||
} |
|||
|
|||
//判断当前是否允许打包并且上架
|
|||
public bool IsPackageReceive() |
|||
{ |
|||
string Cmd = "ISPACKAGERECEIVE"; |
|||
string Pars = ""; |
|||
MyCommand cmd = new MyCommand(Cmd, Pars); |
|||
|
|||
DataSet dsRet = F_Message.ServiceMessage(cmd.GetCommand()); |
|||
if (dsRet.Tables[0].Rows.Count > 0) |
|||
{ |
|||
if (dsRet.Tables[0].Rows[0]["Str"].ToString() == "是") |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue