85 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			85 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using AIMSDAL;
 | |
| using AIMSModel;
 | |
| using AIMSObjectQuery;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using AIMSExtension;
 | |
| using DrawGraph;
 | |
| using System.Data;
 | |
| 
 | |
| namespace AIMSBLL
 | |
| {
 | |
|     public partial class BFactEvents
 | |
|     {
 | |
|         public static int DeleteById(string factEventsId)
 | |
|         {
 | |
|             return DFactEvents.DeleteById(factEventsId);
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 插入实体
 | |
|         /// </summary>
 | |
|         /// <param name="eventRecord">实体类对象</param>
 | |
|         /// <returns>标识列值或影响的记录行数</returns>
 | |
|         public static FactEvents Insert(int OperationRecordID, string eventName, DateTime BeginTime, DateTime EndTime, int EventTypeId)
 | |
|         {
 | |
|             Events opeevent = BEvents.SelectSingle(" name='" + eventName + "'", new ParameterList());
 | |
|             FactEvents Inevent = DFactEvents.SelectSingle(" PatientId=@OperationRecordId and EventId=@EventId and EventTypeId=@EventTypeId", new ParameterList("@OperationRecordId", OperationRecordID, "@EventId", opeevent.Id, "@EventTypeId", EventTypeId));
 | |
|             if (Inevent != null && Inevent.Id != 0) return Inevent;
 | |
|             Inevent = new FactEvents();
 | |
|             Inevent.EventName = eventName;
 | |
|             Inevent.PatientId = OperationRecordID;
 | |
|             Inevent.EventId = opeevent.Id;
 | |
|             Inevent.EventTypeId = EventTypeId;
 | |
|             Inevent.EventBeginTime = BeginTime;
 | |
|             Inevent.EventEndTime = EndTime;
 | |
|             Inevent.IsContinue = 0;
 | |
|             Inevent.OperatorNo = PublicMethod.OperatorNo;
 | |
|             Inevent.OperatorNo = PublicMethod.OperatorName;
 | |
|             Inevent.OperateDate = DateTime.Now;
 | |
|             Inevent.Id = DFactEvents.Insert(Inevent);
 | |
|             return Inevent;
 | |
|         }
 | |
| 
 | |
|         public static void Add(FactEvents FactEventsObj)
 | |
|         {
 | |
|             DFactEvents.Add(FactEventsObj);
 | |
|         }
 | |
| 
 | |
|         public static bool IsValid(int EventsId)
 | |
|         {
 | |
|             return DFactEvents.IsValid(EventsId);
 | |
|         }
 | |
| 
 | |
|         //public static void Update(FactEvents FactEventsObj)
 | |
|         //{
 | |
|         //    DFactEvents.Update(FactEventsObj);
 | |
|         //}
 | |
| 
 | |
|         public static void Delete(int Id)
 | |
|         {
 | |
|             DFactEvents.Delete(Id);
 | |
|         }
 | |
| 
 | |
|         public static FactEvents GetModel(int Id)
 | |
|         {
 | |
|             return DFactEvents.GetModel(Id);
 | |
|         }
 | |
| 
 | |
|         public static DataTable GetDataTable(int PatientId, int EventTypeId)
 | |
|         {
 | |
|             return DFactEvents.GetDataTable(PatientId, EventTypeId);
 | |
|         }
 | |
|         public static bool IsExists(int EventTypeId, int PatientId, string Name)
 | |
|         {
 | |
|             return DFactEvents.IsExists(EventTypeId, PatientId, Name);
 | |
|         }
 | |
| 
 | |
|         public static string GetTitleEvent(int PatientId, int TypeId)
 | |
|         {
 | |
|             return DFactEvents.GetTitleEvent(PatientId, TypeId);
 | |
|         }
 | |
|     }
 | |
| }
 |