/// <summary> /// 保存住院病人授权 /// </summary> /// <returns></returns> public string SaveInfo() { return(base.ExecuteActionJsonResult("住院病人授权保存", () => { CD_InpatientAuthorized entity = base.GetPageData <CD_InpatientAuthorized>(0); InpatientAuthorizedService.SaveInfo(entity); return new WebApi_Result(); })); }
/// <summary> /// 保存住院病人授权 /// </summary> /// <param name="entity"></param> public void SaveInfo(CD_InpatientAuthorized entity) { var cur_entity = EntityOperate <CD_InpatientAuthorized> .GetEntityById(entity.InpatientId, "InpatientId"); if (cur_entity != null) { entity.Creator = null; entity.CreateTime = null; entity.UpdateM("InpatientId"); } else { entity.SaveModelM(); } }
/// <summary> /// 获取住院病人授权信息 /// </summary> /// <returns></returns> public string GetInfoById() { return(base.ExecuteActionJsonResult("获取住院病人授权信息", () => { CD_InpatientAuthorized entity = EntityOperate <CD_InpatientAuthorized> .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 }; })); }