Beispiel #1
0
        /// <summary>
        /// 更新病历查阅状态
        /// </summary>
        /// <param name="AccessIDs">需要更新的id(多个以逗号分隔)</param>
        /// <param name="AccessState">查阅状态0审阅1已审阅</param>
        public void UpdateAccessState(string AccessIDs, string AccessState)
        {
            if (!string.IsNullOrWhiteSpace(AccessIDs))
            {
                foreach (string AccessID in AccessIDs.Trim(',').Split(','))
                {
                    CD_MedicalRecordAccessRecord entity = EntityOperate <CD_MedicalRecordAccessRecord> .GetEntityById(AccessID, "AccessID");

                    if (entity != null)
                    {
                        entity.AccessState = int.Parse(AccessState);
                        entity.UpdateTime  = DateTime.Now;
                        entity.UpdateM("AccessID");
                    }
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="entity"></param>
 public void save(CD_MedicalRecordAccessRecord entity)
 {
     if (!string.IsNullOrWhiteSpace(entity.AccessID) && entity.AccessID != "null")
     {
         entity.UpdateM("HomePageId");
     }
     else
     {
         entity.AccessID = CommonService.GetPrimaryId(new GI_SerialInfo()
         {
             Name = "CD_MedicalRecordAccessRecord", ColumnName = "AccessID", OrganID = entity.OrganID
         }) + "";
         //申请状态默认为0未审阅
         entity.AccessState = 0;
         //如果申请人id为空,则创建人为申请人
         if (string.IsNullOrWhiteSpace(entity.ApplyUserID))
         {
             entity.ApplyUserID = entity.Creator; entity.ApplyDate = entity.CreateTime;
         }
         entity.SaveModelM();
     }
 }