public long m_lngGetAllReportGroupDetail(System.Security.Principal.IPrincipal p_objPrincipal, out clsReportGroupDetail_VO[] objReportGroupVOList) { long lngRes = 0; objReportGroupVOList = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngGetAllReportGroupDetail"); if (lngRes < 0) { return(-1); } string strSQL = @"SELECT * FROM t_aid_lis_report_group_detail"; DataTable dtbReportDetail = null; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbReportDetail); objHRPSvc.Dispose(); if (dtbReportDetail != null && dtbReportDetail.Rows.Count > 0) { objReportGroupVOList = new clsReportGroupDetail_VO[dtbReportDetail.Rows.Count]; for (int i = 0; i < dtbReportDetail.Rows.Count; i++) { objReportGroupVOList[i] = new clsReportGroupDetail_VO(); ConstructReportGroupDetail(dtbReportDetail.Rows[i], ref objReportGroupVOList[i]); } } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
private void ConstructReportGroupDetailVO(System.Data.DataRow objRow, ref clsReportGroupDetail_VO objReportGroupDetail) { objReportGroupDetail.strReportGroupID = objRow["REPORT_GROUP_ID_CHR"].ToString().Trim(); objReportGroupDetail.strSampleGroupID = objRow["SAMPLE_GROUP_ID_CHR"].ToString().Trim(); objReportGroupDetail.strPrintSeq = objRow["PRINT_SEQ_INT"].ToString().Trim(); }
public long m_lngAddReportGroupDetail(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroupDetail_VO objReportGroupDetailVO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngAddReportGroupDetail"); if (lngRes < 0) { return(-1); } string strSQL = @"INSERT INTO t_aid_lis_report_group_detail (sample_group_id_chr, report_group_id_chr, print_seq_int ) VALUES (?, ?, ?)" ; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] objReportGroupDetailArr = null; objHRPSvc.CreateDatabaseParameter(3, out objReportGroupDetailArr); objReportGroupDetailArr[0].Value = objReportGroupDetailVO.strSampleGroupID; objReportGroupDetailArr[1].Value = objReportGroupDetailVO.strReportGroupID; objReportGroupDetailArr[2].Value = objReportGroupDetailVO.strPrintSeq; long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objReportGroupDetailArr); objHRPSvc.Dispose(); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }