Example #1
0
        public override void Refresh()
        {
            this.mutualListBindingSource.DataSource          = ServiceCalls.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 = ServiceCalls.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();
        }
Example #2
0
        public override void Refresh()
        {
            grdPersonas.DataSource = ServiceCalls.RetrivePersonas();
            grdPersonas.RefreshDataSource();

            base.Refresh();
        }
Example #3
0
        /// <summary>
        /// Carga Dominios relacionados entre al objeto _RelatedDomains que esta bindiado a la grilla
        /// </summary>
        static void Populate(out Exception ex)
        {
            ex = null;

            try
            {
                _ProfecionesList        = SearchParametroByParams((int)TipoParametroEnum.Profesion, null);
                _EstadoCivilList        = SearchParametroByParams((int)TipoParametroEnum.EstadoCivil, null);
                _EspecialidadMedicaList = SearchParametroByParams((int)TipoParametroEnum.Especialidad, null);
                _EspecialidadMedicaList.Add(new ParametroBE {
                    Nombre = Enum.GetName(typeof(CommonValuesEnum), CommonValuesEnum.Ninguno), IdParametro = (int)CommonValuesEnum.Ninguno
                });
                _TipoEventoMedicoList   = SearchParametroByParams((int)TipoParametroEnum.TipoEventoMedico, null);
                _AllergiesItemTypesList = ServiceCalls.SearchParametroByParams((int)TipoParametroEnum.AllergiesItemTypes, null);

                _CEI_10List      = (CEI10GridList)Fwk.HelperFunctions.SerializationFunctions.DeserializeFromXml(typeof(CEI10GridList), Fwk.HelperFunctions.FileFunctions.OpenTextFile(@"dat\cei.xml"));
                _CEI_10ComboList = (CEI10ComboList)Fwk.HelperFunctions.SerializationFunctions.DeserializeFromXml(typeof(CEI10ComboList), Fwk.HelperFunctions.FileFunctions.OpenTextFile(@"dat\cei10_combo.xml"));
                _PMOFileList     = (PMOFileList)Fwk.HelperFunctions.SerializationFunctions.DeserializeFromXml(typeof(PMOFileList), Fwk.HelperFunctions.FileFunctions.OpenTextFile(@"dat\pmo.xml"));
            }
            catch (Exception err)
            {
                //err.Source = "Origen de datos";
                ex = err;
            }
        }
Example #4
0
        public frmMainRibon()
        {
            InitializeComponent();
            exceptionViewer                    = new ExceptionViewComponent();
            Application.CurrentCulture         = new CultureInfo("es-AR");
            ServiceCalls.OnControlerException += new EventHandler(Controller_OnControlerException);
            this.Text = string.Concat(Assembly.GetExecutingAssembly().GetName().ProcessorArchitecture, " version ", Assembly.GetExecutingAssembly().GetName().Version.ToString());

            ServiceCalls.PopulateAsync();
        }
Example #5
0
        private void aceptCancelButtonBar1_ClickOkCancelEvent(object sender, DialogResult result)
        {
            if (result == System.Windows.Forms.DialogResult.Cancel)
            {
                this.DialogResult = result;
                this.Close();
            }
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (uc_Persona1.HasErrors())
                {
                    this.xtraTabControl1.SelectedTabPage = xtraTabPage1;
                    return;
                }
                this.DialogResult = result;
                try
                {
                    uc_Persona1.SetPersona();
                    uc_MedioContacto1.SetPersona();

                    if (State == Fwk.Bases.EntityUpdateEnum.NEW)
                    {
                        this.MutualList = MutualListAux;
                        if (Patient.Persona.IdPersona == 0)
                        {
                            ServiceCalls.CrearPatient(Patient, this.MutualList);
                        }
                        else
                        {
                            ServiceCalls.AsociarPatientAPersona(Patient, this.MutualList);
                        }

                        this.MessageViewer.Show(String.Format("{0} se creo con exito", Patient.Persona.ApellidoNombre.Trim()));
                        this.Close();
                    }
                    if (State == Fwk.Bases.EntityUpdateEnum.UPDATED)
                    {
                        CheckMutualChanges();
                        ServiceCalls.UpdatePatient(Patient, this.MutualList, uc_Persona1.AnteriorFechaNacimiento);
                        this.MessageViewer.Show(String.Format("{0} se actualizó con exito", Patient.Persona.ApellidoNombre.Trim()));
                        this.Close();
                    }
                }
                catch (Exception ex)
                {
                    this.ExceptionViewer.Show(ex);
                    this.DialogResult = System.Windows.Forms.DialogResult.None;
                }
            }
        }
 private void frmPatientAtencion_Leave(object sender, EventArgs e)
 {
     if (_Appointment != null)
     {
         _Appointment.Status = (int)AppoimantsStatus_SP.Cerrado;
         try
         {
             ServiceCalls.UpdateAppoimentStatus(_Appointment);
         }
         catch (Exception ex)
         {
             this.ExceptionViewer.Show(ex);
         }
     }
 }
        /// <summary>
        /// Carga Dominios relacionados entre al objeto _RelatedDomains que esta bindiado a la grilla
        /// </summary>
        void Populate(out Exception ex)
        {
            ex = null;

            try
            {
                _PatientAllergy             = ServiceCalls.GetPatientAllergy(ServiceCalls.CurrentPatient.PatientId);
                _PatientMedicament_ViewList = ServiceCalls.RetrivePatientMedicaments(ServiceCalls.CurrentPatient.PatientId, null);
                _MedicalEventAlert_ViewList = ServiceCalls.RetriveMedicalEventAlert(ServiceCalls.CurrentPatient.PatientId, null, false);
                if (MedicalEvent == null)
                {
                    MedicalEvent = new MedicalEventBE();
                    MedicalEvent.MedicalEventId = -1;
                    if (this._Appointment != null)
                    {
                        MedicalEvent.AppointmentId = this._Appointment.AppointmentId;
                    }


                    MedicalEvent.ProfesionalId       = ServiceCalls.CurrentProfesional.IdProfesional;
                    MedicalEvent.IdEspesialidad      = ServiceCalls.CurrentProfesional.IdEspecialidad.Value;
                    MedicalEvent.PatientId           = ServiceCalls.CurrentPatient.PatientId;
                    MedicalEvent.PatientMedicaments  = _PatientMedicament_ViewList;
                    MedicalEvent.HealthInstitutionId = ServiceCalls.CurrentHealthInstitution.HealthInstitutionId;

                    MedicalEvent.MedicalEventId = ServiceCalls.CreateMedicalEvent(MedicalEvent);
                }
                else
                {
                    MedicalEvent.PatientMedicaments = _PatientMedicament_ViewList;
                }
            }
            catch (Exception err)
            {
                err.Source = "Origen de datos";
                ex         = err;
            }
        }