private void AddUnitRelation(ref List <clsT_OPR_LIS_APP_APPLY_UNIT_VO> arrApplyUnit, string unitId) { clsT_OPR_LIS_APP_APPLY_UNIT_VO applyUnit = new clsT_OPR_LIS_APP_APPLY_UNIT_VO(); applyUnit.m_strAPPLY_UNIT_ID_CHR = unitId; arrApplyUnit.Add(applyUnit); }
/// <summary> /// 生成申请单元ID数组 /// </summary> /// <param name="p_strApplyUnitsIDArr"></param> private void m_mthGenerateAppApplyUnits(string[] p_strApplyUnitsIDArr) { if (p_strApplyUnitsIDArr == null) { return; } clsDomainController_ApplyUnitManage objDomUnit = new clsDomainController_ApplyUnitManage(); foreach (string str in p_strApplyUnitsIDArr) { clsApplUnit_VO objApplyUnitDataVO = null; long lngRes = objDomUnit.m_lngGetApplyUnitVOByApplyUnitID(str, out objApplyUnitDataVO); if (lngRes <= 0) { MessageBox.Show("数据访问失败!请与管理员联系。"); m_objAppApplyUnits.Clear(); return; } if (objApplyUnitDataVO == null) { MessageBox.Show("无效的申请单元ID!请与管理员联系。"); m_objAppApplyUnits.Clear(); return; } clsLIS_ApplyUnit objApplyUnit = new clsLIS_ApplyUnit(); objApplyUnit.m_ObjDataVO = objApplyUnitDataVO; clsT_OPR_LIS_APP_APPLY_UNIT_VO objAppAppUnitVO = new clsT_OPR_LIS_APP_APPLY_UNIT_VO(); clsLIS_AppApplyUnit objAppApplyUnit = new clsLIS_AppApplyUnit(objAppAppUnitVO); objAppApplyUnit.m_ObjApplyUnit = objApplyUnit; objAppApplyUnit.m_StrApplyUnitID = objApplyUnitDataVO.strApplUnitID; m_objAppApplyUnits.Add(objAppApplyUnit); } }
/// <summary> /// 形成申请单的申请单元【2】 /// </summary> /// <param name="p_strApplyUnitsIDArr"></param> private void m_mthGenerateAppApplyUnits(string[] arrApplyUnits) { if (arrApplyUnits == null || arrApplyUnits.Length == 0) { return; } foreach (string unitId in arrApplyUnits) { clsApplUnit_VO applyUnitVO = null; long lngRes = clsApplyUnitSmp.s_obj.m_lngGetApplyUnitVO(unitId, out applyUnitVO); if (lngRes == 0 || applyUnitVO == null) { m_objAppApplyUnits.Clear(); return; } clsLIS_ApplyUnit objApplyUnit = new clsLIS_ApplyUnit(); objApplyUnit.m_ObjDataVO = applyUnitVO; clsT_OPR_LIS_APP_APPLY_UNIT_VO objAppAppUnitVO = new clsT_OPR_LIS_APP_APPLY_UNIT_VO(); clsLIS_AppApplyUnit objAppApplyUnit = new clsLIS_AppApplyUnit(objAppAppUnitVO); objAppApplyUnit.m_ObjApplyUnit = objApplyUnit; objAppApplyUnit.m_StrApplyUnitID = applyUnitVO.strApplUnitID; m_objAppApplyUnits.Add(objAppApplyUnit); } }
public long m_lngAddNewAppApplyUint(clsT_OPR_LIS_APP_APPLY_UNIT_VO[] arrRecodes) { long lngRes = 0; long lngReff = 0; bool isNull = arrRecodes == null || arrRecodes.Length == 0; if (isNull) { throw new Exception("生成申请单与申请单元的关系失败!"); } #region == SQL == string sql = @" insert into t_opr_lis_app_apply_unit ( application_id_chr, user_group_string, apply_unit_id_chr ) values (?, ?, ?) "; #endregion try { clsHRPTableService dbSvc = new clsHRPTableService(); #region 循环赋值 for (int i = 0; i < arrRecodes.Length; i++) { clsT_OPR_LIS_APP_APPLY_UNIT_VO applyUnitVO = arrRecodes[i]; if (applyUnitVO != null) { lngRes = 0; IDataParameter[] arrParms = null; dbSvc.CreateDatabaseParameter(3, out arrParms); arrParms[0].Value = applyUnitVO.m_strAPPLICATION_ID_CHR; arrParms[1].Value = applyUnitVO.m_strUSER_GROUP_STRING; arrParms[2].Value = applyUnitVO.m_strAPPLY_UNIT_ID_CHR; lngRes = dbSvc.lngExecuteParameterSQL(sql, ref lngReff, arrParms); } } #endregion dbSvc.Dispose(); } catch (Exception ex) { ThrowException(ex); } return(lngRes); }
private void m_mthGenerateAppUnitForAppUnitNode(TreeNode p_trnNode) { if (p_trnNode.Tag == null) { return; } if (p_trnNode.Tag.GetType().Name != typeof(clsApplUnit_VO).Name) { return; } clsApplUnit_VO objApplyUnitDataVO = (clsApplUnit_VO)p_trnNode.Tag; clsLIS_ApplyUnit objApplyUnit = new clsLIS_ApplyUnit(); objApplyUnit.m_ObjDataVO = objApplyUnitDataVO; clsT_OPR_LIS_APP_APPLY_UNIT_VO objAppAppUnitVO = new clsT_OPR_LIS_APP_APPLY_UNIT_VO(); clsLIS_AppApplyUnit objAppApplyUnit = new clsLIS_AppApplyUnit(objAppAppUnitVO); objAppApplyUnit.m_ObjApplyUnit = objApplyUnit; objAppApplyUnit.m_StrApplyUnitID = objApplyUnitDataVO.strApplUnitID; string strUserGroupPath = m_strGenerateGroupPathString(p_trnNode); strUserGroupPath += objApplyUnitDataVO.strApplUnitID; objAppApplyUnit.m_StrUserGroupPath = strUserGroupPath; bool blnUnitExist = false; foreach (clsLIS_AppApplyUnit obj in m_objAppApplyUnits) { if (obj.m_StrApplyUnitID == objAppApplyUnit.m_StrApplyUnitID) { blnUnitExist = true; break; } } if (!blnUnitExist) { this.m_objAppApplyUnits.Add(objAppApplyUnit); } }