Пример #1
0
 /**
  *  Get Source Column
  *	@return source column
  */
 public MColumn GetSourceColumn()
 {
     if (m_column == null || m_column.GetAD_Column_ID() != GetAD_SourceColumn_ID())
     {
         m_column = MColumn.Get(GetCtx(), GetAD_SourceColumn_ID());
     }
     return(m_column);
 }       //	GetSourceColumn
Пример #2
0
        }       //	getCriteria

        /// <summary>
        /// Get Target Column
        /// </summary>
        /// <returns>target column</returns>
        public MColumn GetTargetColumn()
        {
            if (m_column == null || m_column.GetAD_Column_ID() != GetAD_TargetColumn_ID())
            {
                m_column = MColumn.Get(GetCtx(), GetAD_TargetColumn_ID());
            }
            return(m_column);
        }       //	getTargetColumn
Пример #3
0
 /// <summary>
 ///	Get Column
 /// </summary>
 /// <returns>column</returns>
 public MColumn GetColumn()
 {
     if (_column == null ||
         _column.GetAD_Column_ID() != GetAD_Column_ID())
     {
         _column = MColumn.Get(GetCtx(), GetAD_Column_ID());
     }
     return(_column);
 }
Пример #4
0
        /// <summary>
        /// Get Column Name
        /// </summary>
        /// <param name="ctx">context</param>
        /// <param name="AD_Column_ID">column id</param>
        /// <returns>Column Name or null</returns>
        public static string GetColumnName(Ctx ctx, int AD_Column_ID)
        {
            MColumn col = MColumn.Get(ctx, AD_Column_ID);

            if (col.Get_ID() == 0)
            {
                return(null);
            }
            return(col.GetColumnName());
        }
Пример #5
0
        /**
         *	Exclude SerNo creation
         *	@param AD_Column_ID column
         *	@param isSOTrx SO
         *	@return true if excluded
         */
        public bool IsExcludeSerNo(int AD_Column_ID, bool isSOTrx)
        {
            if (GetM_SerNoCtl_ID() == 0)
            {
                return(true);
            }
            if (_excludeSerNos == null)
            {
                List <X_M_SerNoCtlExclude> list = new List <X_M_SerNoCtlExclude>();
                String  sql = "SELECT * FROM M_SerNoCtlExclude WHERE IsActive='Y' AND M_SerNoCtl_ID=" + GetM_SerNoCtl_ID();
                DataSet ds  = null;
                try
                {
                    ds = ExecuteQuery.ExecuteDataset(sql, null);
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        DataRow dr = ds.Tables[0].Rows[i];
                        list.Add(new X_M_SerNoCtlExclude(GetCtx(), dr, null));
                    }
                    ds = null;
                }
                catch (Exception e)
                {
                    log.Log(Level.SEVERE, sql, e);
                }

                _excludeSerNos = new X_M_SerNoCtlExclude[list.Count];
                _excludeSerNos = list.ToArray();
            }
            //	Find it
            if (_excludeSerNos != null && _excludeSerNos.Length > 0)
            {
                MColumn column = MColumn.Get(GetCtx(), AD_Column_ID);
                for (int i = 0; i < _excludeSerNos.Length; i++)
                {
                    if (_excludeSerNos[i].GetAD_Table_ID() == column.GetAD_Table_ID() &&
                        _excludeSerNos[i].IsSOTrx() == isSOTrx)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }