private void ConstructCheckItemSimpleVO(DataRow dtr, clsCheckItemSimple_VO vo) { if (dtr != null && vo != null) { vo.m_strAPPLY_UNIT_ID_CHR = dtr["apply_unit_id_chr"].ToString(); vo.m_strCHECK_ITEM_ID_CHR = dtr["check_item_id_chr"].ToString(); vo.m_strCHECK_ITEM_NAME_CHR = dtr["check_item_name_vchr"].ToString(); } }
public long m_lngGetApplyUnitItems(System.Security.Principal.IPrincipal p_objPrincipal, string p_strApplyUnitID, out clsCheckItemSimple_VO[] p_objResults) { long lngRes = 0; p_objResults = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsInputGroupSvc", "m_lngGetApplyUnitItems"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL = @"SELECT a.apply_unit_id_chr, b.check_item_id_chr, b.check_item_name_vchr FROM t_aid_lis_apply_unit_detail a, t_bse_lis_check_item b WHERE a.check_item_id_chr = b.check_item_id_chr AND a.apply_unit_id_chr = ?"; DataTable tableResult = new DataTable(); try { IDataParameter[] objParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = p_strApplyUnitID; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref tableResult, objParamArr); if (lngRes > 0 && tableResult != null) { p_objResults = new clsCheckItemSimple_VO[tableResult.Rows.Count]; for (int i = 0; i < p_objResults.Length; i++) { p_objResults[i] = new clsCheckItemSimple_VO(); ConstructCheckItemSimpleVO(tableResult.Rows[i], p_objResults[i]); } } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx);//要在LogError方法中抛出异常。 lngRes = 0; } return(lngRes); }