/// <summary> 保存基本信息 </summary> public void SaveFile() { try { int result = Common.GetRequest("identity").ToInt();// 基本信息Id if (result == 0) { IndividualConsultationFileModel icfm = new IndividualConsultationFileModel() { Number = Common.GetRequest("number"), QuestionTypeId = Common.GetRequest("questionType").ToInt(), UserId = Common.GetRequest("userId").ToInt(), MaritalStatus = Common.GetRequest("maritalStatus"), Culture = Common.GetRequest("culture"), Phone = Common.GetRequest("phone"), ConsultantId = Common.GetSessionValue("UserID", Context).ToInt(), StartDate = DateTime.Now }; // 第一次为保存 result = MgrServices.IndividualConsultationService.AddIndividualConsultationFile(icfm); } else { // 多次为修改 MgrServices.IndividualConsultationService.EditIndividualConsultationFile(new IndividualConsultationFileModel() { Id = result, Number = Common.GetRequest("number"), QuestionTypeId = Common.GetRequest("questionType").ToInt(), UserId = Common.GetRequest("userId").ToInt(), MaritalStatus = Common.GetRequest("maritalStatus"), Culture = Common.GetRequest("culture"), Phone = Common.GetRequest("phone"), ConsultantId = Common.GetSessionValue("UserID", Context).ToInt(), StartDate = DateTime.Now }); } String json = Common.ObjectToJson(result); Context.Response.Write(json); } catch (Exception) { throw; } }
/// <summary> 获取未关联记录信息 </summary> public void GetInfo() { try { int id = Common.GetRequest("identity").ToInt(); // 用户Id string isEdit = Common.GetRequest("isEdit"); // 是否编辑 IndividualConsultationFileModel result = MgrServices.IndividualConsultationService.GetIndividualConsultationInfo(id); String json = Common.ObjectToJson(result); Context.Response.Write(json); } catch (Exception) { throw; } }