private void btnUploadAsset_Click(object sender, EventArgs e) { bool errorDetected = false; if (txtTitle.Text == string.Empty) { lblErrorTitle.Show(); errorDetected = true; } if (cboProjectType.SelectedIndex < 0) { lblErrorAssetType.Show(); errorDetected = true; } if (errorDetected == false) { DataBaseAccess dataBase = new DataBaseAccess(); dataBase.StartConnection(); formMain.curSelectedUserProjectID = dataBase.AddProject(_userProject.GetProjectTitle(), _userProject.GetProjectType(), _userProject.GetNotes(), (int)formMain.UsersAccounts.GetCurrentUser().GetUserID(), ProjectTag.Game, ProjectStatus.In_Development); dataBase.CloseConnection(); formMain.ChangeToPage(FormMain.Pages.EditProjectPage); } }