与拥有专有/大量数据且应该存在于项目根文件夹之外的Rproj一起使用,什么是理想的工作流程?它确实具有公共目录根目录,只是它不是项目根目录。
目录结构如下:
private void TesterHome_Load(object sender, EventArgs e)
{
// Retriewe Data from database to the grid view
SqlConnection con = new SqlConnection("Data Source= LAPTOP-J70EHC58 ; Initial Catalog= Defect_Management_system ; Integrated Security = True ; Connect Timeout = 30 ; ");
SqlDataAdapter adapter = new SqlDataAdapter();
string sqlstmt = SELECT * FROM defect WHERE tester_id = '"+ 5 +"' ;
DataSet dataSet = new DataSet();
try
{
con.Open();
adapter = new SqlDataAdapter(sqlstmt, con);
adapter.Fill(dataSet);
con.Close();
dgvTester.DataSource = dataSet.Tables[0];
}
catch (Exception error)
{
MessageBox.Show(error + "Invalid");
}
// Insert Data Grid View Button
DataGridViewButtonColumn dgvbtnColumn = new DataGridViewButtonColumn();
dgvTester.Columns.Add(dgvbtnColumn);
dgvbtnColumn.HeaderText = " ";
dgvbtnColumn.Text = "View";
dgvbtnColumn.Name = "dgvBtn";
dgvbtnColumn.UseColumnTextForButtonValue = true;
}
// Code for grid view button cell
private void dgvTester_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
{
try
{
var senderGrid = (DataGridView)sender;
if (senderGrid[e.ColumnIndex, e.RowIndex] is DataGridViewButtonCell)
{
//if(senderGrid[e.ColumnIndex, e.RowIndex] is DataGridViewTextBoxCell.Value = "New")
{
QA_ReviewForm qa = new QA_ReviewForm();
qa.Show();
}
}
}
catch (Exception error)
{
MessageBox.Show(error + "Invalid");
}
}
1 . (root directory)
2 ¦--dev
3 ¦ °--me
4 ¦ °--projname (project root)
5 ¦ °--.git
6 °--data
在向上移动根目录时效果不佳:请参见this SO post。
数据文件在所有协作者共有的文件托管服务中备份。这是一个复杂的结构,我不确定该怎么做。