protected void txtNroDocumento_TextChanged(object sender, EventArgs e)
 {
     if (txtNroDocumento.Text.Trim() != "")
     {
         Sigesoft.Node.WinClient.BE.PacientList objpacientDto = new Sigesoft.Node.WinClient.BE.PacientList();
         OperationResult objOperationResult = new OperationResult();
         PacientBL       _objPacientBL      = new PacientBL();
         objpacientDto = _objPacientBL.GetPacient(ref objOperationResult, null, txtNroDocumento.Text.Trim());
         if (objpacientDto == null)
         {
             txtNombres.Text                = "";
             txtApellidoPaterno.Text        = "";
             txtApellidoMaterno.Text        = "";
             ddlGenero.SelectedValue        = "-1";
             dpFechaNacimiento.SelectedDate = null;
             txtPuesto.Text = "";
         }
         else
         {
             txtNombres.Text                = objpacientDto.v_FirstName;
             txtApellidoPaterno.Text        = objpacientDto.v_FirstLastName;
             txtApellidoMaterno.Text        = objpacientDto.v_SecondLastName;
             ddlGenero.SelectedValue        = objpacientDto.i_SexTypeId.ToString();
             dpFechaNacimiento.SelectedDate = objpacientDto.d_Birthdate;
             txtPuesto.Text = objpacientDto.v_DocNumber;
         }
     }
 }
        public frmOccupationalHistory(string pstrMode, string pstrHistoryId, string pstrPacientId, bool Validation)
        {
            OperationResult objOperationResult = new OperationResult();

            PacientBL   objPacientBL = new PacientBL();
            PacientList objpersonDto = new PacientList();

            InitializeComponent();

            objpersonDto = objPacientBL.GetPacient(ref objOperationResult, pstrPacientId, null);
            this.Text    = this.Text + "  (" + objpersonDto.v_FirstName + " " + objpersonDto.v_FirstLastName + " " + objpersonDto.v_SecondLastName + ")";

            _Mode      = pstrMode;
            _HistoryId = pstrHistoryId;
            _PacientId = pstrPacientId;

            Utils.LoadDropDownList(ddlTypeOperationId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 204, null), DropDownListAction.Select);

            //frmHistory frm = new frmHistory(_PacientId);
            //bool ResultValidation = false;
            //ResultValidation = frm._Validation;

            //if (Validation)
            //{
            //    btnSave.Enabled = true;
            //}
            //else
            //{
            //    btnSave.Enabled = false;
            //}
        }
