/// <summary> /// /// </summary> /// <returns></returns> public static int CrearPatient(PatientBE Patient, MutualPorPacienteList mutualList) { CrearPatientReq req = new CrearPatientReq(); req.BusinessData.Patient = Patient; //MutualPorPacienteList wMutualPorPacienteList = new MutualPorPacienteList(); //var mList = from m in mutualList select new MutualPorPacienteBE { IdMutual = m.IdMutual, IdPatient = Patient.PatientId }; //wMutualPorPacienteList.AddRange(mList); req.BusinessData.Mutuales = mutualList; req.ContextInformation.UserId = frmBase_TabForm.IndentityUserInfo.ProviderId.ToString(); CrearPatientRes res = req.ExecuteService <CrearPatientReq, CrearPatientRes>(req); if (res.Error != null) { throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); } return(res.BusinessData.IdPatient); }
/// <summary> /// /// </summary> /// <returns></returns> public static int CrearPatient(PatientBE Patient, MutualPorPacienteList mutualList) { CrearPatientReq req = new CrearPatientReq(); req.BusinessData.Patient = Patient; //MutualPorPacienteList wMutualPorPacienteList = new MutualPorPacienteList(); //var mList = from m in mutualList select new MutualPorPacienteBE { IdMutual = m.IdMutual, IdPatient = Patient.PatientId }; //wMutualPorPacienteList.AddRange(mList); req.BusinessData.Mutuales = mutualList; req.ContextInformation.UserId = frmBase_TabForm.IndentityUserInfo.ProviderId.ToString(); CrearPatientRes res = req.ExecuteService<CrearPatientReq, CrearPatientRes>(req); if (res.Error != null) throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); return res.BusinessData.IdPatient; }