main
SummmerLost 2 years ago
parent 764b7f62c0
commit e248c959df
  1. 20
      PEIS/App.Config
  2. 48
      PEIS/Helper/EntityFrameworkTemplate.cs
  3. 18
      PEIS/Helper/SqlHelper.cs
  4. 21
      PEIS/Model/BYTZDB.cs
  5. 30
      PEIS/Model/Blood_CheckResult.cs
  6. 51
      PEIS/Model/Blood_Infusion.cs
  7. 23
      PEIS/Model/Blood_Infusion_Detail.cs
  8. 24
      PEIS/Model/Blood_InoutDetail.cs
  9. 32
      PEIS/Model/Blood_InoutRecord.cs
  10. 29
      PEIS/Model/Blood_Inspect.cs
  11. 52
      PEIS/Model/Blood_Inventory.cs
  12. 37
      PEIS/Model/Blood_ItemResult.cs
  13. 86
      PEIS/Model/Blood_Match.cs
  14. 62
      PEIS/Model/Blood_Match_Detail.cs
  15. 28
      PEIS/Model/Blood_OperationLog.cs
  16. 64
      PEIS/Model/Blood_Patient.cs
  17. 53
      PEIS/Model/Blood_Reaction.cs
  18. 23
      PEIS/Model/Blood_Reaction_Detail.cs
  19. 65
      PEIS/Model/Blood_Request.cs
  20. 34
      PEIS/Model/Blood_Request_Detail.cs
  21. 38
      PEIS/Model/Blood_TypeCheck.cs
  22. 30
      PEIS/Model/CGJYJGB.cs
  23. 42
      PEIS/Model/Collect_Check_Advice.cs
  24. 34
      PEIS/Model/Collect_Detail.cs
  25. 30
      PEIS/Model/Collect_Detail_History.cs
  26. 34
      PEIS/Model/Collect_Detail_Return.cs
  27. 39
      PEIS/Model/Collect_MoveRecord.cs
  28. 36
      PEIS/Model/Collect_MoveRecord_Return.cs
  29. 78
      PEIS/Model/Collect_Record.cs
  30. 38
      PEIS/Model/Collect_Record_History.cs
  31. 71
      PEIS/Model/Collect_Record_Return.cs
  32. 25
      PEIS/Model/Dict_Antibacteria.cs
  33. 32
      PEIS/Model/Dict_Antibiotic.cs
  34. 23
      PEIS/Model/Dict_Bact_Result.cs
  35. 32
      PEIS/Model/Dict_Bacteria.cs
  36. 22
      PEIS/Model/Dict_Bacteria_Result.cs
  37. 24
      PEIS/Model/Dict_BarCode.cs
  38. 29
      PEIS/Model/Dict_BarCodeClass.cs
  39. 27
      PEIS/Model/Dict_BloodCharacter.cs
  40. 24
      PEIS/Model/Dict_BloodCheckItem.cs
  41. 42
      PEIS/Model/Dict_BloodConstituent.cs
  42. 25
      PEIS/Model/Dict_BloodConstituentType.cs
  43. 23
      PEIS/Model/Dict_BloodCrip.cs
  44. 27
      PEIS/Model/Dict_BloodMatchMethod.cs
  45. 27
      PEIS/Model/Dict_BloodMatchResult.cs
  46. 24
      PEIS/Model/Dict_BloodPurpose.cs
  47. 27
      PEIS/Model/Dict_BloodSpec.cs
  48. 23
      PEIS/Model/Dict_BloodStation.cs
  49. 28
      PEIS/Model/Dict_BloodType.cs
  50. 23
      PEIS/Model/Dict_Bone_CelClass.cs
  51. 29
      PEIS/Model/Dict_Bone_Cell.cs
  52. 22
      PEIS/Model/Dict_Bone_Templete.cs
  53. 23
      PEIS/Model/Dict_Common.cs
  54. 21
      PEIS/Model/Dict_Config.cs
  55. 27
      PEIS/Model/Dict_Dept.cs
  56. 24
      PEIS/Model/Dict_Diagnose.cs
  57. 24
      PEIS/Model/Dict_Doctor.cs
  58. 21
      PEIS/Model/Dict_Domain.cs
  59. 24
      PEIS/Model/Dict_Group.cs
  60. 28
      PEIS/Model/Dict_Hospital.cs
  61. 33
      PEIS/Model/Dict_InsToRptItem.cs
  62. 32
      PEIS/Model/Dict_Instrument.cs
  63. 22
      PEIS/Model/Dict_Menu.cs
  64. 24
      PEIS/Model/Dict_PatientClass.cs
  65. 22
      PEIS/Model/Dict_QC_Position.cs
  66. 25
      PEIS/Model/Dict_ReferenceGroup.cs
  67. 35
      PEIS/Model/Dict_Report.cs
  68. 37
      PEIS/Model/Dict_ReportItem.cs
  69. 28
      PEIS/Model/Dict_ReportToItem.cs
  70. 31
      PEIS/Model/Dict_ReqItem.cs
  71. 30
      PEIS/Model/Dict_ReqItemToBarCodeClass.cs
  72. 27
      PEIS/Model/Dict_ReqItemToReport.cs
  73. 26
      PEIS/Model/Dict_ReqItemToRptItem.cs
  74. 25
      PEIS/Model/Dict_ReqItem_Sub.cs
  75. 31
      PEIS/Model/Dict_ReqSheet.cs
  76. 27
      PEIS/Model/Dict_Req_SheetToItem.cs
  77. 25
      PEIS/Model/Dict_RingDiameter.cs
  78. 21
      PEIS/Model/Dict_Role.cs
  79. 21
      PEIS/Model/Dict_RoleToMenu.cs
  80. 29
      PEIS/Model/Dict_RptItem_Formula.cs
  81. 37
      PEIS/Model/Dict_RptItem_Reference.cs
  82. 25
      PEIS/Model/Dict_RptItem_Result.cs
  83. 26
      PEIS/Model/Dict_RptItem_Warn.cs
  84. 27
      PEIS/Model/Dict_Specimen.cs
  85. 29
      PEIS/Model/Dict_TestBoard.cs
  86. 31
      PEIS/Model/Dict_User.cs
  87. 22
      PEIS/Model/Dict_UserToMenu.cs
  88. 28
      PEIS/Model/JCBYTB.cs
  89. 32
      PEIS/Model/JYSJXXB.cs
  90. 175
      PEIS/Model/LisDb.Context.cs
  91. 636
      PEIS/Model/LisDb.Context.tt
  92. 10
      PEIS/Model/LisDb.Designer.cs
  93. 9
      PEIS/Model/LisDb.cs
  94. 9092
      PEIS/Model/LisDb.edmx
  95. 158
      PEIS/Model/LisDb.edmx.diagram
  96. 733
      PEIS/Model/LisDb.tt
  97. 22
      PEIS/Model/Log_Err.cs
  98. 26
      PEIS/Model/Manage_AutoCost.cs
  99. 24
      PEIS/Model/Manage_CostParam.cs
  100. 26
      PEIS/Model/Manage_InOutStore.cs
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="lisdbEntities" connectionString="metadata=res://*/Model.LisDb.csdl|res://*/Model.LisDb.ssdl|res://*/Model.LisDb.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=192.168.12.188;initial catalog=lisdb;user id=sa;password=000626;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PEIS.Model;
namespace PEIS.Helper
{
class EntityFrameworkTemplate
{
private readonly lisdbEntities _db = new lisdbEntities();
public void Add()
{
_db.Dict_User.Add(new Dict_User()
{
UserName = "李进才",
Password = "test"
});
_db.SaveChanges();
}
public void Remove()
{
_db.Dict_User.RemoveRange(_db.Dict_User.Where(p => p.UserCode == "0001"));
_db.SaveChanges();
}
public void Edit()
{
var user = _db.Dict_User.Find("0001");
// 只能逐个赋值,不能直接赋值对象,除非写个方法类循环逐个赋值
user.UserName = "修改名字";
_db.SaveChanges();
}
public Dict_User SelectForId()
{
return _db.Dict_User.Find("0001");
}
public Dict_User SelectForOther()
{
return _db.Dict_User.FirstOrDefault(p=>p.UserName=="管理员");
}
public List<Dict_User> SelectToList()
{
return _db.Dict_User.Where(p => p.UserName == "0001" || p.UserName == "管理员").ToList();
}
}
}