Exemple #3
0
        private void frmPacientEdiccion_Load(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();

            dtpBirthdate.CustomFormat = "dd/MM/yyyy";
            //Llenado de combos
            Utils.LoadDropDownList(ddlMaritalStatusId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 101, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlDocTypeId, "Value1", "Id", BLL.Utils.GetDataHierarchyForCombo(ref objOperationResult, 106, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlSexTypeId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 100, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlLevelOfId, "Value1", "Id", BLL.Utils.GetDataHierarchyForCombo(ref objOperationResult, 108, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlBloodGroupId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 154, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlBloodFactorId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 155, null), DropDownListAction.Select);

            Utils.LoadDropDownList(ddlRelationshipId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 207, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlAltitudeWorkId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 208, null), DropDownListAction.Select);
            Utils.LoadDropDownList(ddlPlaceWorkId, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 204, null), DropDownListAction.Select);

            if (Mode == "New")
            {
                // Additional logic here.
                dtpBirthdate.Checked = false;
            }
            else if (Mode == "Edit")
            {
                PacientList objpacientDto = new PacientList();
                objpacientDto = _objPacientBL.GetPacient(ref objOperationResult, PacientId, null);


                ddlRelationshipId.SelectedValue = objpacientDto.i_Relationship == null ? "-1" : objpacientDto.i_Relationship.ToString();
                ddlAltitudeWorkId.SelectedValue = objpacientDto.i_AltitudeWorkId == null ? "-1" : objpacientDto.i_AltitudeWorkId.ToString();
                ddlPlaceWorkId.SelectedValue    = objpacientDto.i_PlaceWorkId == null ? "-1" : objpacientDto.i_PlaceWorkId.ToString();
                txtExploitedMineral.Text        = objpacientDto.v_ExploitedMineral;

                txtName.Text                     = objpacientDto.v_FirstName;
                txtFirstLastName.Text            = objpacientDto.v_FirstLastName;
                txtSecondLastName.Text           = objpacientDto.v_SecondLastName;
                ddlDocTypeId.SelectedValue       = objpacientDto.i_DocTypeId.ToString();
                ddlSexTypeId.SelectedValue       = objpacientDto.i_SexTypeId.ToString();
                ddlMaritalStatusId.SelectedValue = objpacientDto.i_MaritalStatusId.ToString();
                ddlLevelOfId.SelectedValue       = objpacientDto.i_LevelOfId.ToString();
                txtDocNumber.Text                = objpacientDto.v_DocNumber;
                NumberDocument                   = txtDocNumber.Text;
                dtpBirthdate.Value               = (DateTime)objpacientDto.d_Birthdate;
                txtBirthPlace.Text               = objpacientDto.v_BirthPlace;
                txtTelephoneNumber.Text          = objpacientDto.v_TelephoneNumber;
                txtAdressLocation.Text           = objpacientDto.v_AdressLocation;
                txtMail.Text                     = objpacientDto.v_Mail;
                ddlBloodGroupId.SelectedValue    = objpacientDto.i_BloodGroupId == 0 ? "-1" : objpacientDto.i_BloodGroupId.ToString();
                ddlBloodFactorId.SelectedValue   = objpacientDto.i_BloodFactorId == 0 ? "-1" : objpacientDto.i_BloodFactorId.ToString();
                txtCurrentOccupation.Text        = objpacientDto.v_CurrentOccupation;

                FingerPrintTemplate = objpacientDto.b_FingerPrintTemplate;
                FingerPrintImage    = objpacientDto.b_FingerPrintImage;
                RubricImage         = objpacientDto.b_RubricImage;
                RubricImageText     = objpacientDto.t_RubricImageText;

                pbPersonImage.Image = Common.Utils.BytesArrayToImage(objpacientDto.b_Photo, pbPersonImage);
            }
        }
