bfdcbcd2 by white

亚心医院专用查询程序

1 parent c383c570
Showing 149 changed files with 1518 additions and 0 deletions
No preview for this file type

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HcgClientExport", "HcgClientExport\HcgClientExport.csproj", "{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|x86.ActiveCfg = Debug|x86
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Debug|x86.Build.0 = Debug|x86
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|Any CPU.Build.0 = Release|Any CPU
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|x86.ActiveCfg = Release|x86
{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {265F3B90-60F0-418F-BFF0-C74D19312827}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="DSA手术室~ZNG007"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="链享科技耗材柜科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="url" value="http://localhost:9538/"/>
<add key="xh" value="hcg/yxsap/GetSapConsumption"/>
<add key="bs" value="hcg/yxsap/GetSappd"/>
</appSettings>
</configuration>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HcgClientExport
{
public class En
{
public static string GenerateMD5(string txt)
{
using (System.Security.Cryptography.MD5 mi = System.Security.Cryptography.MD5.Create())
{
byte[] buffer = Encoding.Default.GetBytes(txt);
//开始加密
byte[] newBuffer = mi.ComputeHash(buffer);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < newBuffer.Length; i++)
{
sb.Append(newBuffer[i].ToString("x2"));
}
return sb.ToString();
}
}
}
}
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
namespace HcgClientExport
{
public class ExportHelper
{
/// <summary>
/// Datable导出成Excel
/// </summary>
/// <param name="dt"></param>
/// <param name="file">导出路径(包括文件名与扩展名)</param>
public static void TableToExcel(DataTable dt, string file)
{
IWorkbook workbook;
string fileExt = Path.GetExtension(file).ToLower();
if (fileExt == ".xlsx") { workbook = new XSSFWorkbook(); } else if (fileExt == ".xls") { workbook = new HSSFWorkbook(); } else { workbook = null; }
if (workbook == null) { return; }
ISheet sheet = string.IsNullOrEmpty(dt.TableName) ? workbook.CreateSheet("Sheet1") : workbook.CreateSheet(dt.TableName);
//表头
IRow row = sheet.CreateRow(0);
for (int i = 0; i < dt.Columns.Count; i++)
{
ICell cell = row.CreateCell(i);
cell.SetCellValue(dt.Columns[i].ColumnName);
}
//数据
for (int i = 0; i < dt.Rows.Count; i++)
{
IRow row1 = sheet.CreateRow(i + 1);
for (int j = 0; j < dt.Columns.Count; j++)
{
ICell cell = row1.CreateCell(j);
cell.SetCellValue(dt.Rows[i][j].ToString());
}
}
//转为字节数组
MemoryStream stream = new MemoryStream();
workbook.Write(stream);
var buf = stream.ToArray();
//保存为Excel文件
using (FileStream fs = new FileStream(file, FileMode.Create, FileAccess.Write))
{
fs.Write(buf, 0, buf.Length);
fs.Flush();
}
}
}
}
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D395B57C-8A8F-47EE-8DC6-0D83158EC3C6}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>HcgClientExport</RootNamespace>
<AssemblyName>HcgClientExport</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>stock_market_96px_1082607_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=8.0.17.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="NPOI, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.dll</HintPath>
</Reference>
<Reference Include="NPOI.OOXML, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OOXML.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXml4Net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OpenXml4Net.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXmlFormats, Version=2.4.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.4.0\lib\net40\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataControl.cs" />
<Compile Include="En.cs" />
<Compile Include="ExportHelper.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="his_goods_buound.cs" />
<Compile Include="login.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="login.Designer.cs">
<DependentUpon>login.cs</DependentUpon>
</Compile>
<Compile Include="MySqlHelper.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RestClient.cs" />
<Compile Include="WinApi.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="login.resx">
<DependentUpon>login.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="stock_market_96px_1082607_easyicon.net.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using MySql.Data.MySqlClient;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
namespace HcgClientExport
{
public abstract class MySQLHelper
{
//数据库连接字符串(注意:这里的“DBConnectionString”一定要与web.config文件中connectionStrings节点值一致)
public static string connectionString = ConfigurationManager.AppSettings["connstr"];
// 用于缓存参数的HASH表
private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
/// <summary>
/// 给定连接的数据库用假设参数执行一个sql命令(不返回数据集)
/// </summary>
/// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
/// <param name="cmdText">存储过程名称或者sql命令语句</param>
/// <param name="commandParameters">执行命令所用参数的集合</param>
/// <returns>执行命令所影响的行数</returns>
public static int ExecuteNonQuery(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
{
MySqlCommand cmd = new MySqlCommand();
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
int val = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
return val;
}
}
/// <summary>
/// 用执行的数据库连接执行一个返回数据集的sql命令
/// </summary>
/// <remarks>
/// 举例:
/// MySqlDataReader r = ExecuteReader(connString, CommandType.StoredProcedure, "PublishOrders", new MySqlParameter("@prodid", 24));
/// </remarks>
/// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
/// <param name="cmdText">存储过程名称或者sql命令语句</param>
/// <param name="commandParameters">执行命令所用参数的集合</param>
/// <returns>包含结果的读取器</returns>
public static MySqlDataReader ExecuteReader(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
{
//创建一个MySqlCommand对象
MySqlCommand cmd = new MySqlCommand();
//创建一个MySqlConnection对象
MySqlConnection conn = new MySqlConnection(connectionString);
//在这里我们用一个try/catch结构执行sql文本命令/存储过程,因为如果这个方法产生一个异常我们要关闭连接,因为没有读取器存在,
//因此commandBehaviour.CloseConnection 就不会执行
try
{
//调用 PrepareCommand 方法,对 MySqlCommand 对象设置参数
PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
//调用 MySqlCommand 的 ExecuteReader 方法
MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
//清除参数
cmd.Parameters.Clear();
return reader;
}
catch
{
//关闭连接,抛出异常
conn.Close();
throw;
}
}
/// <summary>
/// 返回DataSet
/// </summary>
/// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
/// <param name="cmdText">存储过程名称或者sql命令语句</param>
/// <param name="commandParameters">执行命令所用参数的集合</param>
/// <returns></returns>
public static DataSet GetDataSet(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
{
//创建一个MySqlCommand对象
MySqlCommand cmd = new MySqlCommand();
//创建一个MySqlConnection对象
MySqlConnection conn = new MySqlConnection(connectionString);
//在这里我们用一个try/catch结构执行sql文本命令/存储过程,因为如果这个方法产生一个异常我们要关闭连接,因为没有读取器存在,
try
{
//调用 PrepareCommand 方法,对 MySqlCommand 对象设置参数
PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
//调用 MySqlCommand 的 ExecuteReader 方法
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = cmd;
DataSet ds = new DataSet();
adapter.Fill(ds);
//清除参数
cmd.Parameters.Clear();
conn.Close();
return ds;
}
catch (Exception e)
{
throw e;
}
}
/// <summary>
/// 用指定的数据库连接字符串执行一个命令并返回一个数据集的第一列
/// </summary>
/// <remarks>
///例如:
/// Object obj = ExecuteScalar(connString, CommandType.StoredProcedure, "PublishOrders", new MySqlParameter("@prodid", 24));
/// </remarks>
/// <param name="cmdType">命令类型(存储过程, 文本, 等等)</param>
/// <param name="cmdText">存储过程名称或者sql命令语句</param>
/// <param name="commandParameters">执行命令所用参数的集合</param>
/// <returns>用 Convert.To{Type}把类型转换为想要的 </returns>
public static object ExecuteScalar(string cmdText, CommandType cmdType = CommandType.Text, params MySqlParameter[] commandParameters)
{
MySqlCommand cmd = new MySqlCommand();
using (MySqlConnection connection = new MySqlConnection(connectionString))
{
PrepareCommand(cmd, connection, null, cmdType, cmdText, commandParameters);
object val = cmd.ExecuteScalar();
cmd.Parameters.Clear();
return val;
}
}
/// <summary>
/// 将参数集合添加到缓存
/// </summary>
/// <param name="cacheKey">添加到缓存的变量</param>
/// <param name="commandParameters">一个将要添加到缓存的sql参数集合</param>
public static void CacheParameters(string cacheKey, params MySqlParameter[] commandParameters)
{
parmCache[cacheKey] = commandParameters;
}
/// <summary>
/// 找回缓存参数集合
/// </summary>
/// <param name="cacheKey">用于找回参数的关键字</param>
/// <returns>缓存的参数集合</returns>
public static MySqlParameter[] GetCachedParameters(string cacheKey)
{
MySqlParameter[] cachedParms = (MySqlParameter[])parmCache[cacheKey];
if (cachedParms == null)
return null;
MySqlParameter[] clonedParms = new MySqlParameter[cachedParms.Length];
for (int i = 0, j = cachedParms.Length; i < j; i++)
clonedParms[i] = (MySqlParameter)((ICloneable)cachedParms[i]).Clone();
return clonedParms;
}
/// <summary>
/// 准备执行一个命令
/// </summary>
/// <param name="cmd">sql命令</param>
/// <param name="conn">OleDb连接</param>
/// <param name="trans">OleDb事务</param>
/// <param name="cmdType">命令类型例如 存储过程或者文本</param>
/// <param name="cmdText">命令文本,例如:Select * from Products</param>
/// <param name="cmdParms">执行命令的参数</param>
private static void PrepareCommand(MySqlCommand cmd, MySqlConnection conn, MySqlTransaction trans, CommandType cmdType, string cmdText, MySqlParameter[] cmdParms)
{
if (conn.State != ConnectionState.Open)
conn.Open();
cmd.Connection = conn;
cmd.CommandText = cmdText;
if (trans != null)
cmd.Transaction = trans;
cmd.CommandType = cmdType;
if (cmdParms != null)
{
foreach (MySqlParameter parameter in cmdParms)
{
if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) &&
(parameter.Value == null))
{
parameter.Value = DBNull.Value;
}
cmd.Parameters.Add(parameter);
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace HcgClientExport
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new login());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("HcgClientExport")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HcgClientExport")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("d395b57c-8a8f-47ee-8dc6-0d83158ec3c6")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace HcgClientExport.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HcgClientExport.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace HcgClientExport.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
namespace HcgClientExport
{
class RestClient
{
private string BaseUri;
public RestClient(string baseUri)
{
this.BaseUri = baseUri;
}
#region Get请求
public string Get(string uri)
{
//先根据用户请求的uri构造请求地址
string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
//创建Web访问对 象
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
//通过Web访问对象获取响应内容
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
//通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
//string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
reader.Close();
myResponse.Close();
return returnXml;
}
#endregion
#region Post请求
public string Post(string data, string uri)
{
//先根据用户请求的uri构造请求地址
string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
//创建Web访问对象
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
//把用户传过来的数据转成“UTF-8”的字节流
byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
myRequest.Method = "POST";
myRequest.ContentLength = buf.Length;
myRequest.ContentType = "application/json";
myRequest.MaximumAutomaticRedirections = 1;
myRequest.AllowAutoRedirect = true;
//发送请求
Stream stream = myRequest.GetRequestStream();
stream.Write(buf, 0, buf.Length);
stream.Close();
//获取接口返回值
//通过Web访问对象获取响应内容
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
//通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
//string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
reader.Close();
myResponse.Close();
return returnXml;
}
#endregion
#region Put请求
public string Put(string data, string uri)
{
//先根据用户请求的uri构造请求地址
string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
//创建Web访问对象
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
//把用户传过来的数据转成“UTF-8”的字节流
byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
myRequest.Method = "PUT";
myRequest.ContentLength = buf.Length;
myRequest.ContentType = "application/json";
myRequest.MaximumAutomaticRedirections = 1;
myRequest.AllowAutoRedirect = true;
//发送请求
Stream stream = myRequest.GetRequestStream();
stream.Write(buf, 0, buf.Length);
stream.Close();
//获取接口返回值
//通过Web访问对象获取响应内容
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
//通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
//string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
reader.Close();
myResponse.Close();
return returnXml;
}
#endregion
#region Delete请求
public string Delete(string data, string uri)
{
//先根据用户请求的uri构造请求地址
string serviceUrl = string.Format("{0}/{1}", this.BaseUri, uri);
//创建Web访问对象
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(serviceUrl);
//把用户传过来的数据转成“UTF-8”的字节流
byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
myRequest.Method = "DELETE";
myRequest.ContentLength = buf.Length;
myRequest.ContentType = "application/json";
myRequest.MaximumAutomaticRedirections = 1;
myRequest.AllowAutoRedirect = true;
//发送请求
Stream stream = myRequest.GetRequestStream();
stream.Write(buf, 0, buf.Length);
stream.Close();
//获取接口返回值
//通过Web访问对象获取响应内容
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
//通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
//string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
reader.Close();
myResponse.Close();
return returnXml;
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace HcgClientExport
{
public static class WinAPI
{
[DllImport("kernel32")] // 写入配置文件的接口
private static extern long WritePrivateProfileString(
string section, string key, string val, string filePath);
[DllImport("kernel32")] // 读取配置文件的接口
private static extern int GetPrivateProfileString(
string section, string key, string def,
StringBuilder retVal, int size, string filePath);
// 向配置文件写入值
public static void ProfileWriteValue(
string section, string key, string value, string path)
{
WritePrivateProfileString(section, key, value, path);
}
// 读取配置文件的值
public static string ProfileReadValue(
string section, string key, string path)
{
StringBuilder sb = new StringBuilder(255);
GetPrivateProfileString(section, key, "", sb, 255, path);
return sb.ToString().Trim();
}
}
}
No preview for this file type
No preview for this file type
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="DSA手术室~ZNG007"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="链享科技耗材柜科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="url" value="http://localhost:9538/"/>
<add key="xh" value="hcg/yxsap/GetSapConsumption"/>
<add key="bs" value="hcg/yxsap/GetSappd"/>
</appSettings>
</configuration>
No preview for this file type
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="DSA手术室~ZNG007"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="链享科技耗材柜科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;charset=utf8;"/>
<add key="url" value="http://localhost:9538/"/>
<add key="xh" value="hcg/yxsap/GetSapConsumption"/>
<add key="bs" value="hcg/yxsap/GetSappd"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~ZNG007,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
<add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~ZNG007,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
<add key="ZNG007" value="server=127.0.0.1;user id=root;password=xueying;database=hcgnew_sg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<appSettings>
<add key="orgguid" value="消融手术室~x01,DSA手术室~x02,ICU~x03,ICU门诊手术室~x04"/>
<add key="AppPassword" value="cszng@123"/>
<add key="SysName" value="复旦大学附属肿瘤医院科室商品查询"/>
<add key="connstr" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x01" value="server=127.0.0.1;user id=root;password=xueying;database=hcg;Allow User Variables=True;"/>
<add key="x02" value="server=127.0.0.1;user id=root;password=xueying;database=hcg1;Allow User Variables=True;"/>
<add key="x03" value="server=127.0.0.1;user id=root;password=xueying;database=hcg2;Allow User Variables=True;"/>
<add key="x04" value="server=127.0.0.1;user id=root;password=xueying;database=hcg3;Allow User Variables=True;"/>
</appSettings>
</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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HcgClientExport
{
public class his_goods_buound
{
/// <summary>
/// 商品名称
/// </summary>
public string goodsname { get; set; }
/// <summary>
/// 商品表guid
/// </summary>
public string HisGoodsGUID { get; set; }
/// <summary>
/// 商品编码
/// </summary>
public string GoodsCode { get; set; }
/// <summary>
/// 库存上限
/// </summary>
public string StockUpperLimit { get; set; }
/// <summary>
///
/// 库存下限
/// </summary>
public string StockLowerLimit { get; set; }
/// <summary>
/// 科室编码
/// </summary>
public string orgGUID { get; set; }
}
}
namespace HcgClientExport
{
partial class login
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(47, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 15);
this.label1.TabIndex = 0;
this.label1.Text = "用户名:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(113, 47);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(160, 25);
this.textBox1.TabIndex = 1;
this.textBox1.Click += new System.EventHandler(this.textBox1_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(113, 99);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new System.Drawing.Size(160, 25);
this.textBox2.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(47, 102);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(60, 15);
this.label2.TabIndex = 2;
this.label2.Text = "密 码:";
//
// button1
//
this.button1.Location = new System.Drawing.Point(50, 148);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 4;
this.button1.Text = "登陆";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Location = new System.Drawing.Point(198, 148);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 5;
this.button2.Text = "取消";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// login
//
this.AcceptButton = this.button1;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button2;
this.ClientSize = new System.Drawing.Size(322, 183);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.MaximizeBox = false;
this.Name = "login";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "登陆";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HcgClientExport
{
public partial class login : Form
{
public login()
{
InitializeComponent();
this.textBox1.GotFocus += new EventHandler(textBox1_GotFocus);
this.textBox2.GotFocus += new EventHandler(textBox2_GotFocus);
textBox1.MouseUp += new MouseEventHandler(textBox1_MouseUp);
textBox2.MouseUp += new MouseEventHandler(textBox2_MouseUp);
this.FormBorderStyle = FormBorderStyle.FixedSingle;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.Icon=((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
}
// private string titie = "xhcx";
private void button1_Click(object sender, EventArgs e)
{
Form1 f = new Form1();
string ss = new DataControl().GetLogin(this.textBox1.Text, En.GenerateMD5(this.textBox2.Text),f );
if (ss.Equals("1"))
{
this.Hide();
f.uid = this.textBox1.Text;
f.ShowDialog();
Application.Exit();
}
else if (ss.Equals("-1"))
{
MessageBox.Show("登陆失败");
}
else
{
MessageBox.Show(ss);
}
}
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void textBox1_Click(object sender, EventArgs e)
{
// this.textBox1.
}
void textBox1_MouseUp(object sender, MouseEventArgs e)
{
//如果鼠标左键操作并且标记存在,则执行全选
if (e.Button == MouseButtons.Left && (bool)textBox1.Tag == true)
{
textBox1.SelectAll();
}
//取消全选标记
textBox1.Tag = false;
}
void textBox2_MouseUp(object sender, MouseEventArgs e)
{
//如果鼠标左键操作并且标记存在,则执行全选
if (e.Button == MouseButtons.Left && (bool)textBox2.Tag == true)
{
textBox2.SelectAll();
}
//取消全选标记
textBox2.Tag = false;
}
void textBox2_GotFocus(object sender, EventArgs e)
{
textBox2.Tag = true; //设置标记
textBox2.SelectAll(); //注意1
}
void textBox1_GotFocus(object sender, EventArgs e)
{
textBox1.Tag = true; //设置标记
textBox1.SelectAll(); //注意1
}
}
}
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.exe.config
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.Form1.resources
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.Properties.Resources.resources
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.csproj.GenerateResource.Cache
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.exe
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\HcgClientExport.pdb
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\ICSharpCode.SharpZipLib.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OOXML.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OpenXml4Net.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Debug\NPOI.OpenXmlFormats.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.exe
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.pdb
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.csprojResolveAssemblyReference.cache
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Debug\HcgClientExport.login.resources
No preview for this file type
No preview for this file type
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.exe.config
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.exe
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\HcgClientExport.pdb
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\ICSharpCode.SharpZipLib.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\MySql.Data.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OOXML.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OpenXml4Net.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\NPOI.OpenXmlFormats.dll
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\bin\Release\MySql.Data.xml
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.Form1.resources
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.Properties.Resources.resources
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.csproj.GenerateResource.Cache
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.exe
D:\java\ConsumableCabinet\库存导出小程序\HcgClientExport\HcgClientExport\obj\Release\HcgClientExport.pdb
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!