Пример #1
0
        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"];
            }
        }
Пример #2
0
 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);
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
        public MainWindow()
        {
            InitializeComponent();
            ServicePointManager.DefaultConnectionLimit = 25;
            mainFrame.Height       = SystemParameters.MaximizedPrimaryScreenHeight - topFrame.Height * 2;
            sideFrame.Height       = mainFrame.Height;
            mainFrame.Width        = SystemParameters.PrimaryScreenWidth * 0.8;
            sideFrame.Width        = SystemParameters.PrimaryScreenWidth * 0.2;
            topFrame.Width         = SystemParameters.PrimaryScreenWidth;
            ClientData.FrameHeight = mainFrame.Height;
            ClientData.FrameWidth  = mainFrame.Width;
            ClientData.mainFrame   = mainFrame;
            ClientData.sideFrame   = sideFrame;
            ClientData.toolFrame   = topFrame;
            Login_Page page = new Login_Page();

            FormatFunctions.LoadAgentDictionary();
            mainFrame.Navigate(page);
        }
Пример #5
0
 static void populateDictionary(string results)
 {
     AgentDictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(results));
     int x = 0;
 }
Пример #6
0
 public static void boolSetter(string result)
 {
     string[] input = FormatFunctions.SplitToPairs(result);
     dict      = FormatFunctions.createValuePairs(input);
     Responded = true;
 }