Exemple #4
0
        private void BindGrid()
        {
            CalendarBL  objCalendarBL  = new CalendarBL();
            calendarDto objcalendarDto = new calendarDto();
            PacientBL   objPacientBL   = new PacientBL();
            PacientList objPacientDto  = new PacientList();

            OperationResult objOperationResult = new OperationResult();

            var objData = GetData(0, null, "", strFilterExpression);

            //Validar que el trabajador exista en el sistema
            objPacientDto = objPacientBL.GetPacient(ref objOperationResult, null, txtDocNumber.Text.Trim());
            //_CalendarId = objData[0].v_CalendarId;
            if (objPacientDto == null)
            {
                MessageBox.Show("Este Trabajador no está ingresado en el sistema SIGESOFT.", "NO SE ENCONTRÓ TRABAJADOR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            string Pacient = objPacientDto.v_FirstName + " " + objPacientDto.v_FirstLastName + " " + objPacientDto.v_SecondLastName;

            if (objData.Count == 0)
            {
                MessageBox.Show("El trabajado " + Pacient + " no está agendado. Comuníquese con el área de Recepción.", "NO SE ENCONTRÓ CITA!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (objData[0].i_CalendarStatusId == (int)CalendarStatus.Cancelado)
                {
                    MessageBox.Show("La cita del trabajor " + Pacient + " ha sido cancelada. Comuníquese con el área de recepción.", "¡INFORMACIÓN!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                if (objData[0].i_CalendarStatusId != (int)CalendarStatus.Agendado)
                {
                    MessageBox.Show("El trabajor " + Pacient + " ya está dentro del Centro Médico.", "¡INFORMACIÓN!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                DialogResult Result = MessageBox.Show("¿Desea registar el ingreso de " + Pacient + " al centro médico?", "TRABAJADOR AGENDADO!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (Result == System.Windows.Forms.DialogResult.Yes)
                {
                    foreach (var item in objData)
                    {
                        objcalendarDto = objCalendarBL.GetCalendar(ref objOperationResult, item.v_CalendarId);
                        objcalendarDto.d_EntryTimeCM = DateTime.Now;

                        objcalendarDto.i_CalendarStatusId = (int)CalendarStatus.Ingreso;
                        objCalendarBL.UpdateCalendar(ref objOperationResult, objcalendarDto, Globals.ClientSession.GetAsList());
                    }
                }
                _objLista                    = _objCalendarBL.GetCalendarsPagedAndFiltered1(ref objOperationResult, 0, null, "i_CalendarStatusId ASC , d_EntryTimeCM ASC", null, DateTime.Now.Date, DateTime.Now.Date.AddDays(1));
                grdData.DataSource           = _objLista;
                lblRecordCountTotal.Text     = "Total : " + _objLista.Count.ToString();
                lblRecordCountPendiente.Text = "Pendientes : " + _objLista.FindAll(p => p.i_CalendarStatusId == (int)CalendarStatus.Agendado).Count();
            }
        }
        private bool SearchPersonExistDb(string nroDocument)
        {
            var pacientDto = _pacientBl.GetPacient(ref _operationResult, null, nroDocument);

            if (pacientDto == null)
            {
                return(false);
            }
            SetPersonData(pacientDto);
            return(true);
        }
Exemple #6
0
        private void LoadDataPerson(string personId)
        {
            var pacientList = _pacientBl.GetPacient(ref _operationResult, personId, null);

            _personId = pacientList.v_PersonId;
            cboDocumentType.SelectedValue = pacientList.i_DocTypeId.ToString();
            cboSexType.SelectedValue      = pacientList.i_SexTypeId.ToString();
            txtNroDocument.Text           = pacientList.v_DocNumber;
            txtFirstName.Text             = pacientList.v_FirstName;
            txtLastName.Text       = pacientList.v_FirstLastName;
            txtSecondLastName.Text = pacientList.v_SecondLastName;
            if (pacientList.d_Birthdate != null)
            {
                dtpDateTimeStar.Value = pacientList.d_Birthdate.Value;
            }
            txtCurrentOcupation.Text = pacientList.v_CurrentOccupation;
        }
        private void LoadPerson()
        {
            PacientList     objpacientDto      = new PacientList();
            PacientBL       _objPacientBL      = new PacientBL();
            OperationResult objOperationResult = new OperationResult();

            objpacientDto                    = _objPacientBL.GetPacient(ref objOperationResult, _PersonId, null);
            NumberDocument                   = objpacientDto.v_DocNumber;
            txtName.Text                     = objpacientDto.v_FirstName;
            txtFirstLastName.Text            = objpacientDto.v_FirstLastName;
            txtSecondLastName.Text           = objpacientDto.v_SecondLastName;
            ddlDocTypeId.SelectedValue       = objpacientDto.i_DocTypeId.ToString();
            ddlSexTypeId.SelectedValue       = objpacientDto.i_SexTypeId.ToString();
            ddlMaritalStatusId.SelectedValue = objpacientDto.i_MaritalStatusId.ToString();
            ddlLevelOfId.SelectedValue       = objpacientDto.i_LevelOfId.ToString();
            txtDocNumber.Text                = objpacientDto.v_DocNumber;
            txtTelephoneNumber.Text          = objpacientDto.v_TelephoneNumber;
            txtMail.Text                     = objpacientDto.v_Mail;
        }