csv_import_status.anubis
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 09/05/2017
* Time: 23:01
* © Calexium
*/
public type CSV_Import_Status:
csv_ready,
csv_in_progress,
csv_finished,
csv_paused,
csv_cancelled,
csv_file_not_found,
csv_db_error,
csv_bad_format, // Bad format for input file
csv_error. // Unknown error
public define String
to_String
(
CSV_Import_Status status
)=
if status is
{
csv_ready then "READY",
csv_in_progress then "IN_PROGRESS",
csv_finished then "FINISHED",
csv_paused then "PAUSED",
csv_cancelled then "CANCELLED",
csv_file_not_found then "FILE_NOT_FOUND",
csv_db_error then "DB_ERROR",
csv_bad_format then "BAD_FORMAT",
csv_error then "ERROR"
}.
public define CSV_Import_Status
to_CSV_Import_Status
(
String status
)=
if status = "READY" then csv_ready else
if status = "IN_PROGRESS" then csv_in_progress else
if status = "FINISHED" then csv_finished else
if status = "PAUSED" then csv_paused else
if status = "CANCELLED" then csv_cancelled else
if status = "FILE_NOT_FOUND" then csv_file_not_found else
if status = "DB_ERROR" then csv_db_error else
if status = "BAD_FORMAT" then csv_bad_format else
if status = "ERROR" then csv_error else
csv_error
.