예제 #1
0
        private void btnAgregarDxExamen_Click(object sender, EventArgs e)
        {
            var frm = new Sigesoft.Node.WinClient.UI.Operations.Popups.frmAddExamDiagnosticComponent("New");

            frm._componentId = _componentId;
            frm._serviceId   = _serviceId;

            if (_tmpExamDiagnosticComponentList != null)
            {
                frm._tmpExamDiagnosticComponentList = _tmpExamDiagnosticComponentList;
            }

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            // Refrescar grilla
            // Actualizar variable
            if (frm._tmpExamDiagnosticComponentList != null)
            {
                _tmpExamDiagnosticComponentList = frm._tmpExamDiagnosticComponentList;

                var dataList = _tmpExamDiagnosticComponentList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);
                grdDiagnosticoPorExamenComponente.DataSource = dataList;
                lblRecordCountDiagnosticoPorExamenCom.Text   = string.Format("Se encontraron {0} registros.", dataList.Count());
            }
        }
예제 #2
0
        private void btnEditarDxExamen_Click(object sender, EventArgs e)
        {
            if (grdDiagnosticoPorExamenComponente.Selected.Rows.Count == 0)
            {
                MessageBox.Show("Por favor seleccione un registro.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            var frm = new Sigesoft.Node.WinClient.UI.Operations.Popups.frmAddExamDiagnosticComponent("Edit");

            var diagnosticRepositoryId = grdDiagnosticoPorExamenComponente.Selected.Rows[0].Cells["v_DiagnosticRepositoryId"].Value.ToString();

            frm._diagnosticRepositoryId = diagnosticRepositoryId;

            frm._componentId = _componentId;
            frm._serviceId   = _serviceId;

            if (_tmpExamDiagnosticComponentList != null)
            {
                frm._tmpExamDiagnosticComponentList = _tmpExamDiagnosticComponentList;
            }

            frm.ShowDialog();

            // Refrescar grilla
            // Actualizar variable

            if (frm.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            if (frm._tmpExamDiagnosticComponentList != null)
            {
                _tmpExamDiagnosticComponentList = frm._tmpExamDiagnosticComponentList;

                var dataList = _tmpExamDiagnosticComponentList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);
                grdDiagnosticoPorExamenComponente.DataSource = new DiagnosticRepositoryList();
                grdDiagnosticoPorExamenComponente.DataSource = dataList;
                grdDiagnosticoPorExamenComponente.Refresh();
                lblRecordCountDiagnosticoPorExamenCom.Text = string.Format("Se encontraron {0} registros.", dataList.Count());

                PintargrdDiagnosticoPorExamenComponente();
            }
        }