task

PROJECT - NEW FEATURE

[ import location(s) as .csv]

[what]

  1. ] NEW feature to enable users to import .csv files
    1. ] REVIEW existing code (similar) - have existing code in page - view/person, that exports record to file( person record as a .vcf file)
    2. ] MOVE code to

[why]

  1. ] outlook addresses exported to .csv
  2. ] excel
  3. ] gmail
  4. ] many

[where]

  1. ]

[when]

  1. ]

[example]

  1. ]

[how-to]

  1. ] user uploads .csv file, in a specified format,  ex locations.csv
  2. ] reads the file
  3. ] creates location entries for each

[reference]

  1. ]

developer implementation

[-process]

  1. ] export "format" required
    1. ] name
    2. ] url
    3. ] telephone
    4. ] street1
    5. ] street2
    6. ] city
    7. ] state/province
    8. ] country
    9. ] zip/postal
    10. ]
  2. ] overall process outline
    1. ] get(file) - user uploads file to server -> use file upload on ?? option - save file on server
    2. ] read(file)
    3. ] map line in file
      1. ex {name, address1, address2, city,province,country,postal,telephone,url}
      2. convert city name to city code
      3. IF city doesnt exist {new city }
      4. convert province name to province code
      5. convert country name to country code
      6. for location (aka parent id ) use "dfault || user specified
    4. ] handle empty fields 
      1.  

[-notes]

  1. *] mysql has an input file function 
    1. ] (BM on android)
  2. *] use 1 insert statement with many values
    1. ] VS looping insert statement
  3. ] review export person as .vcf
    1. ] PAGE view/person - has block of server side code in POST section, code creates file .csv file to download,
    2. ] have "input type = submit, value=export" - which fires the code post code
  4. ] new class - exportFile
    1. ] moving code from PAGE(view/person) inline into class
  5. ] review export-people
    1. ] code highlightiing is broken in wm ide, 100+errors,

status

[-previous-]

  1.   [2015-05-30] view/people -v-005
    1. ] -v-005 - new PAGE-version-005 - x] REMOVES code to write file as .vcf
  2. [2015-05-30] fileExport
    1. x] # 5213 - PAGE-CLASS-fileExport

[-current-]

  1.  ]

[-next-]

  1. ]

 

 

 

 

 // @place.street1+" "+@place.street2+"</street><locality>"+@city.name_sector+"</locality><region>"+@state.name_map+"</region><code>"+@place.postalORzip+"</code><country>"+@country.name_atlas+"
            // string text = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@"; text = text.Replace("@", "@" + System.Environment.NewLine); 
            // var dataFile = Server.MapPath("/users/vCard4.vcf"); 
            // successfully CREATES the file in the server directory, ] copy file to where i need it
            // File.WriteAllText(@dataFile, vCard4);
            // I want to write the file to the response object so the user is prompted to "SaveAs"
            
// TRY 1] response.redirect GET vCard4 file should prompt download of file
            // WORKS to write the contents of the file to the browser, 
            // Response.Redirect(@Href("~/users/vCard4.vcf"));
            
// TRY 2] writeFile directly to response object 
            // WORK to write the contents of the file to the page, 
            // Response.TransmitFile(@dataFile); 
            // TRY 3] // WORKS to saveAS, PRB = ] filename & .ext cur=page filename and ext, need = custom and .vcf ext
        
            /* current function VS this Response.Clear(); Response.ContentType = "text/vcard"; Response.TransmitFile("/users/vCard4.vcf"); // Response.WriteFile("/users/vCard4.vcf"); // ... */
        

 

 

Details Photos Edit more

Details

ID: 5160

NAME: FEATURE-5160-places-export-location

DESCRIPTION: ] export LOCATION as .csv file,

START DATE TIME: 2015-05-28 13:11:36

EST DURATION: 01:00:00

END DATE TIME: 2015-05-28 14:11:36

STATUS: To-Do

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities