Esempio n. 1
0
 public static string GetNNFromID(int nID)
 {
     if (!PLDepartment.bRead)
     {
         PLDepartment.ReadTable();
     }
     return(PLDepartment.m_MapIDtoNN.ContainsKey(nID) ? PLDepartment.m_MapIDtoNN[nID].ToString() : "");
 }
Esempio n. 2
0
 public static int GetIDFromNN(string Key)
 {
     if (!PLDepartment.bRead)
     {
         PLDepartment.ReadTable();
     }
     Key = Key.ToUpper();
     return(PLDepartment.m_MapNNtoID.ContainsKey(Key) ? Convert.ToInt32(PLDepartment.m_MapNNtoID[Key]) : 0);
 }
Esempio n. 3
0
        public override string MakeNN(bool bSetNickName)
        {
            if (!PLDepartment.bRead)
            {
                PLDepartment.ReadTable();
            }
            string str = this.MakeListNN(this.Name, StaticData.m_NNs, (short)20);

            if (bSetNickName)
            {
                this.NickName = str;
            }
            return(str);
        }
Esempio n. 4
0
        public static string GetQBIDFromPLID(int nID)
        {
            string str;

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

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