@ -1,12 +1,14 @@
using System;
using PEIS.Model;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
namespace PEIS.Helper.SqlServer
namespace PEIS.Helper
{
public class SqlHelper
{
@ -288,7 +290,7 @@ namespace PEIS.Helper.SqlServer
/// <param name="list">实体插入类型,实体类型要跟数据库字段名一致</param>
public void Insert<T>(List<T> list)
{
var tableName = typeof(T).FullName;
var tableName = typeof(T).Name;
var rowName = string.Empty;
var value = string.Empty;
foreach (var item in typeof(T).GetProperties())
@ -311,7 +313,7 @@ namespace PEIS.Helper.SqlServer
/// <param name="keys">where 条件 </param>
public void Update<T>(T entity, Dictionary<string, string> keys)
{
var tableName = typeof(T).FullName;
var tableName = typeof(T).Name;
var keyWord = string.Empty;
var value = typeof(T).GetProperties().Aggregate(string.Empty, (current, item) => current + $"{item.Name}=@{item.Name},");
keyWord = keys.Aggregate(keyWord, (current, key) => current + $"{key.Key}=\'{key.Value}\' and");
@ -326,15 +328,15 @@ namespace PEIS.Helper.SqlServer
public void Delete<T>(T entity,Dictionary<string,string> keys)
{
var tableName = typeof(T).FullName;
var tableName = typeof(T).Name;
var keyWord = string.Empty;
keyWord = keys.Aggregate(keyWord, (current, key) => current + $"{key.Key}=\'{key.Value}\' and");
Run(
RunSql(
string.IsNullOrEmpty(keyWord)
? $"truncate table {tableName}"
: $"delete from {tableName} where {keyWord.Substring(0, keyWord.Length - 3)}",
entity);
: $"delete from {tableName} where {keyWord.Substring(0, keyWord.Length - 3)}");
_con.Close();
}
}
}

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class BYTZDB
{
public string Code { get; set; }
public string Name { get; set; }
public string HospitalCode { get; set; }
}
}

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_CheckResult
{
public int ID { get; set; }
public int RID { get; set; }
public string Type { get; set; }
public System.DateTime TestDate { get; set; }
public string SampleCode { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string ResultStr { get; set; }
public string Range { get; set; }
public string Unit { get; set; }
public string UnusualFlag { get; set; }
public string Seq { get; set; }
}
}

@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Infusion
{
public int ID { get; set; }
public Nullable<int> RID { get; set; }
public Nullable<int> PID { get; set; }
public Nullable<int> MID { get; set; }
public Nullable<int> BID { get; set; }
public Nullable<System.DateTime> OutTime { get; set; }
public string DeptCode { get; set; }
public string DeptName { get; set; }
public string ReceiverCode { get; set; }
public string Receiver { get; set; }
public Nullable<System.DateTime> ReceiveTime { get; set; }
public string ReceiveCheckerCode { get; set; }
public string ReceiveChecker { get; set; }
public Nullable<System.DateTime> StartTime { get; set; }
public string StarterCode { get; set; }
public string Starter { get; set; }
public string StartCheckerCode { get; set; }
public string StartChecker { get; set; }
public Nullable<System.DateTime> FinishTime { get; set; }
public string FinisherCode { get; set; }
public string Finisher { get; set; }
public string FinishCheckerCode { get; set; }
public string FinishChecker { get; set; }
public Nullable<System.DateTime> PrintTime { get; set; }
public string PrinterCode { get; set; }
public string Printer { get; set; }
public Nullable<int> PrintCount { get; set; }
public Nullable<System.DateTime> LastPrintTime { get; set; }
public string LastPrinter { get; set; }
public string ReceiveDeptCode { get; set; }
public string ReceiveDeptName { get; set; }
public string Checker { get; set; }
public Nullable<System.DateTime> CheckTime { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Infusion_Detail
{
public int ID { get; set; }
public Nullable<int> IspID { get; set; }
public Nullable<int> Flag { get; set; }
public string ItemCode { get; set; }
public string Result { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_InoutDetail
{
public int ID { get; set; }
public int RID { get; set; }
public Nullable<int> BID { get; set; }
public string BloodCode { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
}
}

@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_InoutRecord
{
public int ID { get; set; }
public string Flag { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string CreatorCode { get; set; }
public string Creator { get; set; }
public string Description { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Status { get; set; }
public string SerialNum { get; set; }
public string Receiver { get; set; }
public string ReceiveUnit { get; set; }
public Nullable<System.DateTime> OptTime { get; set; }
public string OptCode { get; set; }
public string OptName { get; set; }
}
}

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Inspect
{
public int ID { get; set; }
public Nullable<int> RID { get; set; }
public Nullable<int> IID { get; set; }
public string UserCode { get; set; }
public string UserName { get; set; }
public string CheckUserCode { get; set; }
public string CheckUserName { get; set; }
public Nullable<System.DateTime> Time { get; set; }
public string Node { get; set; }
public Nullable<int> Flag { get; set; }
public Nullable<bool> DeleteStatus { get; set; }
}
}

@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Inventory
{
public int ID { get; set; }
public string Code { get; set; }
public string BloodTypeCode { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string BloodConstituentCode { get; set; }
public string BloodConstituentName { get; set; }
public string BloodExtCode { get; set; }
public Nullable<decimal> Spec { get; set; }
public string Unit { get; set; }
public Nullable<decimal> ConvertQuotiety { get; set; }
public Nullable<int> StorageDays { get; set; }
public Nullable<int> WarnDays { get; set; }
public Nullable<int> StorageMinCount { get; set; }
public Nullable<int> StorageSafeCount { get; set; }
public Nullable<decimal> InPrice { get; set; }
public Nullable<decimal> OutPrice { get; set; }
public Nullable<int> SelfFlag { get; set; }
public Nullable<int> ComponentFlag { get; set; }
public string MethodCode { get; set; }
public string TypeCode { get; set; }
public Nullable<System.DateTime> InTime { get; set; }
public string InUserCode { get; set; }
public string InUserName { get; set; }
public Nullable<System.DateTime> OutTime { get; set; }
public string OutUserCode { get; set; }
public string OutUserName { get; set; }
public Nullable<System.DateTime> CollectTime { get; set; }
public Nullable<System.DateTime> InvalidTime { get; set; }
public string BloodStation { get; set; }
public string Status { get; set; }
public Nullable<int> InID { get; set; }
public Nullable<int> OutID { get; set; }
public Nullable<decimal> Amount { get; set; }
}
}

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_ItemResult
{
public int ID { get; set; }
public int RID { get; set; }
public string Type { get; set; }
public System.DateTime TestDate { get; set; }
public string SampleCode { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public Nullable<decimal> Result { get; set; }
public string ResultStr { get; set; }
public string Range { get; set; }
public string Unit { get; set; }
public string UnusualFlag { get; set; }
public Nullable<bool> IsReview { get; set; }
public string InsCode { get; set; }
public Nullable<System.DateTime> InTime { get; set; }
public string OrderNo { get; set; }
public string OrderItemNo { get; set; }
public Nullable<bool> IsCritical { get; set; }
public string PatientID { get; set; }
}
}

@ -0,0 +1,86 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Match
{
public int ID { get; set; }
public Nullable<int> RID { get; set; }
public Nullable<System.DateTime> MatchTime { get; set; }
public string MatcherCode { get; set; }
public string Matcher { get; set; }
public Nullable<System.DateTime> TestDate { get; set; }
public string SampleCode { get; set; }
public string Reporter { get; set; }
public string Checker { get; set; }
public Nullable<System.DateTime> ReportTime { get; set; }
public Nullable<System.DateTime> CheckTime { get; set; }
public string Barcode { get; set; }
public Nullable<bool> IsEmer { get; set; }
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public string PatientName { get; set; }
public string PatientClassCode { get; set; }
public string PatientClass { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> BirthDay { get; set; }
public Nullable<int> Age { get; set; }
public string AgeClass { get; set; }
public string BedNo { get; set; }
public string ReqDoctCode { get; set; }
public string ReqDoctName { get; set; }
public string ReqDeptCode { get; set; }
public string ReqDeptName { get; set; }
public string ReqDomainCode { get; set; }
public string ReqDomainName { get; set; }
public Nullable<System.DateTime> ReqTime { get; set; }
public Nullable<decimal> Cost { get; set; }
public string CostClass { get; set; }
public string ICD { get; set; }
public string Diagnose { get; set; }
public string Description { get; set; }
public string Tel { get; set; }
public string HisID { get; set; }
public string IDCardNo { get; set; }
public string Address { get; set; }
public string HisTel { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string BloodTypeCode { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string Creator { get; set; }
public string Printer { get; set; }
public string PrintTime { get; set; }
public Nullable<bool> PrintFlag { get; set; }
public string LastPrinter { get; set; }
public string LastPrintTime { get; set; }
public Nullable<int> PrintCount { get; set; }
public string AdviceText { get; set; }
public string OrderNo { get; set; }
public Nullable<bool> HasCost { get; set; }
public string AdvicerCode { get; set; }
public string Advicer { get; set; }
public Nullable<System.DateTime> AdviceTime { get; set; }
public string CosterCode { get; set; }
public string Coster { get; set; }
public Nullable<System.DateTime> CostTime { get; set; }
public string CostResult { get; set; }
public string SenderCode { get; set; }
public string Sender { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public string PatientId { get; set; }
public string CheckerCode { get; set; }
public Nullable<System.DateTime> TakeTime { get; set; }
public string Taker { get; set; }
}
}

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Match_Detail
{
public int ID { get; set; }
public Nullable<int> MID { get; set; }
public Nullable<int> BID { get; set; }
public string BloodCode { get; set; }
public string Method1Code { get; set; }
public string Method1 { get; set; }
public string Method2Code { get; set; }
public string Method2 { get; set; }
public string Primary1ResultCode { get; set; }
public string Primary1Result { get; set; }
public string Secondary1ResultCode { get; set; }
public string Secondary1Result { get; set; }
public string Primary2ResultCode { get; set; }
public string Primary2Result { get; set; }
public string Secondary2ResultCode { get; set; }
public string Secondary2Result { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<bool> HasCharged { get; set; }
public Nullable<decimal> Fee { get; set; }
public string ChargeResult { get; set; }
public Nullable<bool> IsOut { get; set; }
public Nullable<int> OID { get; set; }
public string BloodTypeCode { get; set; }
public string BloodType { get; set; }
public string Screening { get; set; }
public string Conclusion { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string AdviceText { get; set; }
public string OrderNo { get; set; }
public Nullable<bool> HasCost { get; set; }
public string AdvicerCode { get; set; }
public string Advicer { get; set; }
public Nullable<System.DateTime> AdviceTime { get; set; }
public string CosterCode { get; set; }
public string Coster { get; set; }
public Nullable<System.DateTime> CostTime { get; set; }
public string FeeItemCode { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public string Sender { get; set; }
public Nullable<System.DateTime> PrintTime { get; set; }
public string Printer { get; set; }
public Nullable<System.DateTime> TakeTime { get; set; }
public string Taker { get; set; }
}
}

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_OperationLog
{
public int ID { get; set; }
public Nullable<System.DateTime> Time { get; set; }
public string Operator { get; set; }
public string OperatorCode { get; set; }
public string Type { get; set; }
public string OperateType { get; set; }
public string OldValue { get; set; }
public string NewValue { get; set; }
public Nullable<int> Rid { get; set; }
public Nullable<int> Bid { get; set; }
}
}

@ -0,0 +1,64 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Patient
{
public int ID { get; set; }
public string PatientID { get; set; }
public string Barcode { get; set; }
public string PatientName { get; set; }
public string PatientClassCode { get; set; }
public string PatientClass { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> BirthDay { get; set; }
public Nullable<System.DateTime> InTime { get; set; }
public Nullable<int> Age { get; set; }
public string BedNo { get; set; }
public string ReqDoctorCode { get; set; }
public string ReqDoctorName { get; set; }
public string ReqDeptCode { get; set; }
public string ReqDeptName { get; set; }
public string ReqDomainCode { get; set; }
public string ReqDomainName { get; set; }
public Nullable<System.DateTime> ReqTime { get; set; }
public Nullable<decimal> Cost { get; set; }
public string CostClass { get; set; }
public string CostFlag { get; set; }
public string ICD { get; set; }
public string DiagnoseIn { get; set; }
public string Description { get; set; }
public string Tel { get; set; }
public string HisID { get; set; }
public string IDCardNo { get; set; }
public string Address { get; set; }
public string HisTel { get; set; }
public string HospitalCode { get; set; }
public string HospitalName { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string BloodTypeCode { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string Creater { get; set; }
public Nullable<System.DateTime> PlanTime { get; set; }
public string Scheme { get; set; }
public string PurposeCode { get; set; }
public string AgeClass { get; set; }
public string CharacterCode { get; set; }
public string DiffGroupReason { get; set; }
public string OperationName { get; set; }
public Nullable<bool> IsDiffGroup { get; set; }
public Nullable<bool> IsOperation { get; set; }
public string Diagnose { get; set; }
}
}

@ -0,0 +1,53 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Reaction
{
public int ID { get; set; }
public Nullable<int> IID { get; set; }
public Nullable<System.DateTime> OccurTime { get; set; }
public Nullable<int> Node { get; set; }
public Nullable<int> Interval { get; set; }
public string IntervalUnit { get; set; }
public string Narcosis { get; set; }
public string Relation { get; set; }
public string Factory { get; set; }
public string BatchNo { get; set; }
public Nullable<bool> HasStoped { get; set; }
public string Residue { get; set; }
public string Duration { get; set; }
public string OtherSymptom { get; set; }
public string Description { get; set; }
public string CreatorCode { get; set; }
public string Creator { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string DeptCode { get; set; }
public string DeptName { get; set; }
public string DoctCode { get; set; }
public string DoctName { get; set; }
public string DoctLevel { get; set; }
public string DoctRelation { get; set; }
public string DoctContent { get; set; }
public string DoctReason { get; set; }
public Nullable<System.DateTime> DealTime { get; set; }
public Nullable<System.DateTime> DoctCreateTime { get; set; }
public string BloodDoctCode { get; set; }
public string BloodDoctName { get; set; }
public Nullable<System.DateTime> BloodDealTime { get; set; }
public string BloodSuggest { get; set; }
public string DoctConclusion { get; set; }
public string DoctOtherContent { get; set; }
public Nullable<bool> DeleteStatus { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Reaction_Detail
{
public int ID { get; set; }
public Nullable<int> RectID { get; set; }
public Nullable<int> Flag { get; set; }
public string ItemCode { get; set; }
public string Result { get; set; }
}
}

@ -0,0 +1,65 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Request
{
public int ID { get; set; }
public Nullable<int> PID { get; set; }
public Nullable<int> ReqType { get; set; }
public string ReqItemCode { get; set; }
public string ReqItemName { get; set; }
public string OrderNo { get; set; }
public string OrderItemNo { get; set; }
public string ReqDeptCode { get; set; }
public string ReqDeptName { get; set; }
public string ReqDoctCode { get; set; }
public string ReqDoctName { get; set; }
public string ReqDomainCode { get; set; }
public string ReqDomainName { get; set; }
public Nullable<System.DateTime> ReqTime { get; set; }
public string Creator { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public string Checker { get; set; }
public Nullable<System.DateTime> CheckTime { get; set; }
public string Checker2 { get; set; }
public Nullable<System.DateTime> CheckTime2 { get; set; }
public string Printer { get; set; }
public Nullable<System.DateTime> PrintTime { get; set; }
public string Sender { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public string Receiver { get; set; }
public Nullable<System.DateTime> ReceiveTime { get; set; }
public Nullable<int> Status { get; set; }
public Nullable<System.DateTime> ConsentPrintTime { get; set; }
public string ConsentPrinter { get; set; }
public Nullable<int> PrintCount { get; set; }
public Nullable<System.DateTime> LastPrintTime { get; set; }
public string LastPrinter { get; set; }
public Nullable<System.DateTime> CancelTime { get; set; }
public string Canceler { get; set; }
public Nullable<bool> IsEmer { get; set; }
public Nullable<bool> HasTrans { get; set; }
public Nullable<bool> HasAllergy { get; set; }
public Nullable<bool> HasEncyesis { get; set; }
public Nullable<bool> HasReact { get; set; }
public string AdviceText { get; set; }
public string CheckContent { get; set; }
public string CheckContent2 { get; set; }
public string PatientId { get; set; }
public string Flag { get; set; }
public Nullable<bool> IsInOper { get; set; }
public string CancelDeptName { get; set; }
public string CancelReason { get; set; }
}
}

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_Request_Detail
{
public int ID { get; set; }
public Nullable<int> RID { get; set; }
public Nullable<decimal> QuantityReq { get; set; }
public Nullable<decimal> QuantityCheck { get; set; }
public Nullable<decimal> QuantityMatch { get; set; }
public Nullable<decimal> QuantitySend { get; set; }
public Nullable<decimal> QuantityOut { get; set; }
public string MethodCode { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string Unit { get; set; }
public string Description { get; set; }
public string BloodConstituentTypeCode { get; set; }
public string BloodConstituentTypeName { get; set; }
public string BloodConstituentCode { get; set; }
public string BloodConstituentName { get; set; }
}
}

@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Blood_TypeCheck
{
public int ID { get; set; }
public Nullable<int> RID { get; set; }
public Nullable<System.DateTime> TestDate { get; set; }
public string SampleCode { get; set; }
public string Barcode { get; set; }
public string Abo { get; set; }
public string Rh { get; set; }
public string AboCheck { get; set; }
public string RhCheck { get; set; }
public string RheCheck { get; set; }
public string RhcCheck { get; set; }
public string Antibody1 { get; set; }
public string Antibody2 { get; set; }
public string Antibody3 { get; set; }
public string Antibody { get; set; }
public string Description { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public Nullable<System.DateTime> CheckTime { get; set; }
public Nullable<bool> IsSame { get; set; }
}
}

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class CGJYJGB
{
public string TESTNO { get; set; }
public Nullable<System.DateTime> RESULTDATE { get; set; }
public string CODE { get; set; }
public string Name { get; set; }
public string TESTRESULT { get; set; }
public string Unit { get; set; }
public string REFERRANGE { get; set; }
public string UPPERLIMIT { get; set; }
public string LOWERLIMIT { get; set; }
public Nullable<System.DateTime> CREATEDATE { get; set; }
public Nullable<System.DateTime> UPDATEDATE { get; set; }
public string HospitalCode { get; set; }
}
}

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Check_Advice
{
public int AdviceID { get; set; }
public string ReqCode { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string PatientID { get; set; }
public string PatientName { get; set; }
public string PatientClassCode { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> BirthDay { get; set; }
public string BedNo { get; set; }
public string ReqDoctorCode { get; set; }
public string ReqDeptCode { get; set; }
public string ReqDomainCode { get; set; }
public string CostClass { get; set; }
public string Diagnose { get; set; }
public Nullable<System.DateTime> BillDate { get; set; }
public string SpecimenCode { get; set; }
public string BarCodeClassCode { get; set; }
public string Description { get; set; }
public string OpDoctorCode { get; set; }
public string BarcodeNew { get; set; }
public Nullable<bool> IsEmer { get; set; }
public Nullable<bool> IsConfirm { get; set; }
public string AdviceNo { get; set; }
}
}

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Detail
{
public int ID { get; set; }
public int CollectID { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string BarCode { get; set; }
public string ConfirmFlag { get; set; }
public string AccountFlag { get; set; }
public string CostFlag { get; set; }
public string ResultFlag { get; set; }
public string ReviewFlag { get; set; }
public Nullable<decimal> ResultValue { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public string ReporterCode { get; set; }
public string Reporter { get; set; }
public Nullable<System.DateTime> ReportDate { get; set; }
}
}

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Detail_History
{
public int CollectDetailID { get; set; }
public Nullable<int> CollectID { get; set; }
public string SampleCode { get; set; }
public string RptItemCode { get; set; }
public string ConfirmFlag { get; set; }
public string AccountFlag { get; set; }
public string FeeFlag { get; set; }
public string ResultFlag { get; set; }
public string ReviewFlag { get; set; }
public Nullable<decimal> ResultValue { get; set; }
public string Reporter { get; set; }
public string Checker { get; set; }
}
}

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Detail_Return
{
public int ID { get; set; }
public int CollectID { get; set; }
public string BarCode { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string ConfirmFlag { get; set; }
public string AccountFlag { get; set; }
public string CostFlag { get; set; }
public string ResultFlag { get; set; }
public string ReviewFlag { get; set; }
public Nullable<decimal> ResultValue { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public string ReporterCode { get; set; }
public string Reporter { get; set; }
public Nullable<System.DateTime> ReportDate { get; set; }
}
}

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_MoveRecord
{
public int ID { get; set; }
public string BatchNo { get; set; }
public string BarCode { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public string SenderCode { get; set; }
public string Sender { get; set; }
public string SendRemark { get; set; }
public Nullable<System.DateTime> ReceiveTime { get; set; }
public string ReceiverCode { get; set; }
public string Receiver { get; set; }
public string ReceiveRemark { get; set; }
public string PatientID { get; set; }
public string PatientName { get; set; }
public string BedNo { get; set; }
public string PatientClassCode { get; set; }
public string PatientClassName { get; set; }
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public Nullable<bool> HasReturn { get; set; }
public string SendDeptCode { get; set; }
public string SendDeptName { get; set; }
}
}

@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_MoveRecord_Return
{
public int ID { get; set; }
public string BarCode { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public string SenderCode { get; set; }
public string Sender { get; set; }
public Nullable<System.DateTime> ReceiveTime { get; set; }
public string ReceiverCode { get; set; }
public string Receiver { get; set; }
public string PatientID { get; set; }
public string PatientName { get; set; }
public string BedNo { get; set; }
public string PatientClassCode { get; set; }
public string PatientClassName { get; set; }
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public Nullable<bool> HasReturn { get; set; }
public string SendRemark { get; set; }
public string ReceiveRemark { get; set; }
}
}

@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Record
{
public int CollectID { get; set; }
public string SerialNum { get; set; }
public Nullable<bool> IsEmer { get; set; }
public string Barcode { get; set; }
public string SampleCode { get; set; }
public Nullable<System.DateTime> TestDate { get; set; }
public Nullable<System.DateTime> CollectDate { get; set; }
public string CollectorCode { get; set; }
public string Collector { get; set; }
public Nullable<System.DateTime> CheckDate { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public Nullable<decimal> Cost { get; set; }
public string Position { get; set; }
public string Diagnose { get; set; }
public Nullable<System.DateTime> ChargeDate { get; set; }
public string ChargerCode { get; set; }
public string Charger { get; set; }
public string ReporterCode { get; set; }
public string Reporter { get; set; }
public Nullable<System.DateTime> ReportDate { get; set; }
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public string PatientClassCode { get; set; }
public string PatientClassName { get; set; }
public string PatientID { get; set; }
public string Name { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> BirthDay { get; set; }
public string BedNo { get; set; }
public Nullable<System.DateTime> ReqDate { get; set; }
public string DeptCode { get; set; }
public string DeptName { get; set; }
public string DomainCode { get; set; }
public string Domain { get; set; }
public string DoctCode { get; set; }
public string DoctName { get; set; }
public string CostClass { get; set; }
public Nullable<bool> HasChecked { get; set; }
public Nullable<bool> HasCollected { get; set; }
public Nullable<bool> HasCharged { get; set; }
public Nullable<bool> HasPrinted { get; set; }
public string ReqItemCode { get; set; }
public string ReqItemName { get; set; }
public Nullable<decimal> Price { get; set; }
public Nullable<decimal> Quantity { get; set; }
public string BarCodeClassCode { get; set; }
public string BarCodeClassName { get; set; }
public Nullable<decimal> Color { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<int> StatusCode { get; set; }
public Nullable<int> Age { get; set; }
public string AgeClass { get; set; }
public string HisId { get; set; }
public string OrderNo { get; set; }
public string OrderItemNo { get; set; }
public string IDCardNo { get; set; }
public string Address { get; set; }
public string HisTel { get; set; }
public Nullable<bool> HasPast { get; set; }
}
}

@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Record_History
{
public int CollectID { get; set; }
public string CollectNo { get; set; }
public Nullable<System.DateTime> CollectDate { get; set; }
public string CollecterCode { get; set; }
public string Collecter { get; set; }
public string CollectCode { get; set; }
public string Barcode { get; set; }
public string SampleCode { get; set; }
public string PatientID { get; set; }
public Nullable<System.DateTime> CheckDate { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public Nullable<decimal> CheckFee { get; set; }
public string Positon { get; set; }
public string Diagnose { get; set; }
public Nullable<System.DateTime> BillDate { get; set; }
public string BillNo { get; set; }
public string ChargerCode { get; set; }
public string Charger { get; set; }
public string Reporter { get; set; }
}
}

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Collect_Record_Return
{
public int ID { get; set; }
public int CollectID { get; set; }
public string SerialNum { get; set; }
public Nullable<bool> IsEmer { get; set; }
public string Barcode { get; set; }
public string SampleCode { get; set; }
public Nullable<System.DateTime> TestDate { get; set; }
public Nullable<System.DateTime> CollectDate { get; set; }
public string CollectorCode { get; set; }
public string Collector { get; set; }
public Nullable<System.DateTime> CheckDate { get; set; }
public string CheckerCode { get; set; }
public string Checker { get; set; }
public Nullable<decimal> Cost { get; set; }
public string Position { get; set; }
public string Diagnose { get; set; }
public Nullable<System.DateTime> ChargeDate { get; set; }
public string ChargerCode { get; set; }
public string Charger { get; set; }
public string ReporterCode { get; set; }
public string Reporter { get; set; }
public Nullable<System.DateTime> ReportDate { get; set; }
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public string PatientClassCode { get; set; }
public string PatientClassName { get; set; }
public string PatientID { get; set; }
public string Name { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> BirthDay { get; set; }
public string BedNo { get; set; }
public Nullable<System.DateTime> ReqDate { get; set; }
public string DeptCode { get; set; }
public string DeptName { get; set; }
public string DomainCode { get; set; }
public string Domain { get; set; }
public string DoctCode { get; set; }
public string DoctName { get; set; }
public string CostClass { get; set; }
public Nullable<bool> HasChecked { get; set; }
public Nullable<bool> HasCollected { get; set; }
public Nullable<bool> HasCharged { get; set; }
public Nullable<bool> HasPrinted { get; set; }
public string ReqItemCode { get; set; }
public string ReqItemName { get; set; }
public Nullable<decimal> Price { get; set; }
public Nullable<decimal> Quantity { get; set; }
public string BarCodeClassCode { get; set; }
public string BarCodeClassName { get; set; }
public Nullable<decimal> Color { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<int> StatusCode { get; set; }
public string HisID { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Antibacteria
{
public int ID { get; set; }
public string AntbCode { get; set; }
public string BactCode { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
public string Value { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Antibiotic
{
public int ID { get; set; }
public string AntbCode { get; set; }
public string AntbName { get; set; }
public string PYM { get; set; }
public string AntbClass { get; set; }
public string Medical1 { get; set; }
public string Medical2 { get; set; }
public string Hemal1 { get; set; }
public string Hemal2 { get; set; }
public string Emiction1 { get; set; }
public string Emiction2 { get; set; }
public string MICCode { get; set; }
public string MIDCode { get; set; }
public string AntbNameEn { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bact_Result
{
public int ID { get; set; }
public string Result { get; set; }
public int Kind { get; set; }
public string Code { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bacteria
{
public int ID { get; set; }
public string BactCode { get; set; }
public string BactName { get; set; }
public string Family { get; set; }
public string Genus { get; set; }
public string Specise { get; set; }
public Nullable<int> Seq { get; set; }
public string Whonet { get; set; }
public string Gram { get; set; }
public string DefaultValue { get; set; }
public string PYM { get; set; }
public string PreserveFluid { get; set; }
public Nullable<int> TestBoardSeq { get; set; }
public string BactNameEn { get; set; }
}
}

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bacteria_Result
{
public int BacteriaResultID { get; set; }
public string Result { get; set; }
public bool ResultKind { get; set; }
public string Code { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BarCode
{
public int ID { get; set; }
public string BarCodeClassCode { get; set; }
public decimal StartValue { get; set; }
public decimal EndValue { get; set; }
public decimal Value { get; set; }
public int Turn { get; set; }
}
}

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BarCodeClass
{
public string BarCodeClassCode { get; set; }
public string BarCodeClassName { get; set; }
public string PrintModel { get; set; }
public string Description { get; set; }
public string Additive { get; set; }
public string Cubage { get; set; }
public string Range { get; set; }
public Nullable<decimal> Fee { get; set; }
public string PrintStr { get; set; }
public Nullable<bool> IsAuto { get; set; }
public Nullable<decimal> Color { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodCharacter
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string PYM { get; set; }
public Nullable<bool> IsOperation { get; set; }
public string Urgent { get; set; }
public string Tip { get; set; }
public Nullable<int> Seq { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodCheckItem
{
public int ID { get; set; }
public string Type { get; set; }
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string Description { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodConstituent
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }
public string PYM { get; set; }
public Nullable<decimal> Spec { get; set; }
public string Unit { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<decimal> ConvertQuotiety { get; set; }
public Nullable<int> StorageDays { get; set; }
public Nullable<int> WarnDays { get; set; }
public Nullable<int> StorageMinCount { get; set; }
public Nullable<int> StorageSafeCount { get; set; }
public Nullable<decimal> InPrice { get; set; }
public Nullable<decimal> OutPrice { get; set; }
public Nullable<int> SelfFlag { get; set; }
public Nullable<int> ComponentFlag { get; set; }
public string OutCode1 { get; set; }
public string OutCode2 { get; set; }
public string Method1Code { get; set; }
public string TypeCode { get; set; }
public string Method2Code { get; set; }
public Nullable<decimal> DoctCheckValue { get; set; }
public Nullable<decimal> ManageCheckValue { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodConstituentType
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string Unit { get; set; }
public Nullable<decimal> Spec { get; set; }
public Nullable<int> Seq { get; set; }
public string PYM { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodCrip
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string PYM { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodMatchMethod
{
public int ID { get; set; }
public string Code { get; set; }
public string Method { get; set; }
public Nullable<bool> IsSameMatch { get; set; }
public string Description { get; set; }
public string PYM { get; set; }
public string PrimaryMethodCode { get; set; }
public string SecondaryMethodCode { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodMatchResult
{
public int ID { get; set; }
public string Code { get; set; }
public string Result { get; set; }
public Nullable<bool> IsSamePrimarySucc { get; set; }
public Nullable<bool> IsSameSecondarySucc { get; set; }
public Nullable<bool> IsDiffPrimarySucc { get; set; }
public Nullable<bool> IsDiffSecondarySucc { get; set; }
public string PYM { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodPurpose
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string PYM { get; set; }
public string Description { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodSpec
{
public int ID { get; set; }
public string BloodConstituentCode { get; set; }
public string Code { get; set; }
public Nullable<decimal> Spec { get; set; }
public Nullable<decimal> InPrice { get; set; }
public Nullable<decimal> RhInPrice { get; set; }
public string Description { get; set; }
public string FeeCode { get; set; }
public string RhFeeCode { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodStation
{
public int ID { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string PYM { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_BloodType
{
public int ID { get; set; }
public string Code { get; set; }
public string Abo { get; set; }
public string AboStr { get; set; }
public string Rh { get; set; }
public string RhStr { get; set; }
public string TypeStr { get; set; }
public Nullable<decimal> Color { get; set; }
public string PYM { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bone_CelClass
{
public string CellClassCode { get; set; }
public string CellClassName { get; set; }
public string BackColor { get; set; }
public string FontColor { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bone_Cell
{
public string CellCode { get; set; }
public string CellClassCode { get; set; }
public string CellName { get; set; }
public Nullable<int> Seq { get; set; }
public string RefValue { get; set; }
public Nullable<decimal> BoneMax { get; set; }
public Nullable<decimal> BoneMin { get; set; }
public Nullable<decimal> BloodMax { get; set; }
public Nullable<decimal> BloodMin { get; set; }
public Nullable<bool> IsRelate { get; set; }
public string ReportCode { get; set; }
}
}

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Bone_Templete
{
public string BoneTemCode { get; set; }
public string BoneTemName { get; set; }
public string Description { get; set; }
public string Suggest { get; set; }
}
}

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Common
{
public string ClassCode { get; set; }
public string ItemCode { get; set; }
public string ItemName { get; set; }
public Nullable<bool> IsDefault { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Config
{
public int ID { get; set; }
public string Key { get; set; }
public string Value { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Dept
{
public string DeptCode { get; set; }
public string DomainCode { get; set; }
public string DeptName { get; set; }
public bool IsIn { get; set; }
public bool IsOut { get; set; }
public bool IsEmer { get; set; }
public bool IsObser { get; set; }
public int BedCount { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Diagnose
{
public int ID { get; set; }
public string Code { get; set; }
public string Diagnose { get; set; }
public string ICDCode { get; set; }
public string PYM { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Doctor
{
public string DoctCode { get; set; }
public string DeptCode { get; set; }
public string DeptName { get; set; }
public string DoctName { get; set; }
public string PYM { get; set; }
public string Tel { get; set; }
}
}

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Domain
{
public string DomainCode { get; set; }
public string DomainName { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Group
{
public string GroupCode { get; set; }
public string DeptCode { get; set; }
public string GroupName { get; set; }
public string Description { get; set; }
public Nullable<bool> IsLab { get; set; }
public string Leader { get; set; }
}
}

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Hospital
{
public string HospitalCode { get; set; }
public string HospitalType { get; set; }
public string HospitalName { get; set; }
public string Tel { get; set; }
public string Man { get; set; }
public string Address { get; set; }
public string PostNo { get; set; }
public string ReportTitle { get; set; }
public string EMail { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_InsToRptItem
{
public int ID { get; set; }
public string InsCode { get; set; }
public string RptItemCode { get; set; }
public Nullable<decimal> Adjust { get; set; }
public string ItemCode { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
public Nullable<decimal> X1 { get; set; }
public Nullable<decimal> X0 { get; set; }
public string OutFormat { get; set; }
public string InsName { get; set; }
public string RptItemName { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
public string SampleCode { get; set; }
}
}

@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Instrument
{
public string InsCode { get; set; }
public string SampleCode { get; set; }
public string InsName { get; set; }
public string InsClassCode { get; set; }
public string NameShort { get; set; }
public string SN { get; set; }
public Nullable<bool> IsDual { get; set; }
public bool HasStoped { get; set; }
public string CommVersion { get; set; }
public string DecVersion { get; set; }
public string BarCode { get; set; }
public string PYM { get; set; }
public string DecApp { get; set; }
public string FileName { get; set; }
}
}

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Menu
{
public int ID { get; set; }
public Nullable<int> PID { get; set; }
public string MenuCode { get; set; }
public string MenuName { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_PatientClass
{
public string PatientClassCode { get; set; }
public string PatientClassName { get; set; }
public string DeptFlag { get; set; }
public bool IsPrior { get; set; }
public bool IsGenCost { get; set; }
public bool IsCollect { get; set; }
}
}

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_QC_Position
{
public int PositionID { get; set; }
public string InsCode { get; set; }
public Nullable<int> Postion { get; set; }
public string SampleCode { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReferenceGroup
{
public string RefGroupCode { get; set; }
public string RefGroupName { get; set; }
public bool SexFlag { get; set; }
public bool AgeFlag { get; set; }
public bool SampleFlag { get; set; }
public bool SpecimenFlag { get; set; }
public bool EndDateFlag { get; set; }
}
}

@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Report
{
public string SampleCode { get; set; }
public string SampleName { get; set; }
public string GroupCode { get; set; }
public string SpecimenCode { get; set; }
public Nullable<bool> IsLocal { get; set; }
public string ReportClass { get; set; }
public string PYM { get; set; }
public string UniteCode { get; set; }
public Nullable<decimal> Color { get; set; }
public string Title { get; set; }
public string TitleEn { get; set; }
public string FileName { get; set; }
public Nullable<bool> IsBloodRoutine { get; set; }
public Nullable<bool> IsUrineRoutine { get; set; }
public Nullable<bool> IsStoolRoutine { get; set; }
public Nullable<bool> IsCruor { get; set; }
public Nullable<bool> IsNcov { get; set; }
}
}

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReportItem
{
public string RptItemCode { get; set; }
public string RptItemName { get; set; }
public string ResultClassCode { get; set; }
public string OutFormat { get; set; }
public string Unit { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
public string OverTip { get; set; }
public string UnderTip { get; set; }
public string Range { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<decimal> DefaultValue { get; set; }
public Nullable<decimal> Price { get; set; }
public string StdCode { get; set; }
public string HelpDiagnose { get; set; }
public string TestMethodCode { get; set; }
public string UniteCode { get; set; }
public string Description { get; set; }
public string SampleCodes { get; set; }
}
}

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReportToItem
{
public int ID { get; set; }
public string SampleCode { get; set; }
public string RptItemCode { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<bool> IsAutoIn { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
public string RptItemName { get; set; }
public string SampleName { get; set; }
public string TestMethodCode { get; set; }
}
}

@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqItem
{
public string ReqItemCode { get; set; }
public string ReqItemName { get; set; }
public string PYM { get; set; }
public string NameShort { get; set; }
public Nullable<decimal> Price { get; set; }
public string Sex { get; set; }
public Nullable<bool> IsEmer { get; set; }
public string InsCode { get; set; }
public string SpecimenCode { get; set; }
public string CollectMin { get; set; }
public string Tip { get; set; }
public string Description { get; set; }
public Nullable<bool> HasStoped { get; set; }
}
}

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqItemToBarCodeClass
{
public int ID { get; set; }
public string ReqItemCode { get; set; }
public string BarCodeClassCode { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<bool> IsNewTube { get; set; }
public string Position { get; set; }
public string BarCodeHead { get; set; }
public string ReqItemName { get; set; }
public string BarCodeClassName { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
public string SpecimenCode { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqItemToReport
{
public int ID { get; set; }
public string ReqItemCode { get; set; }
public string SampleCode { get; set; }
public Nullable<bool> IsLevel { get; set; }
public Nullable<int> Seq { get; set; }
public string ReqItemName { get; set; }
public string SampleName { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
}
}

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqItemToRptItem
{
public int ID { get; set; }
public string ReqItemCode { get; set; }
public string RptItemCode { get; set; }
public string ReqItemName { get; set; }
public string RptItemName { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqItem_Sub
{
public int ID { get; set; }
public string ParentReqItemCode { get; set; }
public string ReqItemCode { get; set; }
public string Seq { get; set; }
public string Description { get; set; }
public string Operator { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
}
}

@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_ReqSheet
{
public string ReqSheetCode { get; set; }
public string ReqSheetName { get; set; }
public string Description { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<int> RowsCount { get; set; }
public Nullable<int> ColsCount { get; set; }
public Nullable<decimal> RowHeight { get; set; }
public string Font { get; set; }
public Nullable<int> FontSize { get; set; }
public Nullable<bool> IsShow { get; set; }
public Nullable<bool> IsEmer { get; set; }
public Nullable<decimal> Color { get; set; }
public string PYM { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Req_SheetToItem
{
public int ID { get; set; }
public string ReqSheetCode { get; set; }
public string ReqSheetName { get; set; }
public string ReqItemCode { get; set; }
public string ReqItemName { get; set; }
public Nullable<int> Seq { get; set; }
public Nullable<bool> IsLevel { get; set; }
public Nullable<System.DateTime> UpdateTime { get; set; }
public string Operator { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RingDiameter
{
public int ID { get; set; }
public string AntbCode { get; set; }
public string BactCode { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
public Nullable<decimal> Value { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Role
{
public string RoleCode { get; set; }
public string RoleName { get; set; }
public string Description { get; set; }
}
}

@ -0,0 +1,21 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RoleToMenu
{
public int ID { get; set; }
public string RoleCode { get; set; }
public string MenuCode { get; set; }
}
}

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RptItem_Formula
{
public int FormulaID { get; set; }
public string RptItemCode { get; set; }
public string Formula { get; set; }
public Nullable<bool> Checked { get; set; }
public string SampleCode { get; set; }
public Nullable<int> Sex { get; set; }
public string RptItemCode1 { get; set; }
public string RptItemCode2 { get; set; }
public string RptItemCode3 { get; set; }
public string RptItemCode4 { get; set; }
public string RptItemCode5 { get; set; }
}
}

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RptItem_Reference
{
public int RefID { get; set; }
public string RptItemCode { get; set; }
public string RefGroupCode { get; set; }
public string SampleCode { get; set; }
public string SpecimenCode { get; set; }
public string Sex { get; set; }
public Nullable<int> StartAge { get; set; }
public Nullable<int> EndAge { get; set; }
public Nullable<System.DateTime> EndDate { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
public string Unit { get; set; }
public string OutRange { get; set; }
public string OverTip { get; set; }
public string UnderTip { get; set; }
public string OutFormat { get; set; }
public Nullable<bool> IsShow { get; set; }
public string AgeClass { get; set; }
public Nullable<bool> ReverseFlag { get; set; }
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RptItem_Result
{
public int ResultID { get; set; }
public string RptItemCode { get; set; }
public string TextResultCode { get; set; }
public string OutTip { get; set; }
public string InCode { get; set; }
public Nullable<decimal> Max { get; set; }
public Nullable<decimal> Min { get; set; }
}
}

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_RptItem_Warn
{
public int ID { get; set; }
public string RptItemCode { get; set; }
public string SampleCode { get; set; }
public string SpecimenCode { get; set; }
public Nullable<decimal> OverMax { get; set; }
public Nullable<decimal> OverMin { get; set; }
public Nullable<decimal> UnderMax { get; set; }
public Nullable<decimal> UnderMin { get; set; }
}
}

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_Specimen
{
public string SpecimenCode { get; set; }
public string SpecimenName { get; set; }
public Nullable<int> WhonetNo { get; set; }
public string WhonetCode { get; set; }
public string Sex { get; set; }
public string HisCode { get; set; }
public Nullable<bool> IsPrint { get; set; }
public string PYM { get; set; }
public string UniteCode { get; set; }
}
}

@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_TestBoard
{
public int ID { get; set; }
public Nullable<int> TestBoardSeq { get; set; }
public string AntbCode { get; set; }
public string TestBoardName { get; set; }
public string MicMax { get; set; }
public string MicMin { get; set; }
public string Content { get; set; }
public Nullable<decimal> KBMax { get; set; }
public Nullable<decimal> KBMin { get; set; }
public string Priority { get; set; }
public Nullable<int> Seq { get; set; }
}
}

@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_User
{
public string UserCode { get; set; }
public string RoleCode { get; set; }
public string GroupCode { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string Sex { get; set; }
public Nullable<System.DateTime> Birth { get; set; }
public string Tel { get; set; }
public string Description { get; set; }
public byte[] Photo { get; set; }
public byte[] SignImage { get; set; }
public string RightCode { get; set; }
public Nullable<bool> IsLab { get; set; }
}
}

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Dict_UserToMenu
{
public int ID { get; set; }
public string UserCode { get; set; }
public string MenuCode { get; set; }
public string MenuName { get; set; }
}
}

@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class JCBYTB
{
public string TESTNO { get; set; }
public Nullable<System.DateTime> RESULTDATE { get; set; }
public int ISYANG { get; set; }
public string PATHOCODE { get; set; }
public string PATHO_NAME { get; set; }
public Nullable<bool> ISDCNY { get; set; }
public string PY { get; set; }
public string MEMO { get; set; }
public Nullable<System.DateTime> UPDATEDATE { get; set; }
public string HospitalCode { get; set; }
}
}

@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class JYSJXXB
{
public string LISNO { get; set; }
public string TESTNO { get; set; }
public string TYPENAME { get; set; }
public string NAME { get; set; }
public Nullable<System.DateTime> SENDDATE { get; set; }
public Nullable<System.DateTime> RESULTDATEE { get; set; }
public string SENDDEPTCODE { get; set; }
public string MEMO { get; set; }
public Nullable<System.DateTime> UpdateDate { get; set; }
public string BedCode { get; set; }
public string chargedoccode { get; set; }
public string ChargeDocName { get; set; }
public string Bgys { get; set; }
public string HospitalCode { get; set; }
}
}

@ -0,0 +1,175 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class lisdbEntities : DbContext
{
public lisdbEntities()
: base("name=lisdbEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<Blood_CheckResult> Blood_CheckResult { get; set; }
public virtual DbSet<Blood_Infusion> Blood_Infusion { get; set; }
public virtual DbSet<Blood_Infusion_Detail> Blood_Infusion_Detail { get; set; }
public virtual DbSet<Blood_Inspect> Blood_Inspect { get; set; }
public virtual DbSet<Blood_Match> Blood_Match { get; set; }
public virtual DbSet<Blood_Match_Detail> Blood_Match_Detail { get; set; }
public virtual DbSet<Blood_OperationLog> Blood_OperationLog { get; set; }
public virtual DbSet<Blood_Patient> Blood_Patient { get; set; }
public virtual DbSet<Blood_Reaction> Blood_Reaction { get; set; }
public virtual DbSet<Blood_Reaction_Detail> Blood_Reaction_Detail { get; set; }
public virtual DbSet<Collect_Check_Advice> Collect_Check_Advice { get; set; }
public virtual DbSet<Collect_Detail_History> Collect_Detail_History { get; set; }
public virtual DbSet<Collect_Detail_Return> Collect_Detail_Return { get; set; }
public virtual DbSet<Collect_MoveRecord> Collect_MoveRecord { get; set; }
public virtual DbSet<Collect_MoveRecord_Return> Collect_MoveRecord_Return { get; set; }
public virtual DbSet<Collect_Record_History> Collect_Record_History { get; set; }
public virtual DbSet<Collect_Record_Return> Collect_Record_Return { get; set; }
public virtual DbSet<Dict_Antibacteria> Dict_Antibacteria { get; set; }
public virtual DbSet<Dict_Antibiotic> Dict_Antibiotic { get; set; }
public virtual DbSet<Dict_Bact_Result> Dict_Bact_Result { get; set; }
public virtual DbSet<Dict_Bacteria> Dict_Bacteria { get; set; }
public virtual DbSet<Dict_Bacteria_Result> Dict_Bacteria_Result { get; set; }
public virtual DbSet<Dict_BarCode> Dict_BarCode { get; set; }
public virtual DbSet<Dict_BarCodeClass> Dict_BarCodeClass { get; set; }
public virtual DbSet<Dict_Bone_CelClass> Dict_Bone_CelClass { get; set; }
public virtual DbSet<Dict_Bone_Cell> Dict_Bone_Cell { get; set; }
public virtual DbSet<Dict_Bone_Templete> Dict_Bone_Templete { get; set; }
public virtual DbSet<Dict_Common> Dict_Common { get; set; }
public virtual DbSet<Dict_Dept> Dict_Dept { get; set; }
public virtual DbSet<Dict_Diagnose> Dict_Diagnose { get; set; }
public virtual DbSet<Dict_Doctor> Dict_Doctor { get; set; }
public virtual DbSet<Dict_Domain> Dict_Domain { get; set; }
public virtual DbSet<Dict_Group> Dict_Group { get; set; }
public virtual DbSet<Dict_Hospital> Dict_Hospital { get; set; }
public virtual DbSet<Dict_InsToRptItem> Dict_InsToRptItem { get; set; }
public virtual DbSet<Dict_Instrument> Dict_Instrument { get; set; }
public virtual DbSet<Dict_Menu> Dict_Menu { get; set; }
public virtual DbSet<Dict_PatientClass> Dict_PatientClass { get; set; }
public virtual DbSet<Dict_QC_Position> Dict_QC_Position { get; set; }
public virtual DbSet<Dict_ReferenceGroup> Dict_ReferenceGroup { get; set; }
public virtual DbSet<Dict_Report> Dict_Report { get; set; }
public virtual DbSet<Dict_ReportItem> Dict_ReportItem { get; set; }
public virtual DbSet<Dict_ReportToItem> Dict_ReportToItem { get; set; }
public virtual DbSet<Dict_Req_SheetToItem> Dict_Req_SheetToItem { get; set; }
public virtual DbSet<Dict_ReqItem> Dict_ReqItem { get; set; }
public virtual DbSet<Dict_ReqItem_Sub> Dict_ReqItem_Sub { get; set; }
public virtual DbSet<Dict_ReqItemToBarCodeClass> Dict_ReqItemToBarCodeClass { get; set; }
public virtual DbSet<Dict_ReqItemToReport> Dict_ReqItemToReport { get; set; }
public virtual DbSet<Dict_ReqItemToRptItem> Dict_ReqItemToRptItem { get; set; }
public virtual DbSet<Dict_ReqSheet> Dict_ReqSheet { get; set; }
public virtual DbSet<Dict_RingDiameter> Dict_RingDiameter { get; set; }
public virtual DbSet<Dict_Role> Dict_Role { get; set; }
public virtual DbSet<Dict_RoleToMenu> Dict_RoleToMenu { get; set; }
public virtual DbSet<Dict_RptItem_Formula> Dict_RptItem_Formula { get; set; }
public virtual DbSet<Dict_RptItem_Reference> Dict_RptItem_Reference { get; set; }
public virtual DbSet<Dict_RptItem_Result> Dict_RptItem_Result { get; set; }
public virtual DbSet<Dict_RptItem_Warn> Dict_RptItem_Warn { get; set; }
public virtual DbSet<Dict_Specimen> Dict_Specimen { get; set; }
public virtual DbSet<Dict_TestBoard> Dict_TestBoard { get; set; }
public virtual DbSet<Dict_User> Dict_User { get; set; }
public virtual DbSet<Dict_UserToMenu> Dict_UserToMenu { get; set; }
public virtual DbSet<Log_Err> Log_Err { get; set; }
public virtual DbSet<Manage_AutoCost> Manage_AutoCost { get; set; }
public virtual DbSet<Manage_CostParam> Manage_CostParam { get; set; }
public virtual DbSet<Manage_InOutStore> Manage_InOutStore { get; set; }
public virtual DbSet<Manage_Material> Manage_Material { get; set; }
public virtual DbSet<Manage_MaterialClass> Manage_MaterialClass { get; set; }
public virtual DbSet<Manage_Require> Manage_Require { get; set; }
public virtual DbSet<Manage_Supplier> Manage_Supplier { get; set; }
public virtual DbSet<MonitorAlarm> MonitorAlarm { get; set; }
public virtual DbSet<MonitorJob> MonitorJob { get; set; }
public virtual DbSet<Performance> Performance { get; set; }
public virtual DbSet<QC_Item> QC_Item { get; set; }
public virtual DbSet<Qc_Parameter> Qc_Parameter { get; set; }
public virtual DbSet<QC_Product> QC_Product { get; set; }
public virtual DbSet<Qc_Result> Qc_Result { get; set; }
public virtual DbSet<Reagt_Approve> Reagt_Approve { get; set; }
public virtual DbSet<Reagt_Approve_Status> Reagt_Approve_Status { get; set; }
public virtual DbSet<Reagt_Bad> Reagt_Bad { get; set; }
public virtual DbSet<Reagt_Certification> Reagt_Certification { get; set; }
public virtual DbSet<Reagt_Entry> Reagt_Entry { get; set; }
public virtual DbSet<Reagt_Invalid> Reagt_Invalid { get; set; }
public virtual DbSet<Reagt_Log> Reagt_Log { get; set; }
public virtual DbSet<Reagt_Maker> Reagt_Maker { get; set; }
public virtual DbSet<Reagt_Operating_Type> Reagt_Operating_Type { get; set; }
public virtual DbSet<Reagt_Position> Reagt_Position { get; set; }
public virtual DbSet<Reagt_Reagent> Reagt_Reagent { get; set; }
public virtual DbSet<Reagt_Receipt> Reagt_Receipt { get; set; }
public virtual DbSet<Reagt_Receipt_Status> Reagt_Receipt_Status { get; set; }
public virtual DbSet<Reagt_Specification> Reagt_Specification { get; set; }
public virtual DbSet<Reagt_Stock> Reagt_Stock { get; set; }
public virtual DbSet<Reagt_Supplier> Reagt_Supplier { get; set; }
public virtual DbSet<Reagt_TypeTable> Reagt_TypeTable { get; set; }
public virtual DbSet<Reagt_Unit> Reagt_Unit { get; set; }
public virtual DbSet<RequestDetail> RequestDetail { get; set; }
public virtual DbSet<RequestInfo> RequestInfo { get; set; }
public virtual DbSet<Rpt_AntbResult> Rpt_AntbResult { get; set; }
public virtual DbSet<Rpt_BactResult> Rpt_BactResult { get; set; }
public virtual DbSet<Rpt_BarcodeDesign> Rpt_BarcodeDesign { get; set; }
public virtual DbSet<Rpt_CheckCost_Other> Rpt_CheckCost_Other { get; set; }
public virtual DbSet<Rpt_CheckResult_Review> Rpt_CheckResult_Review { get; set; }
public virtual DbSet<Rpt_Comment> Rpt_Comment { get; set; }
public virtual DbSet<Rpt_CriticalRecord> Rpt_CriticalRecord { get; set; }
public virtual DbSet<Rpt_ImageResult> Rpt_ImageResult { get; set; }
public virtual DbSet<SysConfig> SysConfig { get; set; }
public virtual DbSet<SysSequeue> SysSequeue { get; set; }
public virtual DbSet<SysUser> SysUser { get; set; }
public virtual DbSet<Tpl_ReqItem_Detail> Tpl_ReqItem_Detail { get; set; }
public virtual DbSet<Blood_InoutDetail> Blood_InoutDetail { get; set; }
public virtual DbSet<Blood_InoutRecord> Blood_InoutRecord { get; set; }
public virtual DbSet<Blood_Inventory> Blood_Inventory { get; set; }
public virtual DbSet<Blood_ItemResult> Blood_ItemResult { get; set; }
public virtual DbSet<Blood_Request> Blood_Request { get; set; }
public virtual DbSet<Blood_Request_Detail> Blood_Request_Detail { get; set; }
public virtual DbSet<Blood_TypeCheck> Blood_TypeCheck { get; set; }
public virtual DbSet<Collect_Detail> Collect_Detail { get; set; }
public virtual DbSet<Collect_Record> Collect_Record { get; set; }
public virtual DbSet<Dict_BloodCharacter> Dict_BloodCharacter { get; set; }
public virtual DbSet<Dict_BloodCheckItem> Dict_BloodCheckItem { get; set; }
public virtual DbSet<Dict_BloodConstituent> Dict_BloodConstituent { get; set; }
public virtual DbSet<Dict_BloodConstituentType> Dict_BloodConstituentType { get; set; }
public virtual DbSet<Dict_BloodCrip> Dict_BloodCrip { get; set; }
public virtual DbSet<Dict_BloodMatchMethod> Dict_BloodMatchMethod { get; set; }
public virtual DbSet<Dict_BloodMatchResult> Dict_BloodMatchResult { get; set; }
public virtual DbSet<Dict_BloodPurpose> Dict_BloodPurpose { get; set; }
public virtual DbSet<Dict_BloodSpec> Dict_BloodSpec { get; set; }
public virtual DbSet<Dict_BloodStation> Dict_BloodStation { get; set; }
public virtual DbSet<Dict_BloodType> Dict_BloodType { get; set; }
public virtual DbSet<Dict_Config> Dict_Config { get; set; }
public virtual DbSet<pbcatedt> pbcatedt { get; set; }
public virtual DbSet<pbcatfmt> pbcatfmt { get; set; }
public virtual DbSet<pbcatvld> pbcatvld { get; set; }
public virtual DbSet<Rpt_CheckCost> Rpt_CheckCost { get; set; }
public virtual DbSet<Rpt_CheckResult> Rpt_CheckResult { get; set; }
public virtual DbSet<Rpt_Patient> Rpt_Patient { get; set; }
public virtual DbSet<tmp> tmp { get; set; }
public virtual DbSet<Tpl_ReqItem> Tpl_ReqItem { get; set; }
public virtual DbSet<BYTZDB> BYTZDB { get; set; }
public virtual DbSet<CGJYJGB> CGJYJGB { get; set; }
public virtual DbSet<JCBYTB> JCBYTB { get; set; }
public virtual DbSet<JYSJXXB> JYSJXXB { get; set; }
public virtual DbSet<SJBBZDB> SJBBZDB { get; set; }
public virtual DbSet<v_egent_data> v_egent_data { get; set; }
public virtual DbSet<vw_result_to_peis1> vw_result_to_peis1 { get; set; }
public virtual DbSet<YMSYJG> YMSYJG { get; set; }
public virtual DbSet<YMYWZDB> YMYWZDB { get; set; }
}
}

@ -0,0 +1,636 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"LisDb.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
var itemCollection = loader.CreateEdmItemCollection(inputFile);
var modelNamespace = loader.GetModelNamespace(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
if (container == null)
{
return string.Empty;
}
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#
PushIndent(" ");
}
#>
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
<#
if (container.FunctionImports.Any())
{
#>
using System.Data.Entity.Core.Objects;
using System.Linq;
<#
}
#>
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
{
public <#=code.Escape(container)#>()
: base("name=<#=container.Name#>")
{
<#
if (!loader.IsLazyLoadingEnabled(container))
{
#>
this.Configuration.LazyLoadingEnabled = false;
<#
}
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
// Note: the DbSet members are defined below such that the getter and
// setter always have the same accessibility as the DbSet definition
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
{
#>
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
<#
}
}
#>
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
<#
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
#>
<#=codeStringGenerator.DbSet(entitySet)#>
<#
}
foreach (var edmFunction in container.FunctionImports)
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
}
#>
}
<#
if (!String.IsNullOrEmpty(codeNamespace))
{
PopIndent();
#>
}
<#
}
#>
<#+
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
if (typeMapper.IsComposable(edmFunction))
{
#>
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
}
<#+
}
else
{
#>
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
}
<#+
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
}
}
}
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
{
#>
var <#=name#> = <#=isNotNull#> ?
<#=notNullInit#> :
<#=nullInit#>;
<#+
}
public const string TemplateId = "CSharp_DbContext_Context_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string DbSetInitializer(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} = Set<{1}>();",
_code.Escape(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

@ -0,0 +1,10 @@
// 为模型“C:\My Space\ProjectForUnit\PEIS\PEIS\Model\LisDb.edmx”启用了 T4 代码生成。
// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在
// “属性”窗口中。
// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是
// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体
// 类,请在设计器中打开该模型,右键单击设计器图面,然后
// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成
// 项...”。

@ -0,0 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="9c425fe0e47447f390bc8253bb8697c6" Name="Diagram1">
<EntityTypeShape EntityType="lisdbModel.Blood_CheckResult" Width="1.5" PointX="5.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Infusion" Width="1.5" PointX="5.75" PointY="4.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Infusion_Detail" Width="1.5" PointX="0.75" PointY="6.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Inspect" Width="1.5" PointX="2.75" PointY="6.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Match" Width="1.5" PointX="7.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Match_Detail" Width="1.5" PointX="9.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_OperationLog" Width="1.5" PointX="0.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Patient" Width="1.5" PointX="2.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Reaction" Width="1.5" PointX="9.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Reaction_Detail" Width="1.5" PointX="11.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Check_Advice" Width="1.5" PointX="11.75" PointY="3.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Detail_History" Width="1.5" PointX="11.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Detail_Return" Width="1.5" PointX="4.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_MoveRecord" Width="1.5" PointX="13.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_MoveRecord_Return" Width="1.5" PointX="13.75" PointY="6.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Record_History" Width="1.5" PointX="13.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Record_Return" Width="1.5" PointX="15.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Antibacteria" Width="1.5" PointX="6.75" PointY="15.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Antibiotic" Width="1.5" PointX="15.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bact_Result" Width="1.5" PointX="17.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bacteria" Width="1.5" PointX="17.75" PointY="3.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bacteria_Result" Width="1.5" PointX="17.75" PointY="8.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BarCode" Width="1.5" PointX="17.75" PointY="11.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BarCodeClass" Width="1.5" PointX="17.75" PointY="14.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bone_CelClass" Width="1.5" PointX="11.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bone_Cell" Width="1.5" PointX="13.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Bone_Templete" Width="1.5" PointX="15.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Common" Width="1.5" PointX="17.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Dept" Width="1.5" PointX="19.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Diagnose" Width="1.5" PointX="19.75" PointY="4.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Doctor" Width="1.5" PointX="4.75" PointY="19.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Domain" Width="1.5" PointX="6.75" PointY="19.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Group" Width="1.5" PointX="19.75" PointY="7.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Hospital" Width="1.5" PointX="8.75" PointY="19.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_InsToRptItem" Width="1.5" PointX="19.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Instrument" Width="1.5" PointX="19.75" PointY="15.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Menu" Width="1.5" PointX="19.75" PointY="20.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_PatientClass" Width="1.5" PointX="21.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_QC_Position" Width="1.5" PointX="0.75" PointY="21.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReferenceGroup" Width="1.5" PointX="21.75" PointY="3.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Report" Width="1.5" PointX="21.75" PointY="7.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReportItem" Width="1.5" PointX="10.75" PointY="21.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReportToItem" Width="1.5" PointX="21.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Req_SheetToItem" Width="1.5" PointX="15.75" PointY="21.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqItem" Width="1.5" PointX="21.75" PointY="16.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqItem_Sub" Width="1.5" PointX="21.75" PointY="21.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqItemToBarCodeClass" Width="1.5" PointX="2.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqItemToReport" Width="1.5" PointX="4.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqItemToRptItem" Width="1.5" PointX="12.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_ReqSheet" Width="1.5" PointX="23.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RingDiameter" Width="1.5" PointX="23.75" PointY="5.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Role" Width="1.5" PointX="6.75" PointY="23.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RoleToMenu" Width="1.5" PointX="23.75" PointY="9.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RptItem_Formula" Width="1.5" PointX="23.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RptItem_Reference" Width="1.5" PointX="23.75" PointY="16.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RptItem_Result" Width="1.5" PointX="17.75" PointY="23.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_RptItem_Warn" Width="1.5" PointX="23.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Specimen" Width="1.5" PointX="25.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_TestBoard" Width="1.5" PointX="25.75" PointY="4.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_User" Width="1.5" PointX="25.75" PointY="8.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_UserToMenu" Width="1.5" PointX="25.75" PointY="13.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Log_Err" Width="1.5" PointX="14.75" PointY="25.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_AutoCost" Width="1.5" PointX="25.75" PointY="16.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_CostParam" Width="1.5" PointX="19.75" PointY="25.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_InOutStore" Width="1.5" PointX="25.75" PointY="20.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_Material" Width="1.5" PointX="25.75" PointY="24.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_MaterialClass" Width="1.5" PointX="0.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_Require" Width="1.5" PointX="2.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Manage_Supplier" Width="1.5" PointX="4.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.MonitorAlarm" Width="1.5" PointX="6.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.MonitorJob" Width="1.5" PointX="21.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Performance" Width="1.5" PointX="27.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.QC_Item" Width="1.5" PointX="27.75" PointY="4.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Qc_Parameter" Width="1.5" PointX="27.75" PointY="8.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.QC_Product" Width="1.5" PointX="8.75" PointY="27.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Qc_Result" Width="1.5" PointX="10.75" PointY="27.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Approve" Width="1.5" PointX="27.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Approve_Status" Width="1.5" PointX="27.75" PointY="16.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Bad" Width="1.5" PointX="16.75" PointY="27.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Certification" Width="1.5" PointX="27.75" PointY="19.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Entry" Width="1.5" PointX="27.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Invalid" Width="1.5" PointX="12.75" PointY="28.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Log" Width="1.5" PointX="3" PointY="1" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Maker" Width="1.5" PointX="18.75" PointY="28.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Operating_Type" Width="1.5" PointX="27.75" PointY="28.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Position" Width="1.5" PointX="29.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Reagent" Width="1.5" PointX="0.75" PointY="1.25" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Receipt" Width="1.5" PointX="29.75" PointY="3.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Receipt_Status" Width="1.5" PointX="29.75" PointY="6.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Specification" Width="1.5" PointX="29.75" PointY="9.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Stock" Width="1.5" PointX="29.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Supplier" Width="1.5" PointX="29.75" PointY="17.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_TypeTable" Width="1.5" PointX="29.75" PointY="20.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Reagt_Unit" Width="1.5" PointX="29.75" PointY="23.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.RequestDetail" Width="1.5" PointX="23.75" PointY="29.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.RequestInfo" Width="1.5" PointX="29.75" PointY="26.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_AntbResult" Width="1.5" PointX="0.75" PointY="30.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_BactResult" Width="1.5" PointX="2.75" PointY="30.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_BarcodeDesign" Width="1.5" PointX="4.75" PointY="30.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_CheckCost_Other" Width="1.5" PointX="14.75" PointY="30.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_CheckResult_Review" Width="1.5" PointX="31.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_Comment" Width="1.5" PointX="31.75" PointY="5.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_CriticalRecord" Width="1.5" PointX="6.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_ImageResult" Width="1.5" PointX="8.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.SysConfig" Width="1.5" PointX="31.75" PointY="9.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.SysSequeue" Width="1.5" PointX="10.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.SysUser" Width="1.5" PointX="31.75" PointY="12.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Tpl_ReqItem_Detail" Width="1.5" PointX="31.75" PointY="15.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_InoutDetail" Width="1.5" PointX="16.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_InoutRecord" Width="1.5" PointX="31.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Inventory" Width="1.5" PointX="18.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_ItemResult" Width="1.5" PointX="20.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Request" Width="1.5" PointX="31.75" PointY="23.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_Request_Detail" Width="1.5" PointX="25.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Blood_TypeCheck" Width="1.5" PointX="27.75" PointY="31.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Detail" Width="1.5" PointX="33.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Collect_Record" Width="1.5" PointX="33.75" PointY="5.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodCharacter" Width="1.5" PointX="33.75" PointY="18.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodCheckItem" Width="1.5" PointX="33.75" PointY="22.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodConstituent" Width="1.5" PointX="22.75" PointY="33.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodConstituentType" Width="1.5" PointX="33.75" PointY="25.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodCrip" Width="1.5" PointX="33.75" PointY="29.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodMatchMethod" Width="1.5" PointX="33.75" PointY="32.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodMatchResult" Width="1.5" PointX="10.75" PointY="34.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodPurpose" Width="1.5" PointX="29.75" PointY="34.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodSpec" Width="1.5" PointX="35.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodStation" Width="1.5" PointX="0.75" PointY="35.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_BloodType" Width="1.5" PointX="2.75" PointY="35.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Dict_Config" Width="1.5" PointX="35.75" PointY="4.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.pbcatedt" Width="1.5" PointX="35.75" PointY="7.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.pbcatfmt" Width="1.5" PointX="35.75" PointY="11.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.pbcatvld" Width="1.5" PointX="35.75" PointY="14.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_CheckCost" Width="1.5" PointX="35.75" PointY="17.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_CheckResult" Width="1.5" PointX="35.75" PointY="25.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Rpt_Patient" Width="1.5" PointX="35.75" PointY="30.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.tmp" Width="1.5" PointX="24.75" PointY="36.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.Tpl_ReqItem" Width="1.5" PointX="31.75" PointY="36.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.BYTZDB" Width="1.5" PointX="37.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.CGJYJGB" Width="1.5" PointX="37.75" PointY="3.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.JCBYTB" Width="1.5" PointX="4.75" PointY="37.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.JYSJXXB" Width="1.5" PointX="6.75" PointY="37.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.SJBBZDB" Width="1.5" PointX="37.75" PointY="7.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.v_egent_data" Width="1.5" PointX="37.75" PointY="10.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.vw_result_to_peis1" Width="1.5" PointX="12.75" PointY="37.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.YMSYJG" Width="1.5" PointX="14.75" PointY="37.75" IsExpanded="true" />
<EntityTypeShape EntityType="lisdbModel.YMYWZDB" Width="1.5" PointX="37.75" PointY="18.75" IsExpanded="true" />
<AssociationConnector Association="lisdbModel.FK_REAGT_OP_REFERENCE_REAGT_RE" ManuallyRouted="false" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
</edmx:Edmx>

@ -0,0 +1,733 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"LisDb.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
{
return string.Empty;
}
WriteHeader(codeStringGenerator, fileManager);
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
{
fileManager.StartNewFile(entity.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
<#=codeStringGenerator.EntityClassOpening(entity)#>
{
<#
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
var complexProperties = typeMapper.GetComplexProperties(entity);
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public <#=code.Escape(entity)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var navigationProperty in collectionNavigationProperties)
{
#>
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var complexProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(complexProperty)#>
<#
}
}
var navigationProperties = typeMapper.GetNavigationProperties(entity);
if (navigationProperties.Any())
{
#>
<#
foreach (var navigationProperty in navigationProperties)
{
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
<#
}
#>
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
{
fileManager.StartNewFile(complex.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
{
<#
var complexProperties = typeMapper.GetComplexProperties(complex);
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
{
#>
public <#=code.Escape(complex)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(complex);
if (simpleProperties.Any())
{
foreach(var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var edmProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
{
fileManager.StartNewFile(enumType.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#
if (typeMapper.EnumIsFlags(enumType))
{
#>
[Flags]
<#
}
#>
<#=codeStringGenerator.EnumOpening(enumType)#>
{
<#
var foundOne = false;
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
{
foundOne = true;
#>
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
<#
}
if (foundOne)
{
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
}
#>
}
<#
EndNamespace(code);
}
fileManager.Process();
#>
<#+
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
{
fileManager.StartHeader();
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
<#+
fileManager.EndBlock();
}
public void BeginNamespace(CodeGenerationTools code)
{
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#+
PushIndent(" ");
}
}
public void EndNamespace(CodeGenerationTools code)
{
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
{
PopIndent();
#>
}
<#+
}
}
public const string TemplateId = "CSharp_DbContext_Types_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Log_Err
{
public int ID { get; set; }
public Nullable<System.DateTime> Time { get; set; }
public string Content { get; set; }
public string Key { get; set; }
}
}

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Manage_AutoCost
{
public int CostID { get; set; }
public Nullable<int> ReqItemID { get; set; }
public Nullable<int> InsID { get; set; }
public Nullable<int> MtID { get; set; }
public Nullable<decimal> Fee { get; set; }
public Nullable<decimal> Count { get; set; }
public Nullable<System.DateTime> CostDate { get; set; }
public Nullable<decimal> TotalCount { get; set; }
}
}

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Manage_CostParam
{
public int ParamID { get; set; }
public string ReqItemCode { get; set; }
public string InsCode { get; set; }
public Nullable<int> MtID { get; set; }
public Nullable<decimal> Fee { get; set; }
public string CostMode { get; set; }
}
}

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace PEIS.Model
{
using System;
using System.Collections.Generic;
public partial class Manage_InOutStore
{
public int InID { get; set; }
public string RequireCode { get; set; }
public Nullable<int> MtID { get; set; }
public Nullable<System.DateTime> InDate { get; set; }
public Nullable<decimal> InCount { get; set; }
public Nullable<decimal> InPrice { get; set; }
public string InUserCode { get; set; }
public Nullable<bool> IsOut { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save