public static List <Kupci> getKupciIme() { List <Kupci> temp = Connection.dm.Kupci.OrderBy(x => x.Ime).ToList(); Kupci d = new Kupci(); d.KupacID = 0; d.Ime = "Dodaj kupca"; temp.Insert(0, d); return(temp); }
public static Kupci SelectIME(string ime, string lozinka) { Kupci s = Connection.dm.selectIme(ime).FirstOrDefault(); if (s != null) { if (Util.UIHelper.GenerateHash(lozinka, s.LozinkaSalt) == s.LozinkaHash) { return(s); } else { throw new Exception("Unijeli ste pogrešnu lozinku."); } } return(null); }
public static void KupciInsert(Kupci k) { Connection.dm.insertKupac(k.Ime, k.Prezime, k.DatumRegistracije, k.Email, k.LozinkaHash, k.LozinkaSalt); }