我的第五列是从我们的 SQL 服务器DataGridView
中提取信息。resumelink
文件的名称是 resumelink 记录中唯一的东西,例如。DOC100.pdf或Name12.pdf。我需要将它们链接到计算机上的映射驱动器,因此,如果文件名是DOC100.pdf,则它必须是//nt/resume/DOC100.pdf
. 我需要存储//nt/resume
零件,然后只需添加 resumelink 字段中的内容。我有一个字段,dataGridView1_CellContentClick
但它目前是空的。我不关心 pdf 的打开方式,无论是在 IE 还是 Adobe 中。
这是程序外观的图片。
namespace ResumeTest
{
public partial class Resume : Form
{
SqlConnection conn = new SqlConnection();
public Resume()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'iHBAPPSDataSet.HRresume' table. You can move, or remove it, as needed.
this.hRresumeTableAdapter.Fill(this.iHBAPPSDataSet.HRresume);
this.dataGridView1.RowsDefaultCellStyle.BackColor = Color.White;
this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Aquamarine;
}
private void button1_Click(object sender, EventArgs e)
{
bindingSource1.Filter = "name LIKE '%" + name.Text + "%' AND skillset LIKE '%" + skillset.Text + "%'";
}
public void ClearTextBoxes(Control control)
{
foreach (Control c in control.Controls)
{
if (c is TextBox)
{
if (!(c.Parent is NumericUpDown))
{
((TextBox)c).Clear();
}
}
else if (c is NumericUpDown)
{
((NumericUpDown)c).Value = 0;
}
else if (c is ComboBox)
{
((ComboBox)c).SelectedIndex = 0;
}
if (c.HasChildren)
{
ClearTextBoxes(c);
}
}
}
private void button2_Click(object sender, EventArgs e)
{
ClearTextBoxes(this);
bindingSource1.Filter = "name LIKE '%" + name.Text + "%'";
}
private void button3_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button4_Click(object sender, EventArgs e)
{
Add f2 = new Add();
f2.Show();
}
private void button6_Click(object sender, EventArgs e)
{
Delete f3 = new Delete();
f3.Show();
}
private void refreshButton_Click(object sender, EventArgs e)
{
this.hRresumeTableAdapter.Fill(this.iHBAPPSDataSet.HRresume);
}
private void quitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}