bfdcbcd2 by white

亚心医院专用查询程序

1 parent c383c570
Showing 149 changed files with 1518 additions and 0 deletions
No preview for this file type
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 # Visual Studio 14
4 VisualStudioVersion = 14.0.25420.1
5 MinimumVisualStudioVersion = 10.0.40219.1
6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HcgClientExport", "HcgClientExport\HcgClientExport.csproj", "{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}"
7 EndProject
8 Global
9 GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 Debug|Any CPU = Debug|Any CPU
11 Debug|x86 = Debug|x86
12 Release|Any CPU = Release|Any CPU
13 Release|x86 = Release|x86
14 EndGlobalSection
15 GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|x86.ActiveCfg = Debug|x86
19 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|x86.Build.0 = Debug|x86
20 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|Any CPU.Build.0 = Release|Any CPU
22 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|x86.ActiveCfg = Release|x86
23 {D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|x86.Build.0 = Release|x86
24 EndGlobalSection
25 GlobalSection(SolutionProperties) = preSolution
26 HideSolutionNode = FALSE
27 EndGlobalSection
28 GlobalSection(ExtensibilityGlobals) = postSolution
29 SolutionGuid = {265F3B90-60F0-418F-BFF0-C74D19312827}
30 EndGlobalSection
31 EndGlobal
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="DSA手术室~ZNG007"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="链享科技耗材柜科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
11 <add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
12 <add key="url" value="http://localhost:9538/"/>
13 <add key="xh" value="hcg/yxsap/GetSapConsumption"/>
14 <add key="bs" value="hcg/yxsap/GetSappd"/>
15 </appSettings>
16 </configuration>
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace HcgClientExport
7 {
8 public class En
9 {
10 public static string GenerateMD5(string txt)
11 {
12 using (System.Security.Cryptography.MD5 mi = System.Security.Cryptography.MD5.Create())
13 {
14 byte[] buffer = Encoding.Default.GetBytes(txt);
15 //开始加密
16 byte[] newBuffer = mi.ComputeHash(buffer);
17 StringBuilder sb = new StringBuilder();
18 for (int i = 0; i < newBuffer.Length; i++)
19 {
20 sb.Append(newBuffer[i].ToString("x2"));
21 }
22 return sb.ToString();
23 }
24 }
25 }
26 }
1 using NPOI.HSSF.UserModel;
2 using NPOI.SS.UserModel;
3 using NPOI.XSSF.UserModel;
4 using System;
5 using System.Collections.Generic;
6 using System.Data;
7 using System.IO;
8 using System.Linq;
9 using System.Text;
10
11
12 namespace HcgClientExport
13 {
14 public class ExportHelper
15 {
16 /// <summary>
17 /// Datable导出成Excel
18 /// </summary>
19 /// <param name="dt"></param>
20 /// <param name="file">导出路径(包括文件名与扩展名)</param>
21 public static void TableToExcel(DataTable dt, string file)
22 {
23 IWorkbook workbook;
24 string fileExt = Path.GetExtension(file).ToLower();
25 if (fileExt == ".xlsx") { workbook = new XSSFWorkbook(); } else if (fileExt == ".xls") { workbook = new HSSFWorkbook(); } else { workbook = null; }
26 if (workbook == null) { return; }
27 ISheet sheet = string.IsNullOrEmpty(dt.TableName) ? workbook.CreateSheet("Sheet1") : workbook.CreateSheet(dt.TableName);
28
29 //表头
30 IRow row = sheet.CreateRow(0);
31 for (int i = 0; i < dt.Columns.Count; i++)
32 {
33 ICell cell = row.CreateCell(i);
34 cell.SetCellValue(dt.Columns[i].ColumnName);
35 }
36
37 //数据
38 for (int i = 0; i < dt.Rows.Count; i++)
39 {
40 IRow row1 = sheet.CreateRow(i + 1);
41 for (int j = 0; j < dt.Columns.Count; j++)
42 {
43 ICell cell = row1.CreateCell(j);
44 cell.SetCellValue(dt.Rows[i][j].ToString());
45 }
46 }
47
48 //转为字节数组
49 MemoryStream stream = new MemoryStream();
50 workbook.Write(stream);
51 var buf = stream.ToArray();
52
53 //保存为Excel文件
54 using (FileStream fs = new FileStream(file, FileMode.Create, FileAccess.Write))
55 {
56 fs.Write(buf, 0, buf.Length);
57 fs.Flush();
58 }
59 }
60 }
61 }
This diff could not be displayed because it is too large.
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7 <ProjectGuid>{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}</ProjectGuid>
8 <OutputType>WinExe</OutputType>
9 <RootNamespace>HcgClientExport</RootNamespace>
10 <AssemblyName>HcgClientExport</AssemblyName>
11 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12 <FileAlignment>512</FileAlignment>
13 <Deterministic>true</Deterministic>
14 <TargetFrameworkProfile>Client</TargetFrameworkProfile>
15 </PropertyGroup>
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 <PlatformTarget>AnyCPU</PlatformTarget>
18 <DebugSymbols>true</DebugSymbols>
19 <DebugType>full</DebugType>
20 <Optimize>false</Optimize>
21 <OutputPath>bin\Debug\</OutputPath>
22 <DefineConstants>DEBUG;TRACE</DefineConstants>
23 <ErrorReport>prompt</ErrorReport>
24 <WarningLevel>4</WarningLevel>
25 <Prefer32Bit>false</Prefer32Bit>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28 <PlatformTarget>AnyCPU</PlatformTarget>
29 <DebugType>pdbonly</DebugType>
30 <Optimize>true</Optimize>
31 <OutputPath>bin\Release\</OutputPath>
32 <DefineConstants>TRACE</DefineConstants>
33 <ErrorReport>prompt</ErrorReport>
34 <WarningLevel>4</WarningLevel>
35 <Prefer32Bit>false</Prefer32Bit>
36 </PropertyGroup>
37 <PropertyGroup>
38 <ApplicationIcon>stock_market_96px_1082607_easyicon.net.ico</ApplicationIcon>
39 </PropertyGroup>
40 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
41 <DebugSymbols>true</DebugSymbols>
42 <OutputPath>bin\x86\Debug\</OutputPath>
43 <DefineConstants>DEBUG;TRACE</DefineConstants>
44 <DebugType>full</DebugType>
45 <PlatformTarget>x86</PlatformTarget>
46 <ErrorReport>prompt</ErrorReport>
47 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
48 </PropertyGroup>
49 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
50 <OutputPath>bin\x86\Release\</OutputPath>
51 <DefineConstants>TRACE</DefineConstants>
52 <Optimize>true</Optimize>
53 <DebugType>pdbonly</DebugType>
54 <PlatformTarget>x86</PlatformTarget>
55 <ErrorReport>prompt</ErrorReport>
56 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
57 </PropertyGroup>
58 <ItemGroup>
59 <Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
60 <HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
61 </Reference>
62 <Reference Include="MySql.Data, Version=8.0.17.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
63 <SpecificVersion>False</SpecificVersion>
64 <HintPath>bin\Debug\MySql.Data.dll</HintPath>
65 </Reference>
66 <Reference Include="NPOI, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
67 <HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.dll</HintPath>
68 </Reference>
69 <Reference Include="NPOI.OOXML, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
70 <HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OOXML.dll</HintPath>
71 </Reference>
72 <Reference Include="NPOI.OpenXml4Net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
73 <HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OpenXml4Net.dll</HintPath>
74 </Reference>
75 <Reference Include="NPOI.OpenXmlFormats, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
76 <HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OpenXmlFormats.dll</HintPath>
77 </Reference>
78 <Reference Include="System" />
79 <Reference Include="System.Configuration" />
80 <Reference Include="System.Core" />
81 <Reference Include="System.Xml.Linq" />
82 <Reference Include="System.Data.DataSetExtensions" />
83 <Reference Include="System.Data" />
84 <Reference Include="System.Deployment" />
85 <Reference Include="System.Drawing" />
86 <Reference Include="System.Windows.Forms" />
87 <Reference Include="System.Xml" />
88 </ItemGroup>
89 <ItemGroup>
90 <Compile Include="DataControl.cs" />
91 <Compile Include="En.cs" />
92 <Compile Include="ExportHelper.cs" />
93 <Compile Include="Form1.cs">
94 <SubType>Form</SubType>
95 </Compile>
96 <Compile Include="Form1.Designer.cs">
97 <DependentUpon>Form1.cs</DependentUpon>
98 </Compile>
99 <Compile Include="his_goods_buound.cs" />
100 <Compile Include="login.cs">
101 <SubType>Form</SubType>
102 </Compile>
103 <Compile Include="login.Designer.cs">
104 <DependentUpon>login.cs</DependentUpon>
105 </Compile>
106 <Compile Include="MySqlHelper.cs" />
107 <Compile Include="Program.cs" />
108 <Compile Include="Properties\AssemblyInfo.cs" />
109 <Compile Include="RestClient.cs" />
110 <Compile Include="WinApi.cs" />
111 <EmbeddedResource Include="Form1.resx">
112 <DependentUpon>Form1.cs</DependentUpon>
113 </EmbeddedResource>
114 <EmbeddedResource Include="login.resx">
115 <DependentUpon>login.cs</DependentUpon>
116 </EmbeddedResource>
117 <EmbeddedResource Include="Properties\Resources.resx">
118 <Generator>ResXFileCodeGenerator</Generator>
119 <LastGenOutput>Resources.Designer.cs</LastGenOutput>
120 <SubType>Designer</SubType>
121 </EmbeddedResource>
122 <Compile Include="Properties\Resources.Designer.cs">
123 <AutoGen>True</AutoGen>
124 <DependentUpon>Resources.resx</DependentUpon>
125 <DesignTime>True</DesignTime>
126 </Compile>
127 <None Include="packages.config" />
128 <None Include="Properties\Settings.settings">
129 <Generator>SettingsSingleFileGenerator</Generator>
130 <LastGenOutput>Settings.Designer.cs</LastGenOutput>
131 </None>
132 <Compile Include="Properties\Settings.Designer.cs">
133 <AutoGen>True</AutoGen>
134 <DependentUpon>Settings.settings</DependentUpon>
135 <DesignTimeSharedInput>True</DesignTimeSharedInput>
136 </Compile>
137 </ItemGroup>
138 <ItemGroup>
139 <None Include="App.config">
140 <SubType>Designer</SubType>
141 </None>
142 </ItemGroup>
143 <ItemGroup>
144 <Content Include="stock_market_96px_1082607_easyicon.net.ico" />
145 </ItemGroup>
146 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
147 </Project>
...\ No newline at end of file ...\ No newline at end of file
1 using MySql.Data.MySqlClient;
2 using System;
3 using System.Collections;
4 using System.Collections.Generic;
5 using System.Configuration;
6 using System.Data;
7 using System.Linq;
8 using System.Text;
9
10
11 namespace HcgClientExport
12 {
13 public abstract class MySQLHelper
14 {
15 //数据库连接字符串(注意:这里的“DBConnectionString”一定要与web.config文件中connectionStrings节点值一致)
16 public static string connectionString = ConfigurationManager.AppSettings["connstr"];
17
18 // 用于缓存参数的HASH表
19 private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
20
21 /// <summary>
22 /// 给定连接的数据库用假设参数执行一个sql命令(不返回数据集)
23 /// </summary>
24 /// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
25 /// <param name="cmdText">存储过程名称或者sql命令语句</param>
26 /// <param name="commandParameters">执行命令所用参数的集合</param>
27 /// <returns>执行命令所影响的行数</returns>
28 public static int ExecuteNonQuery(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
29 {
30
31
32 MySqlCommand cmd = new MySqlCommand();
33
34
35 using (MySqlConnection conn = new MySqlConnection(connectionString))
36 {
37 PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
38 int val = cmd.ExecuteNonQuery();
39 cmd.Parameters.Clear();
40 return val;
41 }
42 }
43
44 /// <summary>
45 /// 用执行的数据库连接执行一个返回数据集的sql命令
46 /// </summary>
47 /// <remarks>
48 /// 举例:
49 /// MySqlDataReader r = ExecuteReader(connString, CommandType.StoredProcedure, "PublishOrders", new MySqlParameter("@prodid", 24));
50 /// </remarks>
51 /// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
52 /// <param name="cmdText">存储过程名称或者sql命令语句</param>
53 /// <param name="commandParameters">执行命令所用参数的集合</param>
54 /// <returns>包含结果的读取器</returns>
55 public static MySqlDataReader ExecuteReader(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
56 {
57 //创建一个MySqlCommand对象
58 MySqlCommand cmd = new MySqlCommand();
59 //创建一个MySqlConnection对象
60 MySqlConnection conn = new MySqlConnection(connectionString);
61
62
63 //在这里我们用一个try/catch结构执行sql文本命令/存储过程,因为如果这个方法产生一个异常我们要关闭连接,因为没有读取器存在,
64 //因此commandBehaviour.CloseConnection 就不会执行
65 try
66 {
67 //调用 PrepareCommand 方法,对 MySqlCommand 对象设置参数
68 PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
69 //调用 MySqlCommand 的 ExecuteReader 方法
70 MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
71 //清除参数
72 cmd.Parameters.Clear();
73 return reader;
74 }
75 catch
76 {
77 //关闭连接,抛出异常
78 conn.Close();
79 throw;
80 }
81 }
82
83 /// <summary>
84 /// 返回DataSet
85 /// </summary>
86 /// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
87 /// <param name="cmdText">存储过程名称或者sql命令语句</param>
88 /// <param name="commandParameters">执行命令所用参数的集合</param>
89 /// <returns></returns>
90 public static DataSet GetDataSet(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
91 {
92 //创建一个MySqlCommand对象
93 MySqlCommand cmd = new MySqlCommand();
94 //创建一个MySqlConnection对象
95 MySqlConnection conn = new MySqlConnection(connectionString);
96
97
98 //在这里我们用一个try/catch结构执行sql文本命令/存储过程,因为如果这个方法产生一个异常我们要关闭连接,因为没有读取器存在,
99
100
101 try
102 {
103 //调用 PrepareCommand 方法,对 MySqlCommand 对象设置参数
104 PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
105 //调用 MySqlCommand 的 ExecuteReader 方法
106 MySqlDataAdapter adapter = new MySqlDataAdapter();
107 adapter.SelectCommand = cmd;
108 DataSet ds = new DataSet();
109
110
111 adapter.Fill(ds);
112 //清除参数
113 cmd.Parameters.Clear();
114 conn.Close();
115 return ds;
116 }
117 catch (Exception e)
118 {
119 throw e;
120 }
121 }
122
123 /// <summary>
124 /// 用指定的数据库连接字符串执行一个命令并返回一个数据集的第一列
125 /// </summary>
126 /// <remarks>
127 ///例如:
128 /// Object obj = ExecuteScalar(connString, CommandType.StoredProcedure, "PublishOrders", new MySqlParameter("@prodid", 24));
129 /// </remarks>
130 /// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
131 /// <param name="cmdText">存储过程名称或者sql命令语句</param>
132 /// <param name="commandParameters">执行命令所用参数的集合</param>
133 /// <returns>用 Convert.To{Type}把类型转换为想要的 </returns>
134 public static object ExecuteScalar(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
135 {
136 MySqlCommand cmd = new MySqlCommand();
137
138
139 using (MySqlConnection connection = new MySqlConnection(connectionString))
140 {
141 PrepareCommand(cmd, connection, null, cmdType, cmdText, commandParameters);
142 object val = cmd.ExecuteScalar();
143 cmd.Parameters.Clear();
144 return val;
145 }
146 }
147
148 /// <summary>
149 /// 将参数集合添加到缓存
150 /// </summary>
151 /// <param name="cacheKey">添加到缓存的变量</param>
152 /// <param name="commandParameters">一个将要添加到缓存的sql参数集合</param>
153 public static void CacheParameters(string cacheKey, params MySqlParameter[] commandParameters)
154 {
155 parmCache[cacheKey] = commandParameters;
156 }
157
158 /// <summary>
159 /// 找回缓存参数集合
160 /// </summary>
161 /// <param name="cacheKey">用于找回参数的关键字</param>
162 /// <returns>缓存的参数集合</returns>
163 public static MySqlParameter[] GetCachedParameters(string cacheKey)
164 {
165 MySqlParameter[] cachedParms = (MySqlParameter[])parmCache[cacheKey];
166
167
168 if (cachedParms == null)
169 return null;
170
171
172 MySqlParameter[] clonedParms = new MySqlParameter[cachedParms.Length];
173
174
175 for (int i = 0, j = cachedParms.Length; i < j; i++)
176 clonedParms[i] = (MySqlParameter)((ICloneable)cachedParms[i]).Clone();
177
178
179 return clonedParms;
180 }
181
182 /// <summary>
183 /// 准备执行一个命令
184 /// </summary>
185 /// <param name="cmd">sql命令</param>
186 /// <param name="conn">OleDb连接</param>
187 /// <param name="trans">OleDb事务</param>
188 /// <param name="cmdType">命令类型例如 存储过程或者文本</param>
189 /// <param name="cmdText">命令文本,例如:Select * from Products</param>
190 /// <param name="cmdParms">执行命令的参数</param>
191 private static void PrepareCommand(MySqlCommand cmd, MySqlConnection conn, MySqlTransaction trans, CommandType cmdType, string cmdText, MySqlParameter[] cmdParms)
192 {
193 if (conn.State != ConnectionState.Open)
194 conn.Open();
195
196 cmd.Connection = conn;
197 cmd.CommandText = cmdText;
198
199
200 if (trans != null)
201 cmd.Transaction = trans;
202
203
204 cmd.CommandType = cmdType;
205
206
207 if (cmdParms != null)
208 {
209 foreach (MySqlParameter parameter in cmdParms)
210 {
211 if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) &&
212 (parameter.Value == null))
213 {
214 parameter.Value = DBNull.Value;
215 }
216 cmd.Parameters.Add(parameter);
217 }
218 }
219 }
220 }
221 }
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Windows.Forms;
5
6 namespace HcgClientExport
7 {
8 static class Program
9 {
10 /// <summary>
11 /// 应用程序的主入口点。
12 /// </summary>
13 [STAThread]
14 static void Main()
15 {
16 Application.EnableVisualStyles();
17 Application.SetCompatibleTextRenderingDefault(false);
18 Application.Run(new login());
19 }
20 }
21 }
1 using System.Reflection;
2 using System.Runtime.CompilerServices;
3 using System.Runtime.InteropServices;
4
5 // 有关程序集的一般信息由以下
6 // 控制。更改这些特性值可修改
7 // 与程序集关联的信息。
8 [assembly: AssemblyTitle("HcgClientExport")]
9 [assembly: AssemblyDescription("")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("")]
12 [assembly: AssemblyProduct("HcgClientExport")]
13 [assembly: AssemblyCopyright("Copyright © 2019")]
14 [assembly: AssemblyTrademark("")]
15 [assembly: AssemblyCulture("")]
16
17 // 将 ComVisible 设置为 false 会使此程序集中的类型
18 //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 //请将此类型的 ComVisible 特性设置为 true。
20 [assembly: ComVisible(false)]
21
22 // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 [assembly: Guid("d395b57c-8a8f-47ee-8dc6-0d83158ec3c6")]
24
25 // 程序集的版本信息由下列四个值组成:
26 //
27 // 主版本
28 // 次版本
29 // 生成号
30 // 修订号
31 //
32 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 // 方法是按如下所示使用“*”: :
34 // [assembly: AssemblyVersion("1.0.*")]
35 [assembly: AssemblyVersion("1.0.0.0")]
36 [assembly: AssemblyFileVersion("1.0.0.0")]
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // 此代码由工具生成。
4 // 运行时版本:4.0.30319.42000
5 //
6 // 对此文件的更改可能会导致不正确的行为,并且如果
7 // 重新生成代码,这些更改将会丢失。
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace HcgClientExport.Properties {
12 using System;
13
14
15 /// <summary>
16 /// 一个强类型的资源类,用于查找本地化的字符串等。
17 /// </summary>
18 // 此类是由 StronglyTypedResourceBuilder
19 // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 // (以 /str 作为命令选项),或重新生成 VS 项目。
22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 internal class Resources {
26
27 private static global::System.Resources.ResourceManager resourceMan;
28
29 private static global::System.Globalization.CultureInfo resourceCulture;
30
31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 internal Resources() {
33 }
34
35 /// <summary>
36 /// 返回此类使用的缓存的 ResourceManager 实例。
37 /// </summary>
38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 internal static global::System.Resources.ResourceManager ResourceManager {
40 get {
41 if (object.ReferenceEquals(resourceMan, null)) {
42 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HcgClientExport.Properties.Resources", typeof(Resources).Assembly);
43 resourceMan = temp;
44 }
45 return resourceMan;
46 }
47 }
48
49 /// <summary>
50 /// 使用此强类型资源类,为所有资源查找
51 /// 重写当前线程的 CurrentUICulture 属性。
52 /// </summary>
53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 internal static global::System.Globalization.CultureInfo Culture {
55 get {
56 return resourceCulture;
57 }
58 set {
59 resourceCulture = value;
60 }
61 }
62 }
63 }
1 <?xml version="1.0" encoding="utf-8"?>
2 <root>
3 <!--
4 Microsoft ResX Schema
5
6 Version 2.0
7
8 The primary goals of this format is to allow a simple XML format
9 that is mostly human readable. The generation and parsing of the
10 various data types are done through the TypeConverter classes
11 associated with the data types.
12
13 Example:
14
15 ... ado.net/XML headers & schema ...
16 <resheader name="resmimetype">text/microsoft-resx</resheader>
17 <resheader name="version">2.0</resheader>
18 <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19 <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20 <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21 <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22 <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23 <value>[base64 mime encoded serialized .NET Framework object]</value>
24 </data>
25 <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26 <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27 <comment>This is a comment</comment>
28 </data>
29
30 There are any number of "resheader" rows that contain simple
31 name/value pairs.
32
33 Each data row contains a name, and value. The row also contains a
34 type or mimetype. Type corresponds to a .NET class that support
35 text/value conversion through the TypeConverter architecture.
36 Classes that don't support this are serialized and stored with the
37 mimetype set.
38
39 The mimetype is used for serialized objects, and tells the
40 ResXResourceReader how to depersist the object. This is currently not
41 extensible. For a given mimetype the value must be set accordingly:
42
43 Note - application/x-microsoft.net.object.binary.base64 is the format
44 that the ResXResourceWriter will generate, however the reader can
45 read any of the formats listed below.
46
47 mimetype: application/x-microsoft.net.object.binary.base64
48 value : The object must be serialized with
49 : System.Serialization.Formatters.Binary.BinaryFormatter
50 : and then encoded with base64 encoding.
51
52 mimetype: application/x-microsoft.net.object.soap.base64
53 value : The object must be serialized with
54 : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55 : and then encoded with base64 encoding.
56
57 mimetype: application/x-microsoft.net.object.bytearray.base64
58 value : The object must be serialized into a byte array
59 : using a System.ComponentModel.TypeConverter
60 : and then encoded with base64 encoding.
61 -->
62 <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63 <xsd:element name="root" msdata:IsDataSet="true">
64 <xsd:complexType>
65 <xsd:choice maxOccurs="unbounded">
66 <xsd:element name="metadata">
67 <xsd:complexType>
68 <xsd:sequence>
69 <xsd:element name="value" type="xsd:string" minOccurs="0" />
70 </xsd:sequence>
71 <xsd:attribute name="name" type="xsd:string" />
72 <xsd:attribute name="type" type="xsd:string" />
73 <xsd:attribute name="mimetype" type="xsd:string" />
74 </xsd:complexType>
75 </xsd:element>
76 <xsd:element name="assembly">
77 <xsd:complexType>
78 <xsd:attribute name="alias" type="xsd:string" />
79 <xsd:attribute name="name" type="xsd:string" />
80 </xsd:complexType>
81 </xsd:element>
82 <xsd:element name="data">
83 <xsd:complexType>
84 <xsd:sequence>
85 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
86 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
87 </xsd:sequence>
88 <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
89 <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
90 <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
91 </xsd:complexType>
92 </xsd:element>
93 <xsd:element name="resheader">
94 <xsd:complexType>
95 <xsd:sequence>
96 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
97 </xsd:sequence>
98 <xsd:attribute name="name" type="xsd:string" use="required" />
99 </xsd:complexType>
100 </xsd:element>
101 </xsd:choice>
102 </xsd:complexType>
103 </xsd:element>
104 </xsd:schema>
105 <resheader name="resmimetype">
106 <value>text/microsoft-resx</value>
107 </resheader>
108 <resheader name="version">
109 <value>2.0</value>
110 </resheader>
111 <resheader name="reader">
112 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
113 </resheader>
114 <resheader name="writer">
115 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116 </resheader>
117 </root>
...\ No newline at end of file ...\ No newline at end of file
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // 此代码由工具生成。
4 // 运行时版本:4.0.30319.42000
5 //
6 // 对此文件的更改可能会导致不正确的行为,并且如果
7 // 重新生成代码,这些更改将会丢失。
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace HcgClientExport.Properties {
12
13
14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17
18 private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19
20 public static Settings Default {
21 get {
22 return defaultInstance;
23 }
24 }
25 }
26 }
1 <?xml version='1.0' encoding='utf-8'?>
2 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
3 <Profiles>
4 <Profile Name="(Default)" />
5 </Profiles>
6 <Settings />
7 </SettingsFile>
1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using System.Net;
5 using System.Text;
6 using System.Web;
7
8 namespace HcgClientExport
9 {
10 class RestClient
11 {
12 private string BaseUri;
13 public RestClient(string baseUri)
14 {
15 this.BaseUri = baseUri;
16 }
17
18 #region Get请求
19 public string Get(string uri)
20 {
21 //先根据用户请求的uri构造请求地址
22 string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
23 //创建Web访问对 象
24 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
25 //通过Web访问对象获取响应内容
26 HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
27 //通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
28 StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
29 //string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
30 string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
31 reader.Close();
32 myResponse.Close();
33 return returnXml;
34 }
35 #endregion
36
37 #region Post请求
38 public string Post(string data, string uri)
39 {
40 //先根据用户请求的uri构造请求地址
41 string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
42 //创建Web访问对象
43 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
44 //把用户传过来的数据转成“UTF-8”的字节流
45 byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
46
47 myRequest.Method = "POST";
48 myRequest.ContentLength = buf.Length;
49 myRequest.ContentType = "application/json";
50 myRequest.MaximumAutomaticRedirections = 1;
51 myRequest.AllowAutoRedirect = true;
52 //发送请求
53 Stream stream = myRequest.GetRequestStream();
54 stream.Write(buf, 0, buf.Length);
55 stream.Close();
56
57 //获取接口返回值
58 //通过Web访问对象获取响应内容
59 HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
60 //通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
61 StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
62 //string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
63 string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
64 reader.Close();
65 myResponse.Close();
66 return returnXml;
67
68 }
69 #endregion
70
71 #region Put请求
72 public string Put(string data, string uri)
73 {
74 //先根据用户请求的uri构造请求地址
75 string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
76 //创建Web访问对象
77 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
78 //把用户传过来的数据转成“UTF-8”的字节流
79 byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
80
81 myRequest.Method = "PUT";
82 myRequest.ContentLength = buf.Length;
83 myRequest.ContentType = "application/json";
84 myRequest.MaximumAutomaticRedirections = 1;
85 myRequest.AllowAutoRedirect = true;
86 //发送请求
87 Stream stream = myRequest.GetRequestStream();
88 stream.Write(buf, 0, buf.Length);
89 stream.Close();
90
91 //获取接口返回值
92 //通过Web访问对象获取响应内容
93 HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
94 //通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
95 StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
96 //string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
97 string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
98 reader.Close();
99 myResponse.Close();
100 return returnXml;
101
102 }
103 #endregion
104
105
106 #region Delete请求
107 public string Delete(string data, string uri)
108 {
109 //先根据用户请求的uri构造请求地址
110 string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
111 //创建Web访问对象
112 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
113 //把用户传过来的数据转成“UTF-8”的字节流
114 byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
115
116 myRequest.Method = "DELETE";
117 myRequest.ContentLength = buf.Length;
118 myRequest.ContentType = "application/json";
119 myRequest.MaximumAutomaticRedirections = 1;
120 myRequest.AllowAutoRedirect = true;
121 //发送请求
122 Stream stream = myRequest.GetRequestStream();
123 stream.Write(buf, 0, buf.Length);
124 stream.Close();
125
126 //获取接口返回值
127 //通过Web访问对象获取响应内容
128 HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
129 //通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
130 StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
131 //string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
132 string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
133 reader.Close();
134 myResponse.Close();
135 return returnXml;
136
137 }
138 #endregion
139 }
140 }
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Runtime.InteropServices;
5 using System.Text;
6
7
8 namespace HcgClientExport
9 {
10 public static class WinAPI
11 {
12 [DllImport("kernel32")] // 写入配置文件的接口
13 private static extern long WritePrivateProfileString(
14 string section, string key, string val, string filePath);
15 [DllImport("kernel32")] // 读取配置文件的接口
16 private static extern int GetPrivateProfileString(
17 string section, string key, string def,
18 StringBuilder retVal, int size, string filePath);
19 // 向配置文件写入值
20 public static void ProfileWriteValue(
21 string section, string key, string value, string path)
22 {
23 WritePrivateProfileString(section, key, value, path);
24 }
25 // 读取配置文件的值
26 public static string ProfileReadValue(
27 string section, string key, string path)
28 {
29 StringBuilder sb = new StringBuilder(255);
30 GetPrivateProfileString(section, key, "", sb, 255, path);
31 return sb.ToString().Trim();
32 }
33 }
34 }
No preview for this file type
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="DSA手术室~ZNG007"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="链享科技耗材柜科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
11 <add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
12 <add key="url" value="http://localhost:9538/"/>
13 <add key="xh" value="hcg/yxsap/GetSapConsumption"/>
14 <add key="bs" value="hcg/yxsap/GetSappd"/>
15 </appSettings>
16 </configuration>
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="DSA手术室~ZNG007"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="链享科技耗材柜科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
11 <add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
12 <add key="url" value="http://localhost:9538/"/>
13 <add key="xh" value="hcg/yxsap/GetSapConsumption"/>
14 <add key="bs" value="hcg/yxsap/GetSappd"/>
15 </appSettings>
16 </configuration>
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3 <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5 <security>
6 <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
8 </requestedPrivileges>
9 </security>
10 </trustInfo>
11 </assembly>
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~ZNG007,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
11 <add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~ZNG007,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
11 <add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3 <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5 <security>
6 <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
8 </requestedPrivileges>
9 </security>
10 </trustInfo>
11 </assembly>
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
11 <add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
11 <add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3 <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5 <security>
6 <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
8 </requestedPrivileges>
9 </security>
10 </trustInfo>
11 </assembly>
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
11 <add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
1 <?xml version="1.0" encoding="utf-8"?>
2 <configuration>
3 <startup>
4
5 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
6 <appSettings>
7 <add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
8 <add key="AppPassword" value="cszng@123"/>
9 <add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
10 <add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
11 <add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
12 <add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
13 <add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
14 <add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
15
16 </appSettings>
17 </configuration>
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace HcgClientExport
7 {
8 public class his_goods_buound
9 {
10 /// <summary>
11 /// 商品名称
12 /// </summary>
13 public string goodsname { get; set; }
14 /// <summary>
15 /// 商品表guid
16 /// </summary>
17 public string HisGoodsGUID { get; set; }
18 /// <summary>
19 /// 商品编码
20 /// </summary>
21 public string GoodsCode { get; set; }
22 /// <summary>
23 /// 库存上限
24 /// </summary>
25 public string StockUpperLimit { get; set; }
26 /// <summary>
27 ///
28 /// 库存下限
29 /// </summary>
30 public string StockLowerLimit { get; set; }
31 /// <summary>
32 /// 科室编码
33 /// </summary>
34 public string orgGUID { get; set; }
35 }
36 }
1 namespace HcgClientExport
2 {
3 partial class login
4 {
5 /// <summary>
6 /// Required designer variable.
7 /// </summary>
8 private System.ComponentModel.IContainer components = null;
9
10 /// <summary>
11 /// Clean up any resources being used.
12 /// </summary>
13 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14 protected override void Dispose(bool disposing)
15 {
16 if (disposing && (components != null))
17 {
18 components.Dispose();
19 }
20 base.Dispose(disposing);
21 }
22
23 #region Windows Form Designer generated code
24
25 /// <summary>
26 /// Required method for Designer support - do not modify
27 /// the contents of this method with the code editor.
28 /// </summary>
29 private void InitializeComponent()
30 {
31 this.label1 = new System.Windows.Forms.Label();
32 this.textBox1 = new System.Windows.Forms.TextBox();
33 this.textBox2 = new System.Windows.Forms.TextBox();
34 this.label2 = new System.Windows.Forms.Label();
35 this.button1 = new System.Windows.Forms.Button();
36 this.button2 = new System.Windows.Forms.Button();
37 this.SuspendLayout();
38 //
39 // label1
40 //
41 this.label1.AutoSize = true;
42 this.label1.Location = new System.Drawing.Point(47, 50);
43 this.label1.Name = "label1";
44 this.label1.Size = new System.Drawing.Size(60, 15);
45 this.label1.TabIndex = 0;
46 this.label1.Text = "用户名:";
47 //
48 // textBox1
49 //
50 this.textBox1.Location = new System.Drawing.Point(113, 47);
51 this.textBox1.Name = "textBox1";
52 this.textBox1.Size = new System.Drawing.Size(160, 25);
53 this.textBox1.TabIndex = 1;
54 this.textBox1.Click += new System.EventHandler(this.textBox1_Click);
55 //
56 // textBox2
57 //
58 this.textBox2.Location = new System.Drawing.Point(113, 99);
59 this.textBox2.Name = "textBox2";
60 this.textBox2.PasswordChar = '*';
61 this.textBox2.Size = new System.Drawing.Size(160, 25);
62 this.textBox2.TabIndex = 3;
63 //
64 // label2
65 //
66 this.label2.AutoSize = true;
67 this.label2.Location = new System.Drawing.Point(47, 102);
68 this.label2.Name = "label2";
69 this.label2.Size = new System.Drawing.Size(60, 15);
70 this.label2.TabIndex = 2;
71 this.label2.Text = "密 码:";
72 //
73 // button1
74 //
75 this.button1.Location = new System.Drawing.Point(50, 148);
76 this.button1.Name = "button1";
77 this.button1.Size = new System.Drawing.Size(75, 23);
78 this.button1.TabIndex = 4;
79 this.button1.Text = "登陆";
80 this.button1.UseVisualStyleBackColor = true;
81 this.button1.Click += new System.EventHandler(this.button1_Click);
82 //
83 // button2
84 //
85 this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
86 this.button2.Location = new System.Drawing.Point(198, 148);
87 this.button2.Name = "button2";
88 this.button2.Size = new System.Drawing.Size(75, 23);
89 this.button2.TabIndex = 5;
90 this.button2.Text = "取消";
91 this.button2.UseVisualStyleBackColor = true;
92 this.button2.Click += new System.EventHandler(this.button2_Click);
93 //
94 // login
95 //
96 this.AcceptButton = this.button1;
97 this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
98 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
99 this.CancelButton = this.button2;
100 this.ClientSize = new System.Drawing.Size(322, 183);
101 this.Controls.Add(this.button2);
102 this.Controls.Add(this.button1);
103 this.Controls.Add(this.textBox2);
104 this.Controls.Add(this.label2);
105 this.Controls.Add(this.textBox1);
106 this.Controls.Add(this.label1);
107 this.MaximizeBox = false;
108 this.Name = "login";
109 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
110 this.Text = "登陆";
111 this.ResumeLayout(false);
112 this.PerformLayout();
113
114 }
115
116 #endregion
117
118 private System.Windows.Forms.Label label1;
119 private System.Windows.Forms.TextBox textBox1;
120 private System.Windows.Forms.TextBox textBox2;
121 private System.Windows.Forms.Label label2;
122 private System.Windows.Forms.Button button1;
123 private System.Windows.Forms.Button button2;
124 }
125 }
...\ No newline at end of file ...\ No newline at end of file
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9
10 namespace HcgClientExport
11 {
12 public partial class login : Form
13 {
14 public login()
15 {
16 InitializeComponent();
17 this.textBox1.GotFocus += new EventHandler(textBox1_GotFocus);
18 this.textBox2.GotFocus += new EventHandler(textBox2_GotFocus);
19 textBox1.MouseUp += new MouseEventHandler(textBox1_MouseUp);
20 textBox2.MouseUp += new MouseEventHandler(textBox2_MouseUp);
21 this.FormBorderStyle = FormBorderStyle.FixedSingle;
22 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
23 this.Icon=((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
24 }
25 // private string titie = "xhcx";
26 private void button1_Click(object sender, EventArgs e)
27 {
28
29 Form1 f = new Form1();
30 string ss = new DataControl().GetLogin(this.textBox1.Text, En.GenerateMD5(this.textBox2.Text),f );
31 if (ss.Equals("1"))
32 {
33
34 this.Hide();
35
36 f.uid = this.textBox1.Text;
37 f.ShowDialog();
38 Application.Exit();
39 }
40 else if (ss.Equals("-1"))
41 {
42 MessageBox.Show("登陆失败");
43 }
44 else
45 {
46 MessageBox.Show(ss);
47 }
48 }
49
50 private void button2_Click(object sender, EventArgs e)
51 {
52 Application.Exit();
53 }
54
55 private void textBox1_Click(object sender, EventArgs e)
56 {
57 // this.textBox1.
58 }
59 void textBox1_MouseUp(object sender, MouseEventArgs e)
60 {
61 //如果鼠标左键操作并且标记存在,则执行全选
62 if (e.Button == MouseButtons.Left && (bool)textBox1.Tag == true)
63 {
64 textBox1.SelectAll();
65 }
66
67 //取消全选标记
68 textBox1.Tag = false;
69 }
70 void textBox2_MouseUp(object sender, MouseEventArgs e)
71 {
72 //如果鼠标左键操作并且标记存在,则执行全选
73 if (e.Button == MouseButtons.Left && (bool)textBox2.Tag == true)
74 {
75 textBox2.SelectAll();
76 }
77
78 //取消全选标记
79 textBox2.Tag = false;
80 }
81 void textBox2_GotFocus(object sender, EventArgs e)
82 {
83 textBox2.Tag = true; //设置标记
84 textBox2.SelectAll(); //注意1
85 }
86 void textBox1_GotFocus(object sender, EventArgs e)
87 {
88 textBox1.Tag = true; //设置标记
89 textBox1.SelectAll(); //注意1
90 }
91
92 }
93 }
1 <?xml version="1.0" encoding="utf-8"?>
2 <root>
3 <!--
4 Microsoft ResX Schema
5
6 Version 2.0
7
8 The primary goals of this format is to allow a simple XML format
9 that is mostly human readable. The generation and parsing of the
10 various data types are done through the TypeConverter classes
11 associated with the data types.
12
13 Example:
14
15 ... ado.net/XML headers & schema ...
16 <resheader name="resmimetype">text/microsoft-resx</resheader>
17 <resheader name="version">2.0</resheader>
18 <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19 <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20 <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21 <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22 <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23 <value>[base64 mime encoded serialized .NET Framework object]</value>
24 </data>
25 <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26 <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27 <comment>This is a comment</comment>
28 </data>
29
30 There are any number of "resheader" rows that contain simple
31 name/value pairs.
32
33 Each data row contains a name, and value. The row also contains a
34 type or mimetype. Type corresponds to a .NET class that support
35 text/value conversion through the TypeConverter architecture.
36 Classes that don't support this are serialized and stored with the
37 mimetype set.
38
39 The mimetype is used for serialized objects, and tells the
40 ResXResourceReader how to depersist the object. This is currently not
41 extensible. For a given mimetype the value must be set accordingly:
42
43 Note - application/x-microsoft.net.object.binary.base64 is the format
44 that the ResXResourceWriter will generate, however the reader can
45 read any of the formats listed below.
46
47 mimetype: application/x-microsoft.net.object.binary.base64
48 value : The object must be serialized with
49 : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50 : and then encoded with base64 encoding.
51
52 mimetype: application/x-microsoft.net.object.soap.base64
53 value : The object must be serialized with
54 : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55 : and then encoded with base64 encoding.
56
57 mimetype: application/x-microsoft.net.object.bytearray.base64
58 value : The object must be serialized into a byte array
59 : using a System.ComponentModel.TypeConverter
60 : and then encoded with base64 encoding.
61 -->
62 <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63 <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64 <xsd:element name="root" msdata:IsDataSet="true">
65 <xsd:complexType>
66 <xsd:choice maxOccurs="unbounded">
67 <xsd:element name="metadata">
68 <xsd:complexType>
69 <xsd:sequence>
70 <xsd:element name="value" type="xsd:string" minOccurs="0" />
71 </xsd:sequence>
72 <xsd:attribute name="name" use="required" type="xsd:string" />
73 <xsd:attribute name="type" type="xsd:string" />
74 <xsd:attribute name="mimetype" type="xsd:string" />
75 <xsd:attribute ref="xml:space" />
76 </xsd:complexType>
77 </xsd:element>
78 <xsd:element name="assembly">
79 <xsd:complexType>
80 <xsd:attribute name="alias" type="xsd:string" />
81 <xsd:attribute name="name" type="xsd:string" />
82 </xsd:complexType>
83 </xsd:element>
84 <xsd:element name="data">
85 <xsd:complexType>
86 <xsd:sequence>
87 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89 </xsd:sequence>
90 <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91 <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92 <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93 <xsd:attribute ref="xml:space" />
94 </xsd:complexType>
95 </xsd:element>
96 <xsd:element name="resheader">
97 <xsd:complexType>
98 <xsd:sequence>
99 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100 </xsd:sequence>
101 <xsd:attribute name="name" type="xsd:string" use="required" />
102 </xsd:complexType>
103 </xsd:element>
104 </xsd:choice>
105 </xsd:complexType>
106 </xsd:element>
107 </xsd:schema>
108 <resheader name="resmimetype">
109 <value>text/microsoft-resx</value>
110 </resheader>
111 <resheader name="version">
112 <value>2.0</value>
113 </resheader>
114 <resheader name="reader">
115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116 </resheader>
117 <resheader name="writer">
118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119 </resheader>
120 </root>
...\ No newline at end of file ...\ No newline at end of file
1 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.exe.config
2 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.Form1.resources
3 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.Properties.Resources.resources
4 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.csproj.GenerateResource.Cache
5 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.exe
6 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.pdb
7 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\ICSharpCode.SharpZipLib.dll
8 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.dll
9 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OOXML.dll
10 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OpenXml4Net.dll
11 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OpenXmlFormats.dll
12 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.exe
13 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.pdb
14 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.csprojResolveAssemblyReference.cache
15 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.login.resources
No preview for this file type
No preview for this file type
1 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.exe.config
2 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.exe
3 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.pdb
4 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\ICSharpCode.SharpZipLib.dll
5 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\MySql.Data.dll
6 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.dll
7 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OOXML.dll
8 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OpenXml4Net.dll
9 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OpenXmlFormats.dll
10 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\MySql.Data.xml
11 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.Form1.resources
12 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.Properties.Resources.resources
13 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.csproj.GenerateResource.Cache
14 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.exe
15 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.pdb
16 D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.csprojResolveAssemblyReference.cache
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!