summaryrefslogtreecommitdiff
path: root/sqlite.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2018-11-11 18:40:57 +0100
committerNikolaus Gotsche <n@softwarefools.com>2018-11-11 18:40:57 +0100
commit70eb8ab6fe7ff82482cc44d346104be5c9edba8b (patch)
treeb673b446173927077cb19edc9a8dc76000ea59b3 /sqlite.go
parente3b6e0b00dbce15bf19a6f7d1bf39ea033651a0b (diff)
Import Export with clean commands0.3.6
Diffstat (limited to 'sqlite.go')
-rw-r--r--sqlite.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/sqlite.go b/sqlite.go
index d8dfbef..f7bea62 100644
--- a/sqlite.go
+++ b/sqlite.go
@@ -495,21 +495,26 @@ func SaveImportsToDB(cus []Customer, prs []Project, tsk []Task) {
fmt.Println(nli," Tasks:",len(tsk))
fmt.Println(sub(""))
if isInterSure(nli+" Are You sure to Import them all?") {
+ i := 0
for _,c := range cus {
id := SaveCustomer(c)
cusids=append(cusids,IdMap{c.Id,id})
+ i++
}
- fmt.Println(cusids)
+ //fmt.Println(cusids)
prs = ChangeCustomerIds(cusids,prs)
for _,p := range prs {
id := SaveProject(p)
prids=append(prids,IdMap{p.Id,id})
+ i++
}
- fmt.Println(prids)
+ //fmt.Println(prids)
tsk = ChangeProjectIds(prids,tsk)
for _,t := range tsk {
SaveTask(t)
+ i++
}
+ fmt.Println(nli,i,"items imported")
fmt.Println(frame(posR(),false))
}else{
fmt.Println(frame(negR(),false))