/// <summary>
 ///
 /// </summary>
 /// <param name="client"></param>
 /// <param name="currency"></param>
 public MAcctSchema(MClient client, KeyNamePair currency)
     : this(client.GetCtx(), 0, client.Get_TrxName())
 {
     SetClientOrg(client);
     SetC_Currency_ID(currency.GetKey());
     SetName(client.GetName() + " " + GetGAAP() + "/" + Get_ColumnCount() + " " + currency.GetName());
 }       //	MAcctSchema
Example #2
0
        }       //	equals

        /// <summary>
        /// IComparer Interface (based on Name/ID value)
        /// </summary>
        /// <param name="p1"></param>
        /// <param name="p2"></param>
        /// <returns></returns>
        public int Compare(KeyNamePair p1, KeyNamePair p2)
        {
            if (IsSortByName())
            {
                return(base.Compare(p1, p2));
            }
            int i1 = p1.GetKey();
            int i2 = p2.GetKey();

            return(i1.CompareTo(i2));
        }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(Object obj)
 {
     if (obj.GetType() == typeof(KeyNamePair))
     {
         KeyNamePair pp = (KeyNamePair)obj;
         if (pp.GetKey() == _key &&
             pp.GetName() != null &&
             pp.GetName().Equals(GetName()))
         {
             return(true);
         }
         return(false);
     }
     return(false);
 }       //	equals
Example #4
0
        /// <summary>
        /// IComparer Interface (based on Name/ID value)
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public int CompareTo(KeyNamePair o)
        {
            if (IsSortByName())
            {
                return(base.Compare(this, o));
            }
            if (o == null)
            {
                return(-1);
            }
            int i1 = int.Parse(_key.ToString());
            int i2 = o.GetKey();

            return(i1.CompareTo(i2));
        }       //	compareTo