(#11)代煎药厂商查询页面

This commit is contained in:
falcon 2019-03-14 16:12:59 +08:00
parent d8aa65ff8e
commit 49aed2446e
18 changed files with 11066 additions and 127 deletions

View File

@ -187,6 +187,7 @@
<Compile Include="Bll\DesHelper.cs" />
<Compile Include="Bll\Cache.cs" />
<Compile Include="Bll\ObjExtend.cs" />
<Compile Include="Controllers\CompanyController.cs" />
<Compile Include="Controllers\HisInfoController.cs" />
<Compile Include="Dal\Configuration.cs" />
<Compile Include="Dal\DbContextFactory.cs" />
@ -234,6 +235,8 @@
</Content>
<Content Include="Scripts\jquery.unobtrusive-ajax.js" />
<Content Include="Scripts\jquery.unobtrusive-ajax.min.js" />
<Content Include="Scripts\vue.js" />
<Content Include="Scripts\vue.min.js" />
<Content Include="ws\HisInterface.asmx" />
<Content Include="ws\WsdInterface.asmx" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
@ -259,13 +262,13 @@
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Home\About.cshtml" />
<Content Include="Views\Home\Contact.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\HisInfo\Index.cshtml" />
<Content Include="Views\HisInfo\PreFilter.cshtml" />
<Content Include="Views\HisInfo\PrescriptionList.cshtml" />
<Content Include="Views\HisInfo\DrugList.cshtml" />
<Content Include="Views\Company\Index.cshtml" />
<Content Include="Views\Company\CompanyList.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View File

@ -39,3 +39,14 @@ table {
border: 1px solid #000;
padding: 1px;
}
/*工具条*/
.toolBar {
list-style: none;
padding:0px;
}
.toolBar li {
display: inline-block;
padding:3px 5px;
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Cmdjy.Dal;
namespace Cmdjy.Controllers
{
public class CompanyController:Controller
{
public ActionResult Index() {
return PartialView();
}
public ActionResult CompanyList() {
using(var db = DbContextFactory.CreateDbContext()) {
var qu = db.CompanyInfos.ToList();
return PartialView(qu);
}
}
}
}

View File

@ -11,17 +11,5 @@ namespace Cmdjy.Controllers
public ActionResult Index() {
return View();
}
public ActionResult About() {
ViewBag.Message = "Your application description page.";
return View();
}
public ActionResult Contact() {
ViewBag.Message = "Your contact page.";
return View();
}
}
}

View File

@ -9,7 +9,7 @@
/// 获取代煎药数据库
/// </summary>
public static DjyDbContext CreateDbContext() {
return DjyDbContext.GetContext();
return new DjyDbContext();
}
}
}

View File

@ -12,11 +12,7 @@ namespace Cmdjy.Dal
/// </summary>
public partial class DjyDbContext:DbContext
{
public static DjyDbContext GetContext() {
return new DjyDbContext();
}
private DjyDbContext() : base("DjyDbContext") {
public DjyDbContext() : base("DjyDbContext") {
}
}
/// <summary>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
@model IEnumerable<CompanyInfo>
<table>
<caption>厂商列表</caption>
<thead>
<tr>
<td>编号</td>
<td>名称</td>
<td>地址</td>
<td>电话</td>
<td>状态</td>
</tr>
</thead>
<tbody>
@foreach(var item in Model) {
<tr>
<td>@item.Id</td>
<td>@item.Name</td>
<td>@item.Address</td>
<td>@item.Phone</td>
<td>@item.Status.ToString()</td>
</tr>
}
</tbody>
</table>

View File

@ -0,0 +1 @@
@Html.Action("CompanyList")

View File

@ -1,16 +1 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - 我的 ASP.NET 应用程序</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@Html.Action("PreFilter")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
</body>
</html>
@Html.Action("PreFilter")

View File

@ -1,7 +0,0 @@
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information.</p>

View File

@ -1,17 +0,0 @@
@{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

View File

@ -1,31 +1,8 @@
@{
ViewBag.Title = "Home Page";
}
<div class="jumbotron">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
<p><a href="https://asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
</div>
<div class="row">
<div class="col-md-4">
<h2>Getting started</h2>
<p>
ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
enables a clean separation of concerns and gives you full control over markup
for enjoyable, agile development.
</p>
<p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301865">Learn more &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Get more libraries</h2>
<p>NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.</p>
<p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301866">Learn more &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Web Hosting</h2>
<p>You can easily find a web hosting company that offers the right mix of features and price for your applications.</p>
<p><a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301867">Learn more &raquo;</a></p>
</div>
</div>
<h1>代煎药平台</h1>
<hr />
<ol class="toolBar">
<li>@Ajax.ActionLink("厂商列表","Index","Company",new AjaxOptions { UpdateTargetId = "main" })</li>
<li>@Ajax.ActionLink("医疗机构处方列表","Index","HisInfo",new AjaxOptions { UpdateTargetId = "main" })</li>
</ol>
<hr />
<div id="main"></div>

View File

@ -1,43 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - 我的 ASP.NET 应用程序</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - 我的 ASP.NET 应用程序</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("应用程序名称", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("主页", "Index", "Home")</li>
<li>@Html.ActionLink("关于", "About", "Home")</li>
<li>@Html.ActionLink("联系方式", "Contact", "Home")</li>
</ul>
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>&copy; @DateTime.Now.Year - 我的 ASP.NET 应用程序</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts",required: false)
</body>
</html>

View File

@ -38,5 +38,6 @@
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net461" />
<package id="System.Threading.Channels" version="4.5.0" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="vue" version="2.5.17" targetFramework="net461" />
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
</packages>

View File

@ -61,6 +61,9 @@
<Name>Cmdjy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>