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