Exemplo n.º 1
0
	public void OnRegisterClick ()
	{
		string user = lblregisterUser.text;
		string pass = lblregisterPass.text;
		string person = lblregisterName.text;
		string json = null;
		string id = null;

		//Cadastrar Vistoriador

		Vistoriador novoVistoriador = new Vistoriador ();
		novoVistoriador.id = 0;
		novoVistoriador.nome = person;
		novoVistoriador.usuario = user;
		novoVistoriador.senha = pass;

		json = novoVistoriador.GetJson ();

		if (isConnected) {
			id = server.saveOrUpdateVistoriador (json);
			novoVistoriador.id = int.Parse (id);
		}

		ServerHandler.vistoriadorDAO.SaveOrUpdate (novoVistoriador);
		print (novoVistoriador);
		ShowLoginScreen ();
	}