Пример #1
0
        private void grdDataPeopleAuthoritation_DoubleClick(object sender, EventArgs e)
        {
            OperationResult     objOperationResult     = new OperationResult();
            authorizedpersonDto objAuthorizedPersonDto = new authorizedpersonDto();

            objAuthorizedPersonDto = _objAuthorizedPersonBL.GetAuthorizedPerson(ref objOperationResult, _AuthorizedPersonId);
            if (objAuthorizedPersonDto == null)
            {
                MessageBox.Show("Este Trabajador no está ingresado en la LISTA DE AUTORIZADOS.", "NO SE ENCONTRÓ TRABAJADOR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
                string Pacient = objAuthorizedPersonDto.v_FirstName + " " + objAuthorizedPersonDto.v_FirstLastName + " " + objAuthorizedPersonDto.v_SecondLastName;

                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)
                {
                    objAuthorizedPersonDto.d_EntryToMedicalCenter = DateTime.Now;
                    _objAuthorizedPersonBL.UpdateAuthorizedPerson(ref objOperationResult, objAuthorizedPersonDto, Globals.ClientSession.GetAsList());
                    _objListaAuthorizedPerson             = _objAuthorizedPersonBL.GetAuthorizedPersonPagedAndFiltered(ref objOperationResult, 0, null, "", "");
                    grdDataPeopleAuthoritation.DataSource = _objListaAuthorizedPerson;
                }
            }
        }
Пример #2
0
        private void btnCancelPersonAuthoritation_Click(object sender, EventArgs e)
        {
            authorizedpersonDto oauthorizedpersonDto = new authorizedpersonDto();
            AuthorizedPersonBL  oAuthorizedPersonBL  = new AuthorizedPersonBL();

            OperationResult objOperationResult = new OperationResult();

            oauthorizedpersonDto = oAuthorizedPersonBL.GetAuthorizedPerson(ref objOperationResult, _AuthorizedPersonId);

            oauthorizedpersonDto.d_EntryToMedicalCenter = (DateTime?)null;
            oAuthorizedPersonBL.UpdateAuthorizedPerson(ref objOperationResult, oauthorizedpersonDto, Globals.ClientSession.GetAsList());


            _objListaAuthorizedPerson             = oAuthorizedPersonBL.GetAuthorizedPersonPagedAndFiltered(ref objOperationResult, 0, null, "", "");
            grdDataPeopleAuthoritation.DataSource = _objListaAuthorizedPerson;
            //lblRecordCountTotal.Text = "Total : " + _objLista.Count.ToString();
            //lblRecordCountPendiente.Text = "Pendientes : " + _objLista.FindAll(p => p.i_CalendarStatusId == (int)CalendarStatus.Agendado).Count();

            MessageBox.Show("Se cancelo el ingreso al trabajar " + _objListaAuthorizedPerson[0].v_FirstName + " " + _objListaAuthorizedPerson[0].v_FirstLastName + " " + _objListaAuthorizedPerson[0].v_SecondLastName, "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }