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

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

            if (!sQBID.Equals(""))
            {
                if (!PLTask.bRead)
                {
                    PLTask.ReadTable();
                }
                if (PLTask.m_MapPLIDtoQBID == null)
                {
                    num1 = 0;
                }
                else if (PLTask.m_MapPLIDtoQBID.ContainsValue(sQBID))
                {
                    int num2 = 0;
                    Dictionary <int, string> .Enumerator enumerator = PLTask.m_MapPLIDtoQBID.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        Dictionary <int, string>   mapPliDtoQbid = PLTask.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);
        }