Exemplo n.º 1
0
 public ConfigurationForm()
 {
     InitializeComponent();
     dgvAttributeDefinition.AutoGenerateColumns = false;
     ActivateDataFile = dataFileService.GetActivedDataFile();
     cdvFactory = new AttributeDefinitionViewFactory();
     currentProject = projectService.GetCurrentProject();
 }
Exemplo n.º 2
0
 public static long Create(Project model)
 {
     long id = 0;
     using (var con = EstablishConnection())
     {
         con.Open();
         con.Execute(@"
             INSERT INTO PROJECTS(name, description, password, relativePath)
             VALUES(@Name,@Description,@Password,@RelativePath)
         ", model);
         id = con.Query<long>("SELECT last_insert_rowid();").First();
         model.Id = id;
         con.Close();
     }
     return id;
 }