Compare commits
188 Commits
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Slim\Factory\AppFactory;
|
||||||
|
use OpenApi\Annotations as OA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Info(title="My First API", version="0.1")
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->addBodyParsingMiddleware();
|
||||||
|
$app->addRoutingMiddleware();
|
||||||
|
$app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Get(path="/api/Banque",
|
||||||
|
* @OA\Response(response="200", description="Succes")
|
||||||
|
* @OA\Response(response="500", description="Bdd Error")
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
$app->get('/Banque/', function(Request $request, Response $response){
|
||||||
|
$query = "SELECT * FROM Banque";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->query($query);
|
||||||
|
$inscrits = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($inscrits));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Banque/FromId/', function(Request $request, Response $response,array $args){
|
||||||
|
$id = $request->getParsedBody()["id"];
|
||||||
|
$query = 'SELECT id, nomBanque FROM InscrBanque WHERE idInscrit=:id';
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':id', $id, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
$inscrit = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($inscrit));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Banque/add/', function(Request $request, Response $response, array $args){
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$idInscrit = $request->getParsedBody()["idInscrit"];
|
||||||
|
|
||||||
|
$query = "INSERT INTO InscrBanque (nomBanque, idInscrit) VALUES (:nom, :idI)";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->delete('/Banque/delete/', function (Request $request, Response $response, array $args) {
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$idInscrit = $request->getParsedBody()["idInscrit"];
|
||||||
|
|
||||||
|
$query = "DELETE FROM InscrBanque WHERE nomBanque=:nom AND idInscrit=:idI";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,116 @@
|
|||||||
|
<?php
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Slim\Factory\AppFactory;
|
||||||
|
use OpenApi\Annotations as OA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Info(title="My First API", version="0.1")
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->addBodyParsingMiddleware();
|
||||||
|
$app->addRoutingMiddleware();
|
||||||
|
$app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Get(path="/api/Compte",
|
||||||
|
* @OA\Response(response="200", description="Succes")
|
||||||
|
* @OA\Response(response="500", description="Bdd Error")
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->post('/Compte/FromIdInscrit/', function(Request $request, Response $response,array $args){
|
||||||
|
$idInscrit = $request->getParsedBody()["id"];
|
||||||
|
$query = 'SELECT * FROM Compte WHERE idInscritBanque=:id';
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':id', $idInscrit, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
$compte = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($compte));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Compte/add/', function(Request $request, Response $response, array $args){
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$idInscrit = $request->getParsedBody()["idInscrit"];
|
||||||
|
|
||||||
|
$query = "INSERT INTO Compte (nom, idInscritBanque) VALUES (:nom, :idI)";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->delete('/Compte/delete/', function (Request $request, Response $response, array $args) {
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$idInscrit = $request->getParsedBody()["idInscrit"];
|
||||||
|
|
||||||
|
$query = "DELETE FROM Compte WHERE nom=:nom AND idInscritBanque=:idI";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':idI', $idInscrit, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,125 @@
|
|||||||
|
<?php
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Slim\Factory\AppFactory;
|
||||||
|
use OpenApi\Annotations as OA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Info(title="My First API", version="0.1")
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->addBodyParsingMiddleware();
|
||||||
|
$app->addRoutingMiddleware();
|
||||||
|
$app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Get(path="/api/Echeance",
|
||||||
|
* @OA\Response(response="200", description="Succes")
|
||||||
|
* @OA\Response(response="500", description="Bdd Error")
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->post('/Echeance/FromIdCompte/', function(Request $request, Response $response,array $args){
|
||||||
|
$idCompte = $request->getParsedBody()["id"];
|
||||||
|
$query = 'SELECT * FROM Echeancier WHERE compte=:id';
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($ope));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Echeance/add/', function(Request $request, Response $response, array $args){
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$montant = $request->getParsedBody()["montant"];
|
||||||
|
$dateO = $request->getParsedBody()["dateO"];
|
||||||
|
$methodePayement = $request->getParsedBody()["methodePayement"];
|
||||||
|
$isDebit = $request->getParsedBody()["isDebit"];
|
||||||
|
$tag = $request->getParsedBody()["tag"];
|
||||||
|
|
||||||
|
$query = "INSERT INTO Echeancier (compte, nom, montant, dateO, methodePayement, isDebit, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD ,:tag;";
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
|
||||||
|
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->delete('/Echeance/delete/', function (Request $request, Response $response, array $args) {
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
|
||||||
|
$query = "DELETE FROM Echeancier WHERE compte=:compte AND nom=:nom";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Slim\Factory\AppFactory;
|
||||||
|
use OpenApi\Annotations as OA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Info(title="My First API", version="0.1")
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->addBodyParsingMiddleware();
|
||||||
|
$app->addRoutingMiddleware();
|
||||||
|
$app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Get(path="/api/Operation",
|
||||||
|
* @OA\Response(response="200", description="Succes")
|
||||||
|
* @OA\Response(response="500", description="Bdd Error")
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->post('/Operation/FromIdCompte/', function(Request $request, Response $response,array $args){
|
||||||
|
$idCompte = $request->getParsedBody()["id"];
|
||||||
|
$query = 'SELECT * FROM Operation WHERE compte=:id';
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($ope));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Operation/add/', function(Request $request, Response $response, array $args){
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$montant = $request->getParsedBody()["montant"];
|
||||||
|
$dateO = $request->getParsedBody()["dateO"];
|
||||||
|
$methodePayement = $request->getParsedBody()["methodePayement"];
|
||||||
|
$isDebit = $request->getParsedBody()["isDebit"];
|
||||||
|
$tag = $request->getParsedBody()["tag"];
|
||||||
|
$fromBanque = $request->getParsedBody()["fromBanque"];
|
||||||
|
|
||||||
|
$query = "INSERT INTO Operation (compte, nom, montant, dateO, methodePayement, isDebit, fromBanque, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD, :fromBanque, :tag;";
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
|
||||||
|
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':fromBanque', $fromBanque, PDO::PARAM_BOOL);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->delete('/Operation/delete/', function (Request $request, Response $response, array $args) {
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
|
||||||
|
$query = "DELETE FROM Operation WHERE compte=:compte AND nom=:nom";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,125 @@
|
|||||||
|
<?php
|
||||||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
use Slim\Factory\AppFactory;
|
||||||
|
use OpenApi\Annotations as OA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Info(title="My First API", version="0.1")
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->addBodyParsingMiddleware();
|
||||||
|
$app->addRoutingMiddleware();
|
||||||
|
$app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @OA\Get(path="/api/Planification",
|
||||||
|
* @OA\Response(response="200", description="Succes")
|
||||||
|
* @OA\Response(response="500", description="Bdd Error")
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->post('/Planification/FromIdCompte/', function(Request $request, Response $response,array $args){
|
||||||
|
$idCompte = $request->getParsedBody()["id"];
|
||||||
|
$query = 'SELECT * FROM Planification WHERE compte=:id';
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':id', $idCompte, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
$ope = $stmt->fetchAll(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($ope));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->post('/Planification/add/', function(Request $request, Response $response, array $args){
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
$montant = $request->getParsedBody()["montant"];
|
||||||
|
$dateO = $request->getParsedBody()["dateO"];
|
||||||
|
$methodePayement = $request->getParsedBody()["methodePayement"];
|
||||||
|
$isDebit = $request->getParsedBody()["isDebit"];
|
||||||
|
$tag = $request->getParsedBody()["tag"];
|
||||||
|
|
||||||
|
$query = "INSERT INTO Planification (compte, nom, montant, dateO, methodePayement, isDebit, tag) SELECT :compte,:nom,:montant, STR_TO_DATE(:dateO, '%d/%m/%Y %H:%i:%s' ), :methodePayement, :isD ,:tag;";
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':montant', $montant, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':dateO', $dateO, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':methodePayement', $methodePayement, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':isD', $isDebit, PDO::PARAM_BOOL);
|
||||||
|
$stmt->bindValue(':tag', $tag, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->delete('/Planification/delete/', function (Request $request, Response $response, array $args) {
|
||||||
|
$compte = $request->getParsedBody()["compte"];
|
||||||
|
$nom = $request->getParsedBody()["nom"];
|
||||||
|
|
||||||
|
$query = "DELETE FROM Planification WHERE compte=:compte AND nom=:nom";
|
||||||
|
|
||||||
|
try{
|
||||||
|
$db = new Database();
|
||||||
|
$conn = $db->connect();
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bindValue(':compte', $compte, PDO::PARAM_STR);
|
||||||
|
$stmt->bindValue(':nom', $nom, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$result = $stmt->execute();
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
$response->getBody()->write(json_encode($result));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(200);
|
||||||
|
|
||||||
|
} catch(PDOException $e){
|
||||||
|
$error = array("message" => $e->getMessage());
|
||||||
|
|
||||||
|
$response->getBody()->write(json_encode($error));
|
||||||
|
return $response
|
||||||
|
->withHeader('content-type', 'application/json')
|
||||||
|
->withStatus(500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,42 @@
|
|||||||
|
INSERT INTO Devise VALUES('EUR','EURO');
|
||||||
|
INSERT INTO Devise VALUES('USD','DOLLAR');
|
||||||
|
INSERT INTO Devise VALUES('GBP','Livre Sterling');
|
||||||
|
INSERT INTO Devise VALUES('JPY','YEN');
|
||||||
|
INSERT INTO Devise VALUES('AUD','DOLLAR AUSTRALIEN');
|
||||||
|
INSERT INTO Devise VALUES('NZD','DOLLAR NEO-ZELANDAIS');
|
||||||
|
INSERT INTO Devise VALUES('ZAR','RANd');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('EVARD','LUCAS','lucasevard@gmail.com','Azerty12345678!');
|
||||||
|
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MONCUL','STEPHANE','stef@gmail.com','Azerty12345678!');
|
||||||
|
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MENFOUMETTOITOUTNU','RENAUD','renaudtoutnu@gmail.com','Azerty12345678!');
|
||||||
|
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('YOUVOI','BENJAMIN','BENJAMIN@gmail.com','Azerty12345678!');
|
||||||
|
INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('TUBEAU','RAOUL','raoullacouille@gmail.com','Azerty12345678!');
|
||||||
|
|
||||||
|
INSERT INTO DeviseInscrit VALUES('EUR','1');
|
||||||
|
INSERT INTO DeviseInscrit VALUES('JPY','2');
|
||||||
|
INSERT INTO DeviseInscrit VALUES('USD','3');
|
||||||
|
INSERT INTO DeviseInscrit VALUES('NZD','4');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BNP PARIBAS','mabanque','imagesitebnb.fr');
|
||||||
|
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CREDIT AGRICOLE','credit-agricole.fr','imageca');
|
||||||
|
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BANQUE POSTALE','labanquepostale.fr','imgbp');
|
||||||
|
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CAISSE D EPARGNE','caisse-epargne.fr','imgcaissedepargne');
|
||||||
|
INSERT INtO Banque(nom,urlsite,urllogo) VALUES('ORANGE BANK','orange.fr','cpt');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BNP PARIBAS','1');
|
||||||
|
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CREDIT AGRICOLE','2');
|
||||||
|
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BANQUE POSTALE','3');
|
||||||
|
INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CAISSE D EPARGNE','4');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','1');
|
||||||
|
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','2');
|
||||||
|
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','3');
|
||||||
|
INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','4');
|
||||||
|
|
||||||
|
INSERT INTO `Operation` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `fromBanque`, `tag`) VALUES (NULL, '1', 'JSP MAIS JAI PAYER', '500', '2023-01-02', 'Vir', '1', '1', 'Divers')
|
||||||
|
INSERT INTO `Planification` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `tag`) VALUES (NULL, '1', 'FAUT QUE JE PAYE', '100', '2023-01-30', 'Vir', '1', 'Energie');
|
||||||
|
INSERT INTO `Echeancier` (`id`, `compte`, `nom`, `montant`, `dateO`, `methodePayement`, `isDebit`, `tag`) VALUES (NULL, '1', 'FAUT PAYER VITEEEE', '50', '2023-01-06', 'Vir', '1', 'Divers');
|
@ -0,0 +1,106 @@
|
|||||||
|
DROP TABLE if exists Planification;
|
||||||
|
DROP TABLE if exists Operation;
|
||||||
|
DROP TABLE if exists Echeancier;
|
||||||
|
DROP TABLE if exists Compte;
|
||||||
|
DROP TABLE if exists InscrBanque;
|
||||||
|
DROP TABLE if exists Banque;
|
||||||
|
DROP TABLE if exists DeviseInscrit;
|
||||||
|
DROP TABLE if exists Inscrit;
|
||||||
|
DROP TABLE if exists Devise;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE Devise
|
||||||
|
(
|
||||||
|
id char(3) PRIMARY KEY,
|
||||||
|
nom varchar(20)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Inscrit
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
nom varchar(40),
|
||||||
|
prenom varchar(40),
|
||||||
|
mail varchar(40) UNIQUE,
|
||||||
|
mdp varchar(200)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE DeviseInscrit
|
||||||
|
(
|
||||||
|
devise char(3),
|
||||||
|
idInscrit MEDIUMINT UNIQUE,
|
||||||
|
PRIMARY KEY(devise,idInscrit),
|
||||||
|
FOREIGN KEY (devise) REFERENCES Devise(id),
|
||||||
|
FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Banque
|
||||||
|
(
|
||||||
|
nom varchar(40) PRIMARY KEY,
|
||||||
|
urlsite varchar(60),
|
||||||
|
urllogo longblob
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE InscrBanque
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
nomBanque varchar(40),
|
||||||
|
idInscrit MEDIUMINT,
|
||||||
|
UNIQUE(nomBanque,idInscrit),
|
||||||
|
FOREIGN KEY (nomBanque) REFERENCES Banque(nom),
|
||||||
|
FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Compte
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
nom varchar(40),
|
||||||
|
idInscritBanque MEDIUMINT,
|
||||||
|
FOREIGN KEY (idInscritBanque) REFERENCES InscrBanque(id),
|
||||||
|
UNIQUE(idInscritBanque,nom)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Echeancier
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
compte MEDIUMINT,
|
||||||
|
nom varchar(40),
|
||||||
|
montant numeric,
|
||||||
|
dateO date,
|
||||||
|
methodePayement varchar(20),
|
||||||
|
isDebit boolean,
|
||||||
|
tag varchar(30),
|
||||||
|
CONSTRAINT ck_methEch CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
|
||||||
|
CONSTRAINT ck_tagEch CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
|
||||||
|
FOREIGN KEY(compte) REFERENCES Compte(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Operation
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
compte MEDIUMINT,
|
||||||
|
nom varchar(40),
|
||||||
|
montant numeric,
|
||||||
|
dateO date,
|
||||||
|
methodePayement varchar(20),
|
||||||
|
isDebit boolean,
|
||||||
|
fromBanque boolean,
|
||||||
|
tag varchar(30),
|
||||||
|
CONSTRAINT ck_methOpe CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
|
||||||
|
CONSTRAINT ck_tagOpe CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
|
||||||
|
FOREIGN KEY(compte) REFERENCES Compte(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE Planification
|
||||||
|
(
|
||||||
|
id MEDIUMINT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
compte MEDIUMINT,
|
||||||
|
nom varchar(40),
|
||||||
|
montant numeric,
|
||||||
|
dateO date,
|
||||||
|
methodePayement varchar(20),
|
||||||
|
isDebit boolean,
|
||||||
|
tag varchar(30),
|
||||||
|
CONSTRAINT ck_methPla CHECK (methodePayement IN ('None','CB','Espece','Cheque','Virement', 'Prevelement')),
|
||||||
|
CONSTRAINT ck_tagPla CHECK (tag IN ('Alimentaire','Carburant','Habitation','Energie','Telephonie','Loisir','Restauration','Divers','Transport','Transaction','Santé')),
|
||||||
|
FOREIGN KEY(compte) REFERENCES Compte(id)
|
||||||
|
);
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Composant.BanqueDispo">
|
||||||
|
|
||||||
|
<Border StrokeShape="RoundRectangle 20" BackgroundColor="{StaticResource Tertiary}" Padding="20">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Image Source="{Binding ImageBanque}"/>
|
||||||
|
<Button Text="CHOISIR" Clicked="Banque_Clicked"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</Border>
|
||||||
|
</ViewCell>
|
@ -0,0 +1,23 @@
|
|||||||
|
namespace IHM.Composant;
|
||||||
|
|
||||||
|
public partial class BanqueDispo : ViewCell
|
||||||
|
{
|
||||||
|
public BanqueDispo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly BindableProperty ImageBanqueProperty =
|
||||||
|
BindableProperty.Create("ImageBanque", typeof(string), typeof(BanqueDispo), "");
|
||||||
|
|
||||||
|
public string ImageBanque
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(ImageBanqueProperty); }
|
||||||
|
set { SetValue(ImageBanqueProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Banque_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Composant.BanqueVC"
|
||||||
|
x:Name="root">
|
||||||
|
|
||||||
|
<FlexLayout Direction="Row" AlignItems="Center" JustifyContent="SpaceAround">
|
||||||
|
|
||||||
|
<Label Text="{Binding NomBanque}" FontAttributes="Bold" FontSize="Body"/>
|
||||||
|
<Label Text="{Binding DateLastReload}" FontAttributes="Italic" FontSize="Body"/>
|
||||||
|
<ImageButton Source="reload_banks.png"
|
||||||
|
Padding="10" Margin="10"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="MaBanque_Clicked"/>
|
||||||
|
|
||||||
|
</FlexLayout>
|
||||||
|
</ViewCell>
|
@ -0,0 +1,32 @@
|
|||||||
|
namespace IHM.Composant;
|
||||||
|
|
||||||
|
public partial class BanqueVC : ViewCell
|
||||||
|
{
|
||||||
|
public BanqueVC()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly BindableProperty NomBanqueProperty =
|
||||||
|
BindableProperty.Create("NomBanque", typeof(string), typeof(BanqueVC), "");
|
||||||
|
|
||||||
|
public string NomBanque
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(NomBanqueProperty); }
|
||||||
|
set { SetValue(NomBanqueProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly BindableProperty DateLastReloadProperty =
|
||||||
|
BindableProperty.Create("DateLastReload", typeof(string), typeof(BanqueVC), "");
|
||||||
|
|
||||||
|
public string DateLastReload
|
||||||
|
{
|
||||||
|
get { return (string)GetValue(DateLastReloadProperty); }
|
||||||
|
set { SetValue(DateLastReloadProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MaBanque_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ViewCell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Composant.VC_Operation_Dashboard">
|
||||||
|
<StackLayout Orientation="Vertical">
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout Orientation="Horizontal">
|
||||||
|
<Label>Nom de l'opération</Label>
|
||||||
|
<Label>Date de l'opération</Label>
|
||||||
|
<Label>Type d'opération</Label>
|
||||||
|
</StackLayout>
|
||||||
|
</StackLayout>
|
||||||
|
</ViewCell>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace IHM.Composant;
|
||||||
|
|
||||||
|
public partial class VC_Operation_Dashboard : ViewCell
|
||||||
|
{
|
||||||
|
public VC_Operation_Dashboard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_AddPlanification">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Planification d'une échéance" Grid.Column="0" HorizontalOptions="Center" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
|
||||||
|
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
|
||||||
|
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
|
||||||
|
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
|
||||||
|
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,58 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_AddPlanification : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_AddPlanification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string nom = name.Text;
|
||||||
|
double Montant = Double.Parse(montant.Text);
|
||||||
|
string Type = type.Text;
|
||||||
|
string Tag = tag.Text;
|
||||||
|
DateTime Date = date.Date;
|
||||||
|
TagOperation to2 = new TagOperation();
|
||||||
|
MethodePayement mp2 = new MethodePayement();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
|
||||||
|
{
|
||||||
|
if (Equals(Type, mp))
|
||||||
|
{
|
||||||
|
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (string to in Enum.GetNames(typeof(TagOperation)))
|
||||||
|
{
|
||||||
|
if (Equals(Tag, to))
|
||||||
|
{
|
||||||
|
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Model.Planification planification = new(nom, Montant, Date, mp2, to2,false);
|
||||||
|
|
||||||
|
Mgr.ajouterPlanification(Mgr.SelectedCompte, planification);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
|
||||||
|
x:Class="IHM.Desktop.CV_DeletePlanification">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Text="Supprimer une planification" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Selectionner la planification" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesPla}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,29 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_DeletePlanification : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_DeletePlanification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var s = recup.SelectedItem;
|
||||||
|
Model.Planification planification = (Model.Planification)s;
|
||||||
|
Mgr.supprimerPlanification(Mgr.SelectedCompte, planification);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
|
||||||
|
x:Class="IHM.Desktop.CV_EnregistrerEcheance">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Text="Enregistrer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_EnregistrerEcheance : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_EnregistrerEcheance()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var s = recup.SelectedItem;
|
||||||
|
Echeance ech = (Echeance)s;
|
||||||
|
Operation operation = new Operation(ech.Nom, ech.Montant, ech.DateOperation, ech.ModePayement,ech.Tag,ech.IsDebit);
|
||||||
|
|
||||||
|
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
|
||||||
|
Mgr.supprimerEcheance(Mgr.SelectedCompte, ech);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_HomePage">
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.25*"/>
|
||||||
|
<RowDefinition Height="0.25*"/>
|
||||||
|
<RowDefinition Height="0.1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
|
|
||||||
|
Text="BANQUE"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<HorizontalStackLayout Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" >
|
||||||
|
<Picker Title="Choisir une Banque"
|
||||||
|
TitleColor="Black"
|
||||||
|
TextColor="Black"
|
||||||
|
ItemsSource="{Binding ListeDesBanques}"
|
||||||
|
ItemDisplayBinding="{Binding Name}"
|
||||||
|
SelectedItem="{Binding SelectedBanque}"
|
||||||
|
Margin="0,0,30,0"/>
|
||||||
|
<Picker Title="Choisir un Compte"
|
||||||
|
ItemsSource="{Binding ListeDesComptes}"
|
||||||
|
ItemDisplayBinding="{Binding Nom}"
|
||||||
|
SelectedItem="{Binding SelectedCompte}"
|
||||||
|
Margin="30,0,0,0"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Text="Réactualiser mes banques :"
|
||||||
|
FontSize="20"
|
||||||
|
TextColor="Black"/>
|
||||||
|
<ContentView Grid.Row="3" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" >
|
||||||
|
<CollectionView Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" ItemsSource="{Binding ListeDesBanques}" >
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Name}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
TextColor="Black"/>
|
||||||
|
|
||||||
|
<ImageButton Grid.Column="2" Source="reload_banks.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="45"
|
||||||
|
BackgroundColor="{StaticResource Primary}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
<Label Grid.Row="4" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Text="Ajouter une banque :"
|
||||||
|
FontSize="20"
|
||||||
|
TextColor="Black"/>
|
||||||
|
|
||||||
|
<ScrollView Grid.Row="5" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Scale="0.8">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
|
||||||
|
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
|
||||||
|
BackgroundColor="{StaticResource Tertiary}"
|
||||||
|
StrokeShape="RoundRectangle 20" Margin="10">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="Importer depuis un fichier" TextColor="Black"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
<ImageButton Grid.Column="2" Source="import_from_file.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="ImportOFX_Clicked"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<CollectionView ItemsSource="{Binding BanquesDisponibleInApp}">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Nom}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
TextColor="Black"/>
|
||||||
|
<ImageButton Grid.Column="2" Source="add_new_banks.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="AddBanque_Clicked"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ContentView>
|
@ -0,0 +1,30 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_HomePage : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_HomePage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
Mgr.LoadBanqueDispo();
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImportOFX_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddBanque_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_Log">
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Gray100}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Yellow100Accent}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="GESTION DU COMPTE"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Nom" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
|
||||||
|
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="2" Style="{StaticResource TitreWindows}" Text="{Binding Nom}"/>
|
||||||
|
|
||||||
|
<Label Text="Prenom" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
|
||||||
|
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="3" Style="{StaticResource TitreWindows}" Text="{Binding Prenom}"/>
|
||||||
|
|
||||||
|
<Label Text="Email" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Style="{StaticResource TitreWindows}"/>
|
||||||
|
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="4" Style="{StaticResource TitreWindows}" Text="{Binding Mail}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="QUITTER" Clicked="Button_Quitter" Grid.Column="6" Grid.Row="0" Margin="25" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ContentView>
|
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_Log : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_Log()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
BindingContext = Mgr.User;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Quitter(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Microsoft.Maui.Controls.Application.Current?.CloseWindow(Microsoft.Maui.Controls.Application.Current.MainPage.Window);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_Planification">
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="PLANIFICATION"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="Button_Clicked"
|
||||||
|
Grid.Column="0" Grid.Row="1"
|
||||||
|
x:Name="AddCredit"
|
||||||
|
Text="Planifier une échéance"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="Button_Clicked_1"
|
||||||
|
Grid.Column="1" Grid.Row="1"
|
||||||
|
x:Name="RetireOperation"
|
||||||
|
Text="Supprimer une planification"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
|
||||||
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10,0,10,0">
|
||||||
|
|
||||||
|
<CollectionView ItemsSource="{Binding SelectedCompte.LesPla }" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
|
||||||
|
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Nom}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="2" Text="{Binding ModePayement}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="3" Text="{Binding Tag}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="4" Text="{Binding Montant}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="5" x:Name="windowAjout" Margin="10,0,10,0">
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="6*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,34 @@
|
|||||||
|
using Microsoft.Maui.Controls.Internals;
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_Planification : ContentView
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public CV_Planification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void Button_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_AddPlanification();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_DeletePlanification();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,150 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
|
||||||
|
xmlns:model="clr-namespace:IHM.Desktop"
|
||||||
|
x:Class="IHM.Desktop.CV_Statistiques">
|
||||||
|
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="STATISTIQUES"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="15" x:Name="windowAjout">
|
||||||
|
<Grid >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- <Switch IsToggled="true" Grid.Column="1" OnColor="{StaticResource Primary}" ThumbColor="{StaticResource Secondary}" Scale="1.5" /> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<chart:SfCartesianChart Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="5" Margin="50,0,0,0">
|
||||||
|
|
||||||
|
<chart:ColumnSeries
|
||||||
|
Label="Dépense en €"
|
||||||
|
ItemsSource="{Binding SelectedCompte.LesEch} "
|
||||||
|
XBindingPath="Tag"
|
||||||
|
YBindingPath="Montant"
|
||||||
|
ShowDataLabels="True"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<chart:ColumnSeries.DataLabelSettings>
|
||||||
|
<chart:CartesianDataLabelSettings LabelPlacement="Inner"/>
|
||||||
|
</chart:ColumnSeries.DataLabelSettings>
|
||||||
|
|
||||||
|
</chart:ColumnSeries>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<chart:SfCartesianChart.Title Grid.Column="4">
|
||||||
|
<Label Text="Consommation par type" TextColor="{StaticResource Secondary}" FontSize="Large" FontAttributes="Bold"/>
|
||||||
|
</chart:SfCartesianChart.Title>
|
||||||
|
|
||||||
|
<chart:SfCartesianChart.Legend>
|
||||||
|
<chart:ChartLegend/>
|
||||||
|
</chart:SfCartesianChart.Legend>
|
||||||
|
|
||||||
|
<chart:SfCartesianChart.XAxes>
|
||||||
|
<chart:CategoryAxis>
|
||||||
|
<chart:CategoryAxis.Title>
|
||||||
|
<chart:ChartAxisTitle Text="Tag"/>
|
||||||
|
</chart:CategoryAxis.Title>
|
||||||
|
</chart:CategoryAxis>
|
||||||
|
</chart:SfCartesianChart.XAxes>
|
||||||
|
|
||||||
|
<chart:SfCartesianChart.YAxes>
|
||||||
|
<chart:NumericalAxis>
|
||||||
|
<chart:NumericalAxis.Title>
|
||||||
|
<chart:ChartAxisTitle Text="Montant"/>
|
||||||
|
</chart:NumericalAxis.Title>
|
||||||
|
</chart:NumericalAxis>
|
||||||
|
</chart:SfCartesianChart.YAxes>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</chart:SfCartesianChart>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<chart:SfCircularChart Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="5">
|
||||||
|
<chart:SfCircularChart.Title>
|
||||||
|
<Label Text="Nombre d'achat par type" TextColor="{StaticResource Secondary}" Grid.Column="4" FontSize="Large" FontAttributes="Bold"/>
|
||||||
|
</chart:SfCircularChart.Title>
|
||||||
|
<chart:PieSeries ItemsSource="{Binding SelectedCompte.LesOpe}"
|
||||||
|
XBindingPath="Montant"
|
||||||
|
YBindingPath="Tag"
|
||||||
|
Radius = "1"
|
||||||
|
ShowDataLabels="True"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<chart:SfCircularChart.Legend>
|
||||||
|
<chart:ChartLegend/>
|
||||||
|
</chart:SfCircularChart.Legend>
|
||||||
|
</chart:SfCircularChart>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,16 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
public partial class CV_Statistiques : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_Statistiques()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
|
||||||
|
x:Class="IHM.Desktop.CV_SupprimerEcheance">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Text="Supprimer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_SupprimerEcheance : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public CV_SupprimerEcheance()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var s = recup.SelectedItem;
|
||||||
|
Echeance echeance = (Echeance)s;
|
||||||
|
Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_credit">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Effectuer un crédit" VerticalOptions="Center" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}"/>
|
||||||
|
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
|
||||||
|
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
|
||||||
|
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
|
||||||
|
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
|
||||||
|
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_credit : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_credit()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string nom = name.Text;
|
||||||
|
double Montant = Double.Parse(montant.Text);
|
||||||
|
string Type = type.Text;
|
||||||
|
string Tag = tag.Text;
|
||||||
|
DateTime Date = date.Date;
|
||||||
|
TagOperation to2 = new TagOperation();
|
||||||
|
MethodePayement mp2 = new MethodePayement();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
|
||||||
|
{
|
||||||
|
if (Equals(Type, mp))
|
||||||
|
{
|
||||||
|
mp2 = (MethodePayement) Enum.Parse(typeof(MethodePayement), Type);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (string to in Enum.GetNames(typeof(TagOperation)))
|
||||||
|
{
|
||||||
|
if (Equals(Tag, to))
|
||||||
|
{
|
||||||
|
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ;
|
||||||
|
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
|
||||||
|
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_debit">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Effectuer un débit" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center" />
|
||||||
|
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
|
||||||
|
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
|
||||||
|
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
|
||||||
|
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
|
||||||
|
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,56 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_debit : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_debit()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string nom = name.Text;
|
||||||
|
double Montant = Double.Parse(montant.Text);
|
||||||
|
string Type = type.Text;
|
||||||
|
string Tag = tag.Text;
|
||||||
|
DateTime Date = date.Date;
|
||||||
|
TagOperation to2 = new TagOperation();
|
||||||
|
MethodePayement mp2 = new MethodePayement();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
|
||||||
|
{
|
||||||
|
if (Equals(Type, mp))
|
||||||
|
{
|
||||||
|
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (string to in Enum.GetNames(typeof(TagOperation)))
|
||||||
|
{
|
||||||
|
if (Equals(Tag, to))
|
||||||
|
{
|
||||||
|
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, true);
|
||||||
|
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.CV_modificationSolde">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,19 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_modificationSolde : ContentView
|
||||||
|
{
|
||||||
|
public CV_modificationSolde()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Clicked_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public class CV_retirer : ContentView
|
||||||
|
{
|
||||||
|
public CV_retirer()
|
||||||
|
{
|
||||||
|
Content = new VerticalStackLayout
|
||||||
|
{
|
||||||
|
Children = {
|
||||||
|
new Label { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, Text = "Welcome to .NET MAUI!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
|
||||||
|
x:Class="IHM.Desktop.CV_retirer">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Retirer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,30 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_retirer : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_retirer()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var s = recup.SelectedItem;
|
||||||
|
Operation operation = (Operation)s;
|
||||||
|
Mgr.supprimerOperation(Mgr.SelectedCompte, operation);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:inputs="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
|
||||||
|
x:Class="IHM.Desktop.CV_supprimerOp">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Text="Supprimer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
|
||||||
|
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,29 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class CV_supprimerOp : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public CV_supprimerOp()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Annuler(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Valider(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var s = recup.SelectedItem;
|
||||||
|
Operation operation = (Operation)s;
|
||||||
|
Mgr.supprimerOperation(Mgr.SelectedCompte,operation);
|
||||||
|
Navigation.PushAsync(new Dashboard());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.ChangePassword"
|
||||||
|
Title="ChangePassword"
|
||||||
|
BackgroundColor="{StaticResource Primary}">
|
||||||
|
<VerticalStackLayout VerticalOptions="CenterAndExpand">
|
||||||
|
<Label
|
||||||
|
Text="Changer votre mot de passe"
|
||||||
|
VerticalOptions="Fill"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
FontSize="20"
|
||||||
|
Margin="20"/>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="Nouveau mot de passe"
|
||||||
|
x:Name="EntryNewMdp"
|
||||||
|
IsPassword="True"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40,0,40,40">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="Confirmer mot de passe"
|
||||||
|
x:Name="EntryNewMdpConfirmation"
|
||||||
|
IsPassword="True"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Button VerticalOptions="End"
|
||||||
|
x:Name="ValidationButton"
|
||||||
|
Text="valider"
|
||||||
|
Clicked="ValidationButton_Clicked"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,45 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class ChangePassword : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
private string MailUser;
|
||||||
|
public ChangePassword(string mailUser)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
MailUser = mailUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidationButton_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (EntryNewMdp.Text == null || EntryNewMdpConfirmation.Text == null)
|
||||||
|
{
|
||||||
|
AffichError("Champ non valide", "Veuillez remplir tout les champs", "OK");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!EntryNewMdp.Text.Equals(EntryNewMdpConfirmation.Text))
|
||||||
|
{
|
||||||
|
AffichError("mot de passe non identique", "veuillez entrer des mots de passe identique", "OK");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Mgr.changePasswordBdd(MailUser, EntryNewMdp.Text);
|
||||||
|
AffichError("mdp changé", "mot de passe bien changé", "ok");
|
||||||
|
NavigateTo("../..");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void NavigateTo(string path)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void AffichError(string s, string s1, string s2)
|
||||||
|
{
|
||||||
|
await DisplayAlert(s, s1, s2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Compte">
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}" >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="COMPTE"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="AddCredit_Clicked"
|
||||||
|
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"
|
||||||
|
x:Name="AddCredit"
|
||||||
|
Text="Modifier le solde"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" >
|
||||||
|
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding SelectedCompte.Nom}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Large"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="1" Text="{Binding SelectedCompte.Solde}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Large"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="1" Text="€"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Large"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
Margin="120,0,0,0"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="4" x:Name="windowAjout">
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ContentView>
|
@ -0,0 +1,27 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Compte : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Compte()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddCredit_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_modificationSolde();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Dashboard"
|
||||||
|
Title="Dashboard">
|
||||||
|
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Secondary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.3*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<Image Source="logo_sans_fond.png" HeightRequest="80" HorizontalOptions="Center" Margin="0,30,0,0" Grid.Column="0" Grid.Row="0"/>
|
||||||
|
|
||||||
|
<Button Text="Mon Compte" ImageSource="logo_sans_fond.png" x:Name="ButLog" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" Clicked="ButLog_Clicked" Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Text="BANQUE" ImageSource="banque_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" x:Name="ButAcc" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="1" Clicked="ButAcc_Clicked" ></Button>
|
||||||
|
<Button Text="COMPTE" x:Name="ButCom" ImageSource="cb_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="2" Clicked="Button_compte"></Button>
|
||||||
|
<Button Text="OPERATION" x:Name="ButOpe" ImageSource="dollar_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="3" Clicked="Button_operation"></Button>
|
||||||
|
<Button Text="ECHEANCIER" x:Name="ButEch" ImageSource="date_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="4" Clicked="Button_echeancier"></Button>
|
||||||
|
<Button Text="PLANIFICATION" x:Name="ButPla" ImageSource="planification_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="5" Clicked="Button_planification"></Button>
|
||||||
|
<Button Text="STATISTIQUES" x:Name="ButSta" ImageSource="stats_black.png" MaximumWidthRequest="200" MaximumHeightRequest="62" BackgroundColor="{StaticResource Gray100}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21,30,21,0" Grid.Column="0" Grid.Row="6" Clicked="Button_statistiques"></Button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="6" x:Name="mainCV">
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10,0,10,10" StrokeShape="RoundRectangle 5,5,5,5">
|
||||||
|
<Image Source="background3.png" Aspect="Fill"/>
|
||||||
|
</Border>
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,88 @@
|
|||||||
|
using Microsoft.Maui.Graphics.Text;
|
||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Dashboard
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public Dashboard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
BindingContext = Mgr.User;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RetourFormeBase()
|
||||||
|
{
|
||||||
|
ButPla.BackgroundColor = Color.FromArgb("E1E1E1"); ButPla.TextColor = Colors.Black;
|
||||||
|
ButEch.BackgroundColor = Color.FromArgb("E1E1E1"); ButEch.TextColor = Colors.Black;
|
||||||
|
ButOpe.BackgroundColor = Color.FromArgb("E1E1E1"); ButOpe.TextColor = Colors.Black;
|
||||||
|
ButCom.BackgroundColor = Color.FromArgb("E1E1E1"); ButCom.TextColor = Colors.Black;
|
||||||
|
ButAcc.BackgroundColor = Color.FromArgb("E1E1E1"); ButAcc.TextColor = Colors.Black;
|
||||||
|
ButSta.BackgroundColor = Color.FromArgb("E1E1E1"); ButSta.TextColor = Colors.Black;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_planification(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButPla.TextColor = Colors.White;
|
||||||
|
ButPla.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content= new CV_Planification();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_echeancier(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButEch.TextColor = Colors.White;
|
||||||
|
ButEch.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new Echeancier();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_operation(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButOpe.TextColor = Colors.White;
|
||||||
|
ButOpe.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new Operations();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_compte(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButCom.TextColor = Colors.White;
|
||||||
|
ButCom.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new Compte();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_statistiques(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButSta.TextColor = Colors.White;
|
||||||
|
ButSta.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new CV_Statistiques();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButAcc_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButAcc.TextColor = Colors.White;
|
||||||
|
ButAcc.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new CV_HomePage();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButLog_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RetourFormeBase();
|
||||||
|
ButLog.TextColor = Colors.White;
|
||||||
|
ButLog.BackgroundColor = Color.FromArgb("7FB196");
|
||||||
|
mainCV.Content = new CV_Log();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,197 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Echeancier"
|
||||||
|
>
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="ECHEANCIER"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="SaveEcheance_Clicked"
|
||||||
|
Grid.Column="0" Grid.Row="1"
|
||||||
|
x:Name="SaveEcheance"
|
||||||
|
Text="Enregistrer une échéance"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="DelEcheance_Clicked"
|
||||||
|
Grid.Column="1" Grid.Row="1"
|
||||||
|
x:Name="DelEcheance"
|
||||||
|
Text="Supprimer une échéance"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="5" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" >
|
||||||
|
|
||||||
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10,0,10,0">
|
||||||
|
|
||||||
|
<CollectionView ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
|
||||||
|
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Nom}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="2" Text="{Binding ModePayement}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="3" Text="{Binding Tag}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="4" Text="{Binding Montant}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding LesOpe}">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Padding="10">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
|
Source="{Binding ImageSrc}"
|
||||||
|
CornerRadius="10"/>
|
||||||
|
<Label Grid.Row="0" Grid.Column="1"
|
||||||
|
Text="{Binding NomOpe}"
|
||||||
|
FontAttributes="Bold" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="1"
|
||||||
|
Text="{Binding DetailTypeOpe}"
|
||||||
|
FontAttributes="Italic"/>
|
||||||
|
<Label Grid.Row="0" Grid.Column="2"
|
||||||
|
Text="{Binding DateOpe}"/>
|
||||||
|
<Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2"
|
||||||
|
Text="{Binding MontantOpe}"
|
||||||
|
FontAttributes="Bold"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
|
||||||
|
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="5" x:Name="windowAjout">
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="6*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,28 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Echeancier : ContentView
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Echeancier()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveEcheance_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_EnregistrerEcheance();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DelEcheance_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_SupprimerEcheance();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.ForgetPassword"
|
||||||
|
Title="ForgetPassword"
|
||||||
|
BackgroundColor="{StaticResource Primary}">
|
||||||
|
|
||||||
|
<VerticalStackLayout Margin="20" Padding="30" VerticalOptions="CenterAndExpand">
|
||||||
|
<Label
|
||||||
|
Text="Rentrez votre adresse email :"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}">
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="Email"
|
||||||
|
x:Name="EntryMail"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="ConnexionButton"
|
||||||
|
Text="valider Email"
|
||||||
|
Clicked="SearchEmail"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<VerticalStackLayout x:Name="ValidateReceptCode" IsVisible="false" Margin="20" VerticalOptions="End">
|
||||||
|
|
||||||
|
<Label Text="Veuillez rentrer le code à 6 chiffres reçus par mail"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
<Border Style="{StaticResource bordureBlanche}" Padding="7" Margin="40" >
|
||||||
|
<Entry Style="{StaticResource zoneDeTexte}"
|
||||||
|
Placeholder="6 Chiffres"
|
||||||
|
Keyboard="Numeric"
|
||||||
|
x:Name="EntryCodeRecept"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="ValidationButton"
|
||||||
|
Text="valider"
|
||||||
|
Clicked="ValideCode"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,68 @@
|
|||||||
|
using Model;
|
||||||
|
using Email = Model.Email;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class ForgetPassword : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
private string code;
|
||||||
|
//private DateTime _startTime;
|
||||||
|
//private CancellationTokenSource _cancellationTokenSource;
|
||||||
|
|
||||||
|
public ForgetPassword()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
public void SearchEmail(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (EntryMail.Text == null)
|
||||||
|
{
|
||||||
|
AffichError("Email inconnue", "Aucun compte existant portant cette adresse mail", "OK");
|
||||||
|
}
|
||||||
|
/*if (Mgr.existEmail(EntryMail.Text))
|
||||||
|
{
|
||||||
|
Random generator = new Random();
|
||||||
|
code = generator.Next(0, 1000000).ToString("D6");
|
||||||
|
Email.CreateMail(EntryMail.Text, code);
|
||||||
|
ValidateReceptCode.IsVisible = true;
|
||||||
|
ConnexionButton.IsEnabled = false;
|
||||||
|
UpdateArc();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
private async void AffichError(string s, string s1, string s2)
|
||||||
|
{
|
||||||
|
await DisplayAlert(s, s1, s2);
|
||||||
|
}
|
||||||
|
private async void UpdateArc()
|
||||||
|
{
|
||||||
|
int timeRemaining = 60;
|
||||||
|
while (timeRemaining != 0)
|
||||||
|
{
|
||||||
|
ConnexionButton.Text = $"{timeRemaining}";
|
||||||
|
|
||||||
|
timeRemaining--;
|
||||||
|
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConnexionButton.Text = "valider Email";
|
||||||
|
ConnexionButton.IsEnabled = true;
|
||||||
|
}
|
||||||
|
private void ValideCode(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (EntryCodeRecept.Text == code)
|
||||||
|
{
|
||||||
|
NavigateTo();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AffichError("Code non identique", "Veuillez entrer le même code que celui reçu par mail", "OK");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void NavigateTo()
|
||||||
|
{
|
||||||
|
await Navigation.PushModalAsync(new ChangePassword(EntryMail.Text));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Inscription"
|
||||||
|
Title="Inscription">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label
|
||||||
|
Text="Welcome to .NET MAUI!"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Inscription : ContentPage
|
||||||
|
{
|
||||||
|
public Inscription()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,165 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Operations">
|
||||||
|
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Yellow100Accent}" StrokeThickness="4" Margin="10" StrokeShape="RoundRectangle 45,5,5,45">
|
||||||
|
|
||||||
|
<Grid BackgroundColor="{StaticResource Tertiary}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="5*"/>
|
||||||
|
<RowDefinition Height="0.7*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
|
||||||
|
Style="{StaticResource TitreWindows}"
|
||||||
|
Text="OPERATIONS"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="AddCredit_Clicked"
|
||||||
|
Grid.Column="0" Grid.Row="1"
|
||||||
|
x:Name="AddCredit"
|
||||||
|
Text="Effectuer un crédit"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="RetireOperation_Clicked"
|
||||||
|
Grid.Column="1" Grid.Row="1"
|
||||||
|
x:Name="RetireOperation"
|
||||||
|
Text="Retirer une opération"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="AddDebit_Clicked"
|
||||||
|
Grid.Column="2" Grid.Row="1"
|
||||||
|
x:Name="AddDebit"
|
||||||
|
Text="Effectuer un débit"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Clicked="DelOperation_Clicked"
|
||||||
|
Grid.Column="3" Grid.Row="1"
|
||||||
|
x:Name="DelOperation"
|
||||||
|
Text="Supprimer une opération"
|
||||||
|
Style="{StaticResource WindowsButton}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
|
||||||
|
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="1" Margin="10,0,10,0" >
|
||||||
|
|
||||||
|
<CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
|
||||||
|
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Nom}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="1" Text="{Binding DateOperation, StringFormat='{0:d}'}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="2" Text="{Binding ModePayement}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
<Label Grid.Column="3" Text="{Binding Tag}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Label Grid.Column="4" Text="{Binding Montant}"
|
||||||
|
TextColor="{StaticResource Secondary}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" Grid.RowSpan="5" x:Name="windowAjout">
|
||||||
|
|
||||||
|
</ContentView>
|
||||||
|
|
||||||
|
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="6*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ContentView>
|
@ -0,0 +1,40 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Operations : ContentView
|
||||||
|
{
|
||||||
|
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Operations()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddCredit_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_credit();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RetireOperation_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_retirer();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddDebit_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_debit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DelOperation_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
windowAjout.Content = new CV_supprimerOp();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Desktop.Planification"
|
||||||
|
Title="Planification">
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Yellow300Accent}" >
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
<Image Source="logo_sans_fond.png" HeightRequest="100" Margin="50,10,0,0" Grid.Column="0" Grid.Row="0"/>
|
||||||
|
<Button Text="Mon compte" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Grid.Column="4" Grid.Row="0" MaximumWidthRequest="200" MaximumHeightRequest="50" ></Button>
|
||||||
|
<StackLayout BackgroundColor="{StaticResource Secondary}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="6">
|
||||||
|
<Button Text="ACCUEIL" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="1" ></Button>
|
||||||
|
<Button Text="COMPTE" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="2"></Button>
|
||||||
|
<Button Text="OPERATION" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="3"></Button>
|
||||||
|
<Button Text="ECHEANCIER" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="4"></Button>
|
||||||
|
<Button Text="PLANIFICATION" BackgroundColor="{StaticResource Tertiary}" TextColor="{StaticResource White}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="5"></Button>
|
||||||
|
<Button Text="STATISTIQUES" BackgroundColor="{StaticResource Yellow100Accent}" TextColor="{StaticResource Secondary}" Padding="20" Margin="21" Grid.Column="0" Grid.Row="6"></Button>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,15 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace IHM.Desktop;
|
||||||
|
|
||||||
|
public partial class Planification : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Planification()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:composant="clr-namespace:IHM.Composant"
|
||||||
|
x:Class="IHM.Mobile.AjoutBanques"
|
||||||
|
Title="AjoutBanques">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.10*"/>
|
||||||
|
<RowDefinition Height="0.05*"/>
|
||||||
|
<RowDefinition Height="0.15*"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.95*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
|
||||||
|
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
|
||||||
|
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
|
||||||
|
<Button x:Name="boutonRetour" Text="retour" HeightRequest="50" Clicked="returnbutton" IsVisible="False" HorizontalOptions="End"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste des banques disponible : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/>
|
||||||
|
|
||||||
|
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
|
||||||
|
BackgroundColor="{StaticResource Tertiary}"
|
||||||
|
StrokeShape="RoundRectangle 20" Margin="10">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="Importer depuis un fichier" TextColor="Black"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
<ImageButton Grid.Column="2" Source="import_from_file.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="ImportOFX_Clicked"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<CollectionView Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding BanquesDisponibleInApp}">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Nom}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
<ImageButton Grid.Column="2" Source="add_new_banks.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="AddBanque_Clicked"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,78 @@
|
|||||||
|
using Model;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Numerics;
|
||||||
|
|
||||||
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
|
public partial class AjoutBanques : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public AjoutBanques()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
BindingContext = Mgr;
|
||||||
|
Mgr.LoadBanqueDispo();
|
||||||
|
if (OperatingSystem.IsIOS())
|
||||||
|
{
|
||||||
|
boutonRetour.IsVisible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ImportOFX_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PickOptions options = new PickOptions();
|
||||||
|
options.PickerTitle = "Choisir un fichier OFX";
|
||||||
|
|
||||||
|
try{
|
||||||
|
var result = await FilePicker.Default.PickAsync(options);
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
if (result.FileName.EndsWith("ofx", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
IList<Compte> lesComptes = Mgr.Pers.GetDataFromOFX(result.FullPath);
|
||||||
|
Debug.WriteLine(lesComptes.Count);
|
||||||
|
foreach(Compte compte in lesComptes)
|
||||||
|
{
|
||||||
|
if(Mgr.User.LesBanques.Count != 0)
|
||||||
|
{
|
||||||
|
Mgr.User.LesBanques.First().AjouterCompte(compte);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new FileLoadException("Imposible de charger le fichier");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private async void returnbutton(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Navigation.PopModalAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void AddBanque_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ImageButton imageButton = (ImageButton)sender;
|
||||||
|
Grid grid = (Grid)imageButton.Parent;
|
||||||
|
foreach(IView iw in grid.Children)
|
||||||
|
{
|
||||||
|
if (iw.GetType() == typeof(Label))
|
||||||
|
{
|
||||||
|
await Mgr.Pers.AjouterBanque((Banque)(iw as Label).BindingContext, Mgr.User);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Mgr.User.LesBanques = await Mgr.Pers.RecupererBanques(Mgr.User);
|
||||||
|
await Navigation.PopModalAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,46 @@
|
|||||||
using Model;
|
using Model;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace IHM.Mobile;
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
public partial class DashBoard : ContentPage
|
public partial class DashBoard : ContentPage
|
||||||
{
|
{
|
||||||
public Manager Mgr => (App.Current as App).Manager;
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
public DashBoard()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
//Routing.RegisterRoute(nameof(DashBoard), typeof(DashBoard));
|
|
||||||
|
|
||||||
|
|
||||||
|
public DashBoard()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
|
||||||
|
BindingContext = Mgr;
|
||||||
|
|
||||||
if (Mgr.SelectedInscrit == null)
|
if (Mgr.User == null)
|
||||||
{
|
{
|
||||||
loadInscription();
|
loadPage(new MainPage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*if (!Mgr.Pers.TestConnexion())
|
||||||
|
{
|
||||||
|
loadPage(new ErrorPage());
|
||||||
|
Debug.WriteLine("cc");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void loadPage(Page p)
|
||||||
|
{
|
||||||
|
await Navigation.PushModalAsync(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void loadInscription()
|
private void Banques_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
await Navigation.PushModalAsync(new MainPage());
|
loadPage(new GestionBanques());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="IHM.Mobile.ErrorPage"
|
||||||
|
Title="Error">
|
||||||
|
<FlexLayout Direction="Column" JustifyContent="Center" AlignItems="Center">
|
||||||
|
|
||||||
|
<Image Source="{AppThemeBinding Light=logo_sans_fond_black.png, Dark=logo_sans_fond.png}"
|
||||||
|
HorizontalOptions="Center" HeightRequest="200"/>
|
||||||
|
|
||||||
|
<ActivityIndicator IsRunning="true" Margin="0,120,0,0" />
|
||||||
|
|
||||||
|
<Label Text="Tentative de connexion" Margin="0,20,0,0" FontSize="Body" FontAttributes="Bold"/>
|
||||||
|
|
||||||
|
</FlexLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,46 @@
|
|||||||
|
using Model;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
|
public partial class ErrorPage : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public const int TIME_TEST_DB = 15000;
|
||||||
|
|
||||||
|
public ErrorPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
startTestConnexion();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnBackButtonPressed()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void conIsActive()
|
||||||
|
{
|
||||||
|
while (!await Mgr.Pers.TestConnexion())
|
||||||
|
{
|
||||||
|
Thread.Sleep(TIME_TEST_DB);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConnexionValide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startTestConnexion()
|
||||||
|
{
|
||||||
|
Task testConnexion = new Task(() => conIsActive());
|
||||||
|
testConnexion.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ConnexionValide()
|
||||||
|
{
|
||||||
|
await Navigation.PopModalAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:composant="clr-namespace:IHM.Composant"
|
||||||
|
x:Class="IHM.Mobile.GestionBanques"
|
||||||
|
Title="GestionBanques">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.10*"/>
|
||||||
|
<RowDefinition Height="0.05*"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.95*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<HorizontalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
|
||||||
|
<Image Source="Resources/Images/logo_sans_fond.png" HeightRequest="50" Margin="20"/>
|
||||||
|
<Label Text="Cons'Eco" FontSize="20" VerticalOptions="Center" FontAttributes="Bold"/>
|
||||||
|
<Button x:Name="boutonRetour" Text="retour" HeightRequest="50" Clicked="returnbutton" IsVisible="False" HorizontalOptions="End"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<ImageButton Grid.Row="0" Grid.Column="2" Source="add_banks.png"
|
||||||
|
HorizontalOptions="End" Padding="10" Margin="10"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"
|
||||||
|
Clicked="AddBanque_Clicked"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.ColumnSpan="3" Text="Liste de vos banques : " FontAttributes="Bold" FontSize="Body" Padding="20,10,0,0"/>
|
||||||
|
|
||||||
|
<CollectionView Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding ListeDesBanques}">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.75*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Text="{Binding Name}"
|
||||||
|
FontAttributes="Bold" FontSize="Body"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Center"/>
|
||||||
|
<ImageButton Grid.Column="2" Source="reload_banks.png"
|
||||||
|
Padding="10" Margin="5"
|
||||||
|
CornerRadius="10" HeightRequest="65"
|
||||||
|
BackgroundColor="{StaticResource Primary}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,35 @@
|
|||||||
|
using Model;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
|
public partial class GestionBanques : ContentPage
|
||||||
|
{
|
||||||
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public GestionBanques()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
BindingContext= Mgr;
|
||||||
|
Mgr.LoadBanque();
|
||||||
|
if (OperatingSystem.IsIOS())
|
||||||
|
{
|
||||||
|
boutonRetour.IsVisible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void loadPage(Page p)
|
||||||
|
{
|
||||||
|
await Navigation.PushModalAsync(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddBanque_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
loadPage(new AjoutBanques());
|
||||||
|
}
|
||||||
|
private async void returnbutton(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Navigation.PopModalAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,9 +1,17 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using Model;
|
||||||
|
|
||||||
namespace IHM.Mobile;
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
public partial class Operations : ContentPage
|
public partial class Operations : ContentPage
|
||||||
{
|
{
|
||||||
public Operations()
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
|
||||||
|
public Operations()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
BindingContext = Mgr;
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,11 +1,49 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:local="clr-namespace:IHM.Composant"
|
||||||
x:Class="IHM.Mobile.Planification">
|
x:Class="IHM.Mobile.Planification">
|
||||||
<VerticalStackLayout>
|
<ScrollView>
|
||||||
<Label
|
<VerticalStackLayout>
|
||||||
Text="Planification"
|
<Label Text="Mes Echeances du mois :" FontAttributes="Bold" Margin="10,10,0,20" FontSize="20"/>
|
||||||
VerticalOptions="Center"
|
<CollectionView ItemsSource="{Binding SelectedCompte.LesEch}">
|
||||||
HorizontalOptions="Center" />
|
<!--User.LesBanques[0].ListeDesComptes[0].LesOpe}-->
|
||||||
</VerticalStackLayout>
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Margin="0,7,0,7">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<!--<ColumnDefinition/>-->
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!--<ImageButton Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
|
Source="{Binding ImageSrc}"
|
||||||
|
CornerRadius="10"/>-->
|
||||||
|
<Label Grid.Row="0" Grid.Column="0"
|
||||||
|
Text="{Binding Nom}"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
FontSize="Body"
|
||||||
|
Margin="50,0,0,0"/>
|
||||||
|
<Label Grid.Row="1" Grid.Column="0"
|
||||||
|
Text="{Binding Tag}"
|
||||||
|
FontAttributes="Italic"
|
||||||
|
Margin="50,0,0,0"/>
|
||||||
|
<Label Grid.Row="0" Grid.Column="2"
|
||||||
|
Text="{Binding DateOperation, StringFormat='{0:d}'}"/>
|
||||||
|
<Label Grid.Row="1" Grid.Column="2"
|
||||||
|
Text="{Binding Montant}"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="OrangeRed"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
</ContentPage>
|
</ContentPage>
|
@ -1,9 +1,17 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
namespace IHM.Mobile;
|
namespace IHM.Mobile;
|
||||||
|
|
||||||
public partial class Planification : ContentPage
|
public partial class Planification : ContentPage
|
||||||
{
|
{
|
||||||
public Planification()
|
public Manager Mgr => (App.Current as App).Manager;
|
||||||
|
public Planification()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
BindingContext = Mgr;
|
||||||
|
Mgr.LoadCompte();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue