/// <summary> /// Get the DocMaskLine object for the given ID of the storage mask that was set in the constructor. /// </summary> /// <param name="okeyId">ObjKey ID</param> /// <returns>DocMaskLine object or null, if no line can be found</returns> private DocMaskLine GetDML(int okeyId) { DocMaskLine ret = null; if (_maskId != null && _maskId.Length != 0) { FWDocMask dm = null; if (Conn.MasterData.DocMasks.TryGetValue(_maskId, out dm)) { foreach (DocMaskLine dml in dm.Core.lines) { if (dml.id == okeyId) { ret = dml; break; } } } } return(ret); }
/// <summary> /// Get the DocMaskLine object for the given group name of the storage mask that was set in the constructor. /// </summary> /// <param name="okeyName">ObjKey name</param> /// <returns>DocMaskLine object or null, if no line can be found</returns> private DocMaskLine GetDML(string okeyName) { DocMaskLine ret = null; if (_maskId != null && _maskId.Length != 0) { FWDocMask dm = null; if (Conn.MasterData.DocMasks.TryGetValue(_maskId, out dm)) { string okeyNameLowerCase = okeyName.ToLower(); foreach (DocMaskLine dml in dm.Core.lines) { if (dml.key.ToLower().Equals(okeyNameLowerCase)) { ret = dml; break; } } } } return(ret); }