public static string GetValueFromName(string Key) { string str; if (!Key.Equals("")) { if (!PLConfig.bRead) { PLConfig.ReadTable(); } if (PLConfig.m_MapNametoValue != null) { Key = Key.ToUpper(); str = PLConfig.m_MapNametoValue.ContainsKey(Key) ? Convert.ToString(PLConfig.m_MapNametoValue[Key]) : ""; } else { str = ""; } } else { str = ""; } return(str); }
public static int GetIDFromNN(string Key) { int num; if (!Key.Equals("")) { if (!PLConfig.bRead) { PLConfig.ReadTable(); } if (PLConfig.m_MapNNtoID != null) { Key = Key.ToUpper(); num = PLConfig.m_MapNNtoID.ContainsKey(Key) ? Convert.ToInt32(PLConfig.m_MapNNtoID[Key]) : 0; } else { num = 0; } } else { num = 0; } return(num); }
public static string GetNNFromID(int nID) { string str; if (!nID.Equals(0)) { if (!PLConfig.bRead) { PLConfig.ReadTable(); } str = PLConfig.m_MapIDtoNN == null ? "" : (PLConfig.m_MapIDtoNN.ContainsKey(nID) ? PLConfig.m_MapIDtoNN[nID].ToString() : ""); } else { str = ""; } return(str); }
public static int GetIDFromExtID2(string Key) { int num; if (!Key.Equals((object)0)) { if (!PLConfig.bRead) { PLConfig.ReadTable(); } num = PLConfig.m_MapExtID2toPLID == null ? 0 : (PLConfig.m_MapExtID2toPLID.ContainsKey(Key) ? Convert.ToInt32(PLConfig.m_MapExtID2toPLID[Key]) : 0); } else { num = 0; } return(num); }
public int ResetQuickBooksConnection() { if (!PLConfig.bRead) { PLConfig.ReadTable(); } Dictionary <string, int> .Enumerator enumerator = PLConfig.m_MapNNtoID.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <string, int> current = enumerator.Current; bool flag; if (!current.Key.ToLower().Contains("qb_companyname")) { current = enumerator.Current; if (!current.Key.ToLower().Contains("qb_lastsyncdate")) { current = enumerator.Current; if (!current.Key.ToLower().Contains("qb_pclaw_")) { current = enumerator.Current; flag = !current.Key.ToLower().Contains("qb_employee_"); goto label_8; } } } flag = false; label_8: if (!flag) { current = enumerator.Current; if (current.Value != 0) { current = enumerator.Current; this.ReadExisting((uint)current.Value); this.Value = string.Empty; this.Section = string.Empty; this.UserID = 0; } } } return(PLLink.GetLink().ResetAllQuickBooksIDs()); }