public static string GetQBIDFromPLID(int nID) { string str; if (!nID.Equals(0)) { if (!PLClient.m_bRead) { PLClient.ReadTable(); } if (PLClient.m_MapPLIDtoQBID != null) { str = (PLClient.m_MapPLIDtoQBID.ContainsKey(nID) ? Convert.ToString(PLClient.m_MapPLIDtoQBID[nID]) : ""); } else { str = ""; } } else { str = ""; } return(str); }
public static string GetNNFromID(int nID) { string empty; if (!nID.Equals(0)) { if (!PLClient.m_bRead) { PLClient.ReadTable(); } if (PLClient.m_MapIDtoNN != null) { empty = (PLClient.m_MapIDtoNN.ContainsKey(nID) ? PLClient.m_MapIDtoNN[nID].ToString() : string.Empty); } else { empty = string.Empty; } } else { empty = string.Empty; } return(empty); }
public static int GetIDFromNN(string Key) { int num; Key = Key.ToUpper(); if (!string.IsNullOrEmpty(Key)) { if (!PLClient.m_bRead) { PLClient.ReadTable(); } if (PLClient.m_MapNNtoID != null) { num = (PLClient.m_MapNNtoID.ContainsKey(Key) ? Convert.ToInt32(PLClient.m_MapNNtoID[Key]) : 0); } else { num = 0; } } else { num = 0; } return(num); }
public static int GetContactIDFromClientID(int Key) { int num; if (!Key.Equals(0)) { if (!PLClient.m_bRead) { PLClient.ReadTable(); } if (PLClient.m_mapClientIDtoContactID != null) { num = (PLClient.m_mapClientIDtoContactID.ContainsKey(Key) ? PLClient.m_mapClientIDtoContactID[Key] : 0); } else { num = 0; } } else { num = 0; } return(num); }
public static int GetCount() { int num; if (!PLClient.m_bRead) { PLClient.ReadTable(); } num = (PLClient.m_MapNNtoID != null ? PLClient.m_MapNNtoID.Count : 0); return(num); }
public static int GetPLIDFromQBID(string sQBID) { int num; if (!sQBID.Equals("")) { if (!PLClient.m_bRead) { PLClient.ReadTable(); } if (PLClient.m_MapPLIDtoQBID == null) { num = 0; } else if (PLClient.m_MapPLIDtoQBID.ContainsValue(sQBID)) { int key = 0; Dictionary <int, string> .Enumerator enumerator = PLClient.m_MapPLIDtoQBID.GetEnumerator(); while (enumerator.MoveNext()) { Dictionary <int, string> mMapPLIDtoQBID = PLClient.m_MapPLIDtoQBID; KeyValuePair <int, string> current = enumerator.Current; if (mMapPLIDtoQBID[current.Key].ToUpper().CompareTo(sQBID.ToUpper()) == 0) { current = enumerator.Current; key = current.Key; } } num = key; } else { num = 0; } } else { num = 0; } return(num); }