Exemplo n.º 1
0
 public static string GetNNFromID(int nID)
 {
     if (!PLTBAcct.bRead)
     {
         PLTBAcct.ReadTable();
     }
     return(PLTBAcct.m_MapIDtoNN.ContainsKey(nID) ? PLTBAcct.m_MapIDtoNN[nID].ToString() : "");
 }
Exemplo n.º 2
0
 public static int GetIDFromNN(string Key)
 {
     if (!PLTBAcct.bRead)
     {
         PLTBAcct.ReadTable();
     }
     Key = Key.ToUpper();
     return(PLTBAcct.m_MapNNtoID.ContainsKey(Key) ? Convert.ToInt32(PLTBAcct.m_MapNNtoID[Key]) : 0);
 }
Exemplo n.º 3
0
        public static string GetQBIDFromPLID(int nID)
        {
            string str;

            if (!nID.Equals(0))
            {
                if (!PLTBAcct.bRead)
                {
                    PLTBAcct.ReadTable();
                }
                str = PLTBAcct.m_MapPLIDtoQBID == null ? "" : (PLTBAcct.m_MapPLIDtoQBID.ContainsKey(nID) ? Convert.ToString(PLTBAcct.m_MapPLIDtoQBID[nID]) : "");
            }
            else
            {
                str = "";
            }
            return(str);
        }
Exemplo n.º 4
0
        public static int GetPLIDFromQBID(string sQBID)
        {
            int num1;

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