You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.9 KiB
64 lines
1.9 KiB
#region CopyRight
|
|
|
|
/****************************************************************
|
|
* Project:健康体检信息管理系统(PEIS)
|
|
* Author:罗绍明
|
|
* CLR Version:4.0.30319.42000
|
|
* CreateTime:2023-05-01 14:54:23
|
|
* Version:v2.0
|
|
*
|
|
* Description:
|
|
*
|
|
* History:
|
|
*
|
|
*****************************************************************
|
|
* Copyright @ 云南新八达科技有限公司 2023 All rights reserved
|
|
*****************************************************************/
|
|
|
|
#endregion CopyRight
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using PEIS.Entity;
|
|
using PEIS.Utils;
|
|
|
|
namespace PEIS.Model
|
|
{
|
|
public class ExamReportModel : IModel<ExamReport>
|
|
{
|
|
public List<ExamReport> GetItems()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取当前体检者的体检报告
|
|
/// </summary>
|
|
/// <param name="id">EID</param>
|
|
/// <returns></returns>
|
|
public ExamReport GetByID(Int64 id)
|
|
{
|
|
var item = DAOHelp.Query<ExamReport>($@"SELECT TOP 1 * FROM Exam_Report WHERE EID= '{id}' AND IsDelete <>1").FirstOrDefault();
|
|
var i = DAOHelp.Execute($"INSERT INTO {item.TableName}(EID,Report) VALUES (@EID,@Report)", new Dictionary<string, object>
|
|
{
|
|
{ "@EID", item.EID },
|
|
{ "@Report", item.Report }
|
|
});
|
|
Debug.WriteLine(item.ID);
|
|
Debug.WriteLine(i);
|
|
return item;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除当前体检者的体检报告
|
|
/// </summary>
|
|
/// <param name="id">EID</param>
|
|
/// <returns></returns>
|
|
public bool DeleteItem(Int64 id)
|
|
{
|
|
return DAOHelp.ExecuteSql($@"UPDATE Exam_Report SET IsDelete=1 WHERE EID= '{id}'") > 0;
|
|
}
|
|
}
|
|
} |