Denne side indeholder artikler med forskellige perspektiver på Identity & Access Management i private og offentlige organisationer. Artiklerne behandler aktuelle IAM-emner og leveres af producenter, rådgivere og implementeringspartnere.
Jeg har ikke tested det, men tror det virker så hvis i kan se noget i koden som ser underligt ud må i gerne sige til!
Jeg lavede denne metode
public int udregnAntal(int antalX, int antalY) { int tal = 0; for (int i = 0; i < antalX; i++) { if(i <= antalY) { tal = i; } } return tal; }
og koden her
for (int i = 0; i < miniLagerList.size(); i++) { if(((MiniLager)miniLagerList.get(i)).hentSektionNavn().equalsIgnoreCase("A")) { if(((MiniLager)miniLagerList.get(i)).hentAntal() < 1) { antalA = 0; }else { antalA = udregnAntal(((MiniLager)miniLagerList.get(i)).hentAntal(),antal); antal = antal - antalA; } }else if(((MiniLager)miniLagerList.get(i)).hentSektionNavn().equalsIgnoreCase("B")) { if(((MiniLager)miniLagerList.get(i)).hentAntal() < 1) { antalB = 0; }else { antalB = udregnAntal(((MiniLager)miniLagerList.get(i)).hentAntal(),antal); antal = antal - antalB; } }else if(((MiniLager)miniLagerList.get(i)).hentSektionNavn().equalsIgnoreCase("C")) { if(((MiniLager)miniLagerList.get(i)).hentAntal() < 1) { antalC = 0; }else { antalC = udregnAntal(((MiniLager)miniLagerList.get(i)).hentAntal(),antal); antal = antal - antalC; } }else if(((MiniLager)miniLagerList.get(i)).hentSektionNavn().equalsIgnoreCase("D")) { if(((MiniLager)miniLagerList.get(i)).hentAntal() < 1) { antalD = 0; }else { antalD = udregnAntal(((MiniLager)miniLagerList.get(i)).hentAntal(),antal); antal = antal - antalD; } } }
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.