Exemplo n.º 1
0
        public override void Refresh()
        {
            this.mutualListBindingSource.DataSource          = Controller.RetriveAllObraSocial();
            this.MutualPorPacienteBEBindingSource.DataSource = MutualList;

            gridView2.RefreshData();
            if (State == Fwk.Bases.EntityUpdateEnum.NEW)
            {
                lblTitulo.Text  = "Alta de paciente";
                Patient         = new PatientBE();
                Patient.Persona = new PersonaBE();
                MutualList      = new MutualPorPacienteList();
                MutualListAux   = new MutualPorPacienteList();
                uc_Persona1.Populate(Patient.Persona, State);
            }
            if (State == Fwk.Bases.EntityUpdateEnum.UPDATED)
            {
                lblTitulo.Text = "Actualización de paciente";
                GetPatientRes res = Controller.GetPatient(Patient.PatientId);
                MutualList    = (MutualPorPacienteList)res.BusinessData.Mutuales;
                MutualListAux = (MutualPorPacienteList)res.BusinessData.Mutuales.Clone();

                uc_Persona1.Populate(Patient.Persona, State);
            }
            this.MutualPorPacienteBEBindingSource.DataSource = MutualListAux;

            uc_MedioContacto1.Persona = Patient.Persona;
            uc_Persona1.Refresh();
            uc_MedioContacto1.Init();
            gridControl_MutualXPatient.RefreshDataSource();
            InitSecurity();
            base.Refresh();
        }
Exemplo n.º 2
0
 private void uc_AllShiftGrid1_ChangeStatusEvent(object sender, EventArgs e)
 {
     if (((AppoimantsStatus_SP)sender) == AppoimantsStatus_SP.EnAtencion)
     {
         this.Appointment = this.uc_TimeLine1.SelectedAppointment;
         GetPatientRes res = ServiceCalls.GetPatient(this.Appointment.ProfesionalAppointment.PatientId);
         this.Patient      = res.BusinessData.Patient;
         this.DialogResult = System.Windows.Forms.DialogResult.OK;
         this.Close();
     }
 }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pIdPatient"></param>
        /// <returns></returns>
        public static GetPatientRes GetPatient(int pIdPatient)
        {
            GetPatientReq req = new GetPatientReq();

            //req.BusinessData.Apellido = ;

            req.BusinessData.Id           = pIdPatient;
            req.ContextInformation.UserId = frmBase_TabForm.IndentityUserInfo.ProviderId.ToString();
            req.ContextInformation.AppId  = Controller.CurrentHealthInstitution.HealthInstitutionId.ToString();

            GetPatientRes res = req.ExecuteService <GetPatientReq, GetPatientRes>(req);


            if (res.Error != null)
            {
                throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error);
            }
            return(res);
        }