Exemplo n.º 1
0
        public static List <Products> _a(Admins a)
        {
            var list = new List <Products>();

            foreach (Products p in products)
            {
                if (p.AdminID == a.ID)
                {
                    list.Add(p);
                }
            }
            return(list);
        }
Exemplo n.º 2
0
        public static async Task <bool> Check(Admins admin, Page page)
        {
            await LoadAdmins();

            if (GetAdminById(admin.ID) == null)
            {
                await App.Send("Info", "Ert konto har raderats!", "Ok");

                await App.LogOut(page);

                return(true);
            }
            return(false);
        }
Exemplo n.º 3
0
        public static async Task <AdminIcon> LoadAdminIcon(Admins ad)
        {
            HttpClient client = new HttpClient();

            try
            {
                var responce = await client.GetStringAsync(LINK + AIMAGE + "/" + ad.ID);

                return(JsonConvert.DeserializeObject <AdminIcon>(responce));
            }
            catch (Exception e)
            {
                return(null);
            }
        }
Exemplo n.º 4
0
 public static async Task FullyEditAdmin(Admins admin)
 {
     await EditAdmin(admin);
     await LoadAdmins();
 }
Exemplo n.º 5
0
 public static async Task FullyRemoveAdmin(Admins admin)
 {
     await RemoveAdmin(admin);
     await RemoveAdminIcon(admin);
     await LoadAdmins();
 }
Exemplo n.º 6
0
        public static async Task <HttpResponseMessage> RemoveAdmin(Admins admin)
        {
            HttpClient client = new HttpClient();

            return(await client.DeleteAsync(LINK + ADMINS + "/" + admin.ID));
        }