项目经理评分
private void FrmShow_Load(object sender, EventArgs e)
{
//建立数组
SE[] se = new SE[3];
//创建SE对象并初始化
se[0] = new SE();
se[0].id = 111;
se[0].name = "王小毛";
se[0].age = 26;
se[0].pingjia = "未评价";
se[0].pingfen = 0;
se[1] = new SE();
se[1].id = 112;
se[1].name = "周新雨";
se[1].age = 22;
se[1].pingjia = "未评价";
se[1].pingfen = 0;
se[2] = new SE();
se[2].id = 113;
se[2].name = "张晔";
se[2].age = 30;
se[2].pingjia = "未评价";
se[2].pingfen = 0;
//循环遍历出来
for (int i = 0; i < se.Length; i++)
{
ListViewItem item = new ListViewItem(se[i].id.ToString());
item.SubItems.Add(se[i].name);
item.SubItems.Add(se[i].age.ToString());
item.SubItems.Add(se[i].pingjia);
item.SubItems.Add(se[i].pingfen.ToString());
listView1.Items.Add(item);
}
}
//双击事件
private void listView1_DoubleClick(object sender, EventArgs e)
{
//把选中的那行数组的值给了Judge窗体中文本框
ListViewItem item = listView1.SelectedItems[0];
FrmJudge ju = new FrmJudge();
ju.item = item;
ju.Show();
}
//创建一个ListViewItem并且赋值为空
public ListViewItem item = null;
private void FrmJudge_Load(object sender, EventArgs e)
{
//将集合中的下标为1的值给到这个文本空
txtName.Text = item.SubItems[1].Text;
}
private void btnpj_Click(object sender, EventArgs e)
{
//把修改的内容赋值给要背修改的集合中下表为3 4 的
item.SubItems[3].Text = txtpingjia.Text;
item.SubItems[4].Text = txtpingfen.Text;
}