public void response(string result) { string[] input = FormatFunctions.SplitToPairs(result); dict = FormatFunctions.createValuePairs(input); Responded = true; if (dict.Count > 1) { ClientData.AgentIDK = int.Parse(dict["IDKey"][0]); string sql = "SELECT PermissionGranted FROM agentpermissions WHERE AgentID='" + AgentIDK + "'"; TaskCallback call = loadSecurityKeys; DatabaseFunctions.SendToPhp(false, sql, call); } }
public void archiveCusfields(string result) { List <String> list = new List <String>(); cusFieldArchive = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (cusFieldArchive.Count > 0) { for (int i = 0; i < cusFieldArchive["Index"].Count; i++) { //These lines move Data from Cusfields to Jobfiels, Never needs to be run again! /*string x = "INSERT INTO jobfields (JobID,jobfields.Index,jobfields.Value,AdvValue) VALUES ('" + cusFieldArchive["CusID"][i] + "','" + cusFieldArchive["Index"][i] + "','" + cusFieldArchive["Value"][i] + "','" + cusFieldArchive["AdvValue"][i] + "')"; * list.Add(x); * string y = "UPDATE cusfields SET TaskID='999999' WHERE IDKey='"+cusFieldArchive["IDKey"][i]+"'"; * list.Add(y);*/ } } DatabaseFunctions.SendBatchToPHP(list); }
static void populateDictionary(string results) { AgentDictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(results)); int x = 0; }
public static void boolSetter(string result) { string[] input = FormatFunctions.SplitToPairs(result); dict = FormatFunctions.createValuePairs(input); Responded = true; }
public void loadSecurityKeys(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); SecurityKeys = new List <string>(); if (dictionary.Count > 0) { SecurityKeys = dictionary["PermissionGranted"]; } }