private List <MedicalExamList> GetData(int pintPageIndex, int?pintPageSize, string pstrSortExpression, string pstrFilterExpression) { OperationResult objOperationResult = new OperationResult(); var _objData = _objMedicalExamBL.GetMedicalExamPagedAndFiltered(ref objOperationResult, pintPageIndex, pintPageSize, pstrSortExpression, pstrFilterExpression); if (_objData.Count == 0) { pstrFilterExpression = "i_UIIndex==" + ddlCategoryId.SelectedNode.Tag.ToString() + " && i_IsDeleted==0"; _objData = _objMedicalExamBL.GetMedicalExamPagedAndFiltered(ref objOperationResult, pintPageIndex, pintPageSize, pstrSortExpression, pstrFilterExpression); } if (objOperationResult.Success != 1) { MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(_objData); }
private List <MedicalExamList> GetData(int pintPageIndex, int?pintPageSize, string pstrSortExpression, string pstrFilterExpression) { OperationResult objOperationResult = new OperationResult(); var dataList = _medicalExamBL.GetMedicalExamPagedAndFiltered(ref objOperationResult, pintPageIndex, pintPageSize, pstrSortExpression, pstrFilterExpression); if (objOperationResult.Success != 1) { MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(dataList); }
private void GetDataMedicalExam() { OperationResult objOperationResult = new OperationResult(); var filterExpression = BuildFilterExpression(); var auxiliaryExams = _medicalExamBL.GetMedicalExamPagedAndFiltered(ref objOperationResult, 0, null, "v_Name ASC", filterExpression); if (objOperationResult.Success != 1) { MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (auxiliaryExams != null && auxiliaryExams.Count > 0) { grdExamenAuxilar.DataSource = auxiliaryExams; lblRecordCountExamenAuxiliar.Text = string.Format("Se encontraron {0} registros.", auxiliaryExams.Count()); grdExamenAuxilar.Rows[0].Selected = true; } else { lblRecordCountExamenAuxiliar.Text = string.Format("Se encontraron {0} registros.", 0); } }