public long m_lngGetUnitedInputGroupInfo(System.Security.Principal.IPrincipal p_objPrincipal, out clsInputGroupUnited_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_lngGetUnitedInputGroupInfo"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL = @"SELECT c.check_category_id_chr, c.check_category_desc_vchr, b.apply_unit_id_chr, b.apply_unit_name_vchr, a.input_group_id_chr, a.input_group_name_vchr, a.inuseflag_num FROM t_bse_lis_input_group a, t_aid_lis_apply_unit b, t_bse_lis_check_category c WHERE a.apply_unit_id_chr(+) = b.apply_unit_id_chr AND b.check_category_id_chr = c.check_category_id_chr"; DataTable tableResult = new DataTable(); try { lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref tableResult); if (lngRes > 0 && tableResult != null) { p_objResults = new clsInputGroupUnited_VO[tableResult.Rows.Count]; for (int i = 0; i < p_objResults.Length; i++) { p_objResults[i] = new clsInputGroupUnited_VO(); ConstructUnitVO(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); }
private void ConstructUnitVO(DataRow dtr, clsInputGroupUnited_VO vo) { if (dtr != null && vo != null) { try { vo.m_intINUSEFLAG_NUM = int.Parse(dtr["inuseflag_num"].ToString()); } catch { } vo.m_strAPPLY_UNIT_ID_CHR = dtr["apply_unit_id_chr"].ToString(); vo.m_strAPPLY_UNIT_NAME_VCHR = dtr["apply_unit_name_vchr"].ToString(); vo.m_strCHECK_CATEGORY_ID_CHR = dtr["check_category_id_chr"].ToString(); vo.m_strCHECK_CATEGORY_NAME_CHR = dtr["check_category_desc_vchr"].ToString(); vo.m_strINPUT_GROUP_ID_CHR = dtr["input_group_id_chr"].ToString(); vo.m_strINPUT_GROUP_NAME_VCHR = dtr["input_group_name_vchr"].ToString(); } }