private void CheckGlavniAdmin() { var glavniAdmin = new Admin(); glavniAdmin.FullName = "Glavni Admin"; glavniAdmin.Username = "******"; glavniAdmin.Password = "******"; glavniAdmin.Role = 0; var retVal = service.FindAdmin(new LoginUser { Username = glavniAdmin.Username, Password = glavniAdmin.Password }); if (retVal == null) service.AddAdmin(glavniAdmin); }
/// /// <param name="admin"></param> /// <param name="service"></param> public string CreateAdmin(Admin admin, IDBService service){ return service.AddAdmin(admin); }