Ejemplo n.º 1
0
        public void populateGrid(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            if (dictionary.Count > 0)
            {
                string   filepath         = dictionary["Value"][0] + " - " + dictionary["Name"][0];
                string[] customerFileList = DatabaseFunctions.getCustomerFileList(filepath);
                filepath.Replace(" ", "%20");
                foreach (string text in customerFileList)
                {
                    if ((text != "." || text != "..") && customerFileList.Length > 1)
                    {
                        SecurityButton dataButton = new SecurityButton(text, new string[] { "Sales" })
                        {
                            Text     = text,
                            String2  = filepath,
                            FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
                        };
                        dataButton.Clicked += onFileButton;
                        List <View> list = new List <View>()
                        {
                            dataButton
                        };
                        GridFiller.rapidFillPremadeObjects(list, this, new bool[] { false });
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void loadRoles(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            Roles = new List <string>();
            if (dictionary.Count > 0)
            {
                Roles = dictionary["AgentRole"];
            }
        }
Ejemplo n.º 3
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"];
            }
        }
Ejemplo n.º 4
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);
         string       sql2  = "SELECT AgentRole FROM agentroles WHERE AgentID='" + AgentIDK + "'";
         TaskCallback call2 = loadRoles;
         DatabaseFunctions.SendToPhp(false, sql2, call2);
     }
 }
Ejemplo n.º 5
0
 public static void boolSetter(string result)
 {
     string[] input = FormatFunctions.SplitToPairs(result);
     dict      = FormatFunctions.createValuePairs(input);
     Responded = true;
 }