Exemplo n.º 1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            UserGeneral   current = userList[lstUsers.SelectedIndex];
            EditOrAddUser form    = new EditOrAddUser(information, current);

            form.Show();
        }
Exemplo n.º 2
0
        private void btnAccountSettings_Click(object sender, EventArgs e)
        {
            GetAccessLevel current = new GetAccessLevel();

            current.SessionKey = information.Token;
            current.Id         = information.UserId;

            string json = "";

            json = JsonConvert.SerializeObject(current);
            json = "=" + json;

            string path = "";

            path = information.URL + "/api/users/getAll";

            string response = ApiConnector.SendToApi(path, json);
            var    userList = JsonConvert.DeserializeObject <List <UserGeneral> >(response);

            UserGeneral yourSelf = new UserGeneral();

            foreach (UserGeneral us in userList)
            {
                if (us.UserId == information.UserId)
                {
                    yourSelf = us;
                }
            }

            EditOrAddUser form = new EditOrAddUser(information, yourSelf);

            form.Show();
        }
Exemplo n.º 3
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            EditOrAddUser form = new EditOrAddUser(information);

            form.Show();
        }