private void ConstructInputGroupDetailVO(DataRow dtr, clsInputGroupDetail_VO vo) { if (dtr != null && vo != null) { try { vo.m_intSEQUENCE_NUM = int.Parse(dtr["SEQUENCE_NUM"].ToString()); } catch { } vo.m_strCHECK_ITEM_ID_CHR = dtr["CHECK_ITEM_ID_CHR"].ToString(); vo.m_strCHECK_ITEM_NAME_CHR = dtr["CHECK_ITEM_NAME_VCHR"].ToString(); vo.m_strINPUT_GROUP_ID_CHR = dtr["INPUT_GROUP_ID_CHR"].ToString(); } }
private void ConstructSaveVO(out clsInputGroupBaseInfo_VO objBaseInfo, out clsInputGroupDetail_VO[] objDetailVOArr) { objBaseInfo = new clsInputGroupBaseInfo_VO(); if (this.chkStopUse.Checked) { objBaseInfo.m_intINUSEFLAG_NUM = 0; } else { objBaseInfo.m_intINUSEFLAG_NUM = 1; } objBaseInfo.m_intSEQUENCE_NUM = 0; if (this.blnNew) { objBaseInfo.m_strAPPLY_UNIT_ID_CHR = this.trvList.SelectedNode.Tag.ToString(); } else { objBaseInfo.m_strAPPLY_UNIT_ID_CHR = this.trvList.SelectedNode.Parent.Tag.ToString(); } objBaseInfo.m_strASCODE_VCHR = this.txtASCode.Text.Trim(); objBaseInfo.m_strINPUT_GROUP_ID_CHR = this.txtGroupID.Text.Trim(); objBaseInfo.m_strINPUT_GROUP_NAME_VCHR = this.txtGroupName.Text.Trim(); objBaseInfo.m_strPYCODE_VCHR = this.txtPYCode.Text.Trim(); objBaseInfo.m_strSUMMARY_VCHR = this.txtSummary.Text.Trim(); objBaseInfo.m_strWBCODE_VCHR = this.txtWBCode.Text.Trim(); objDetailVOArr = new clsInputGroupDetail_VO[this.lsvGroupItem.Items.Count]; for (int i = 0; i < objDetailVOArr.Length; i++) { objDetailVOArr[i] = new clsInputGroupDetail_VO(); objDetailVOArr[i].m_strINPUT_GROUP_ID_CHR = objBaseInfo.m_strINPUT_GROUP_ID_CHR; objDetailVOArr[i].m_strCHECK_ITEM_ID_CHR = this.lsvGroupItem.Items[i].Text; objDetailVOArr[i].m_strCHECK_ITEM_NAME_CHR = this.lsvGroupItem.Items[i].SubItems[1].Text; objDetailVOArr[i].m_intSEQUENCE_NUM = i; } }
public long m_lngGetInputGroupInfo(System.Security.Principal.IPrincipal p_objPrincipal, string p_strInputGroupID, out clsInputGroupBaseInfo_VO p_objBaseInfo, out clsInputGroupDetail_VO[] p_objResults) { long lngRes = 0; p_objResults = null; p_objBaseInfo = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsInputGroupSvc", "m_lngGetInputGroupInfo"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL1 = @"SELECT * FROM t_bse_lis_input_group a WHERE a.input_group_id_chr = ?"; string strSQL2 = @"SELECT a.*, b.check_item_name_vchr FROM t_bse_lis_input_group_detail a, t_bse_lis_check_item b WHERE a.check_item_id_chr = b.check_item_id_chr AND a.input_group_id_chr = ? ORDER BY a.sequence_num"; DataTable tableResult = new DataTable(); try { IDataParameter[] objParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = p_strInputGroupID; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL1, ref tableResult, objParamArr); if (lngRes > 0 && tableResult != null && tableResult.Rows.Count > 0) { p_objBaseInfo = new clsInputGroupBaseInfo_VO(); ConstructInputGroupBaseInfoVO(tableResult.Rows[0], p_objBaseInfo); objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = p_strInputGroupID; lngRes = 0; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL2, ref tableResult, objParamArr); if (lngRes > 0 && tableResult != null) { p_objResults = new clsInputGroupDetail_VO[tableResult.Rows.Count]; for (int i = 0; i < p_objResults.Length; i++) { p_objResults[i] = new clsInputGroupDetail_VO(); ConstructInputGroupDetailVO(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); }