Esempio n. 1
0
 public static string GetNNFromID(int Key)
 {
     if (!PLVendor.bRead)
     {
         PLVendor.ReadTable();
     }
     return((Key.Equals(0) ? 0 : (PLVendor.m_MapIDtoNN.ContainsKey(Key) ? 1 : 0)) != 0 ? PLVendor.m_MapIDtoNN[Key].ToString() : "");
 }
Esempio n. 2
0
 public static int GetIDFromNN(string Key)
 {
     if (!PLVendor.bRead)
     {
         PLVendor.ReadTable();
     }
     Key = Key.ToUpper();
     return((Key.Equals("") ? 0 : (PLVendor.m_MapNNtoID.ContainsKey(Key) ? 1 : 0)) != 0 ? Convert.ToInt32(PLVendor.m_MapNNtoID[Key]) : 0);
 }
Esempio n. 3
0
 public static int GetIDFromNameKey(string Key)
 {
     if (!PLVendor.bRead)
     {
         PLVendor.ReadTable();
     }
     Key = Key.ToUpper();
     return((PLVendor.m_MapNameKeytoPLID.Count == 0 ? 0 : (PLVendor.m_MapNameKeytoPLID.ContainsKey(Key) ? 1 : 0)) != 0 ? Convert.ToInt32(PLVendor.m_MapNameKeytoPLID[Key]) : 0);
 }
Esempio n. 4
0
        public static string GetQuickBooksIDFromID(int Key)
        {
            string str;

            if (!Key.Equals(0))
            {
                if (!PLVendor.bRead)
                {
                    PLVendor.ReadTable();
                }
                str = PLVendor.m_MapIDtoQuickBooksID == null ? string.Empty : (PLVendor.m_MapIDtoQuickBooksID.ContainsKey(Key) ? Convert.ToString(PLVendor.m_MapIDtoQuickBooksID[Key]) : string.Empty);
            }
            else
            {
                str = string.Empty;
            }
            return(str);
        }
Esempio n. 5
0
        public static int GetPLIDFromQBID(string sQBID)
        {
            int num1;

            if (!sQBID.Equals(""))
            {
                if (!PLVendor.bRead)
                {
                    PLVendor.ReadTable();
                }
                if (PLVendor.m_MapIDtoQuickBooksID == null)
                {
                    num1 = 0;
                }
                else if (PLVendor.m_MapIDtoQuickBooksID.ContainsValue(sQBID))
                {
                    int num2 = 0;
                    Dictionary <int, string> .Enumerator enumerator = PLVendor.m_MapIDtoQuickBooksID.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        Dictionary <int, string>   idtoQuickBooksId = PLVendor.m_MapIDtoQuickBooksID;
                        KeyValuePair <int, string> current          = enumerator.Current;
                        if (idtoQuickBooksId[current.Key].ToUpper().CompareTo(sQBID.ToUpper()) == 0)
                        {
                            current = enumerator.Current;
                            num2    = current.Key;
                        }
                    }
                    num1 = num2;
                }
                else
                {
                    num1 = 0;
                }
            }
            else
            {
                num1 = 0;
            }
            return(num1);
        }