public static bool AddMensa(Mensa m)
        {
            try
            {
                if (Mensa.Mensas.Exists(x => x.Name == m.Name))
                {
                    MUtility.ShowError("Menza sa tim nazivom vec postoji");
                    return(false);
                }

                MenzaFullDto mdto = new MenzaFullDto();
                mdto.Naziv          = m.Name;
                mdto.Lokacija       = m.Location;
                mdto.GpsLat         = m.GPSLat;
                mdto.GpsLong        = m.GPSLong;
                mdto.RadnoVreme     = m.WorkTime;
                mdto.VanrednoNeRadi = m.CurrentlyClosed;

                Api.AddNewMensa(mdto);
                Mensa.UpdateMensaList();
                return(true);
            }
            catch (Exception ex)
            {
                MUtility.ShowException(ex);
                return(false);
            }
        }
        public static bool LoginUser(string username, string password)
        {
            ClientLoginDto clog = new ClientLoginDto {
                KIme_Mail = username, Sifra = password
            };

            try
            {
                SesijaDto sesija = Api.LoginUser(clog);
                MSettings.CurrentSession = new Session()
                {
                    SessionID = sesija.IdSesije
                };

                KorisnikFullDto korisnik = Api.GetUserFullInfo(sesija.IdKorisnika);
                if (korisnik.IdTipaNaloga == (int)User.UserAccountType.Student)
                {
                    MUtility.ShowError("Prijavljivanje sa studentskog naloga je onemoguceno na ovoj aplikaciji!");
                    Api.LogoutUser(MSettings.CurrentSession.SessionID);
                    return(false);
                }
                MSettings.CurrentSession.LoggedUser = MUtility.GenerateUserFromDTO(korisnik);
                return(true);
            }
            catch (Exception ex)
            {
                MSettings.CurrentSession = null;
                MUtility.ShowException(ex);
                return(false);
            }
        }
        public static bool AddFaculty(Faculty f)
        {
            try
            {
                if (Faculty.Faculties.Exists(x => x.Name == f.Name))
                {
                    MUtility.ShowError("Fakultet sa tim nazivom vec postoji");
                    return(false);
                }

                FakultetFullDto fdto = new FakultetFullDto();
                fdto.Naziv = f.Name;


                Api.AddNewFaculty(fdto);
                Faculty.UpdateFacultyList();
                return(true);
            }
            catch (Exception ex)
            {
                MUtility.ShowException(ex);
                return(false);
            }
        }