/// <summary>
 /// 保存出院记录
 /// </summary>
 /// <returns></returns>
 public string SaveInfo()
 {
     return(base.ExecuteActionJsonResult("出院记录保存", () =>
     {
         CD_OuthospitalRecord entity = base.GetPageData <CD_OuthospitalRecord>(0);
         outhospitalRecordService.SaveInfo(entity);
         return new WebApi_Result();
     }));
 }
 /// <summary>
 /// 获取出院记录信息
 /// </summary>
 /// <returns></returns>
 public string GetInfoById()
 {
     return(base.ExecuteActionJsonResult("获取出院记录信息", () =>
     {
         CD_OuthospitalRecord entity = EntityOperate <CD_OuthospitalRecord> .GetEntityById(Request["InpatientId"], "InpatientId");
         if (entity != null && string.IsNullOrWhiteSpace(entity.Creator))
         {
             entity.Creator = EntityOperate <GI_UserInfo> .GetEntityById(entity.Creator, "USERID").UserName;
         }
         return new WebApi_Result()
         {
             data = entity
         };
     }));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 保存出院记录
 /// </summary>
 /// <param name="entity"></param>
 public void SaveInfo(CD_OuthospitalRecord entity)
 {
     if (!string.IsNullOrWhiteSpace(entity.OuthospitalRecordId) && entity.OuthospitalRecordId != "null")
     {
         entity.Creator    = null;
         entity.CreateTime = null;
         entity.UpdateM("OuthospitalRecordId");
     }
     else
     {
         entity.OuthospitalRecordId = CommonService.GetPrimaryId(new GI_SerialInfo()
         {
             Name = "CD_OuthospitalRecord", ColumnName = "OuthospitalRecordId", OrganID = entity.OrganID
         }) + "";
         entity.SaveModelM();
     }
 }