예제 #1
0
 public ConfigurationForm()
 {
     InitializeComponent();
     dgvAttributeDefinition.AutoGenerateColumns = false;
     ActivateDataFile = dataFileService.GetActivedDataFile();
     cdvFactory = new AttributeDefinitionViewFactory();
     currentProject = projectService.GetCurrentProject();
 }
예제 #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;
 }