-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
539 changed files
with
436,196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
obj | ||
bin |
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?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>{22EDACAC-530E-4383-89CB-FC8CEB4916ED}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>AppService</RootNamespace> | ||
<AssemblyName>AppService</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="SqlSugar, Version=4.6.4.9, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\sqlSugar.4.6.4.9\lib\SqlSugar.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.ComponentModel.DataAnnotations" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\libs\System.Data.SQLite.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="DbContext\SqliteDbContext.cs" /> | ||
<Compile Include="LoginAppService.cs" /> | ||
<Compile Include="DbContext\SugarDbContext.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="SqliteAppService.cs" /> | ||
<Compile Include="WeightAppService.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="app.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Common\YIEternalMIS.Common.csproj"> | ||
<Project>{50896fa4-272c-403e-bdca-fe6c07c3ed20}</Project> | ||
<Name>YIEternalMIS.Common</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\DBUtility\DBUtility.csproj"> | ||
<Project>{0988c62e-247f-471f-a183-db509c7a3839}</Project> | ||
<Name>DBUtility</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Models\Models.csproj"> | ||
<Project>{9d0568a9-a3f3-4ab6-a4a1-cd06fce731ce}</Project> | ||
<Name>Models</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Utils\Utils.csproj"> | ||
<Project>{faf834aa-2d6f-40dd-a0cd-c0e771aa3448}</Project> | ||
<Name>Utils</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="x64\SQLite.Interop.dll"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="x86\SQLite.Interop.dll"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using SqlSugar; | ||
using YIEternalMIS.Common; | ||
|
||
namespace AppService.DbContext | ||
{ | ||
public class SqliteDbContext | ||
{ | ||
private SqliteDbContext() | ||
{ | ||
|
||
} | ||
|
||
public static SqlSugarClient SugarContext = null; | ||
private static string ConnectionString | ||
{ | ||
get | ||
{ | ||
string reval = YIEternalMIS.DBUtility.DbHelperSQLite.connectionString; | ||
return reval; | ||
} | ||
} | ||
public static SqlSugarClient GetInstance() | ||
{ | ||
if (SugarContext == null) | ||
{ | ||
SugarContext = new SqlSugarClient(new ConnectionConfig() | ||
{ | ||
ConnectionString = ConnectionString, //必填 | ||
DbType = DbType.Sqlite, //必填 | ||
IsAutoCloseConnection = false, //默认false | ||
InitKeyType = InitKeyType.Attribute | ||
}); | ||
} | ||
|
||
return SugarContext; | ||
} | ||
|
||
public static void Dispose() | ||
{ | ||
try | ||
{ | ||
if (SugarContext != null) | ||
{ | ||
SugarContext.Dispose(); | ||
} | ||
|
||
} | ||
catch (Exception e) | ||
{ | ||
LogNHelper.Exception(e); | ||
} | ||
finally | ||
{ | ||
SugarContext = null; | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using SqlSugar; | ||
using YIEternalMIS.Common; | ||
|
||
namespace AppService.DbContext | ||
{ | ||
public class SugarDbContext | ||
{ | ||
private SugarDbContext() | ||
{ | ||
|
||
} | ||
|
||
public static SqlSugarClient SugarContext = null; | ||
private static string ConnectionString | ||
{ | ||
get | ||
{ | ||
string reval = YIEternalMIS.DBUtility.DbHelperSQL.connectionString; | ||
return reval; | ||
} | ||
} | ||
public static SqlSugarClient GetInstance() | ||
{ | ||
if (SugarContext == null) | ||
{ | ||
SugarContext = new SqlSugarClient(new ConnectionConfig() | ||
{ | ||
ConnectionString = ConnectionString, //必填 | ||
DbType = DbType.SqlServer, //必填 | ||
IsAutoCloseConnection = false, //默认false | ||
InitKeyType = InitKeyType.Attribute | ||
}); | ||
} | ||
|
||
return SugarContext; | ||
} | ||
|
||
public static void Dispose() | ||
{ | ||
try | ||
{ | ||
if (SugarContext != null) | ||
{ | ||
SugarContext.Dispose(); | ||
} | ||
|
||
} | ||
catch (Exception e) | ||
{ | ||
Msg.ShowException(e,"数据库连接失败"); | ||
} | ||
finally | ||
{ | ||
SugarContext = null; | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using AppService.DbContext; | ||
using Models; | ||
using Models.Db; | ||
using YIEternalMIS.Common; | ||
|
||
namespace AppService | ||
{ | ||
public class LoginAppService | ||
{ | ||
public Loginer Login(string uname, string pwd) | ||
{ | ||
Loginer userer = null; | ||
try | ||
{ | ||
|
||
using (var sql= SugarDbContext.GetInstance()) | ||
{ | ||
var user = sql.Queryable<Opers>().Where(s => s.userName == uname && s.password == pwd) | ||
.First(); | ||
if (user == null) | ||
{ | ||
return null; | ||
} | ||
userer = new Loginer(); | ||
//存储登录用户信息 | ||
userer.Account = user.userName; | ||
userer.AccountName = user.operName; | ||
userer.LoginTime = DateTime.Now; | ||
} | ||
|
||
} | ||
catch (Exception e) | ||
{ | ||
LogNHelper.Exception(e); | ||
} | ||
|
||
return userer; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// 有关程序集的一般信息由以下 | ||
// 控制。更改这些特性值可修改 | ||
// 与程序集关联的信息。 | ||
[assembly: AssemblyTitle("AppService")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("MS")] | ||
[assembly: AssemblyProduct("AppService")] | ||
[assembly: AssemblyCopyright("Copyright © MS 2018")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// 将 ComVisible 设置为 false 会使此程序集中的类型 | ||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 | ||
//请将此类型的 ComVisible 特性设置为 true。 | ||
[assembly: ComVisible(false)] | ||
|
||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | ||
[assembly: Guid("22edacac-530e-4383-89cb-fc8ceb4916ed")] | ||
|
||
// 程序集的版本信息由下列四个值组成: | ||
// | ||
// 主版本 | ||
// 次版本 | ||
// 生成号 | ||
// 修订号 | ||
// | ||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 | ||
//通过使用 "*",如下所示: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Oops, something went wrong.