public void saveTaskFields(string result) { string text = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result))["IDKey"][0]; string text2 = "INSERT INTO taskfields (taskfields.Index,taskfields.Value,TaskID) VALUES "; for (int i = 0; i < this.Names.Count; i++) { if (!string.IsNullOrEmpty(this.Names[i].Text)) { string stripped1 = FormatFunctions.CleanDateNew(Names[i].Text); string stripped2 = FormatFunctions.CleanDateNew(Values[i].Text); text2 = string.Concat(new string[] { text2, "('", stripped1, "', '", stripped2, "', '", text, "')," }); } } text2 = text2 + "('', '', '" + text + "')"; DatabaseFunctions.SendToPhp(text2); Tasks_Page page = new Tasks_Page(); ClientData.mainFrame.Navigate(page); }
public void saveTemplateFields(string result) { string text = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result))["IDKey"][0]; string text2 = "INSERT INTO taskfields (taskfields.Index,taskfields.Value,TemplateID) VALUES "; int ID = highestTID + 1; for (int i = 0; i < this.Names.Count; i++) { if (!string.IsNullOrEmpty(this.Names[i].Text)) { string stripped1 = FormatFunctions.CleanDateNew(Names[i].Text); string stripped2 = FormatFunctions.CleanDateNew(Values[i].Text); text2 = text2 + "('" + stripped1 + "', '" + stripped2 + "', '" + ID + "'),"; } } text2 = text2 + "('', '', '" + ID + "')"; DatabaseFunctions.SendToPhp(text2); Tasks_Page page = new Tasks_Page(); ClientData.mainFrame.Navigate(page); }