示例#1
0
        private void tspParcipantSave_Click(object sender, EventArgs e)
        {
            List <Participant> ParticipantInfoList = new List <Participant>();

            foreach (DataGridViewRow row in dgvPreUcPar.Rows)
            {
                Participant ParticipantInfo = new Participant();
                ParticipantInfo.ID         = (int)row.Cells["ID"].Value;
                ParticipantInfo.Name       = row.Cells["dgvPreParticipantName"].Value.ToString();
                ParticipantInfo.Majary     = row.Cells["dgvPreParticipantMajor"].Value.ToString();
                ParticipantInfo.Postion    = row.Cells["dgvPreParticipantDuty"].Value.ToString();
                ParticipantInfo.Company    = row.Cells["dgvPreParticipantCompany"].Value.ToString();
                ParticipantInfo.Department = row.Cells["dgvPreParticipantDepartment"].Value.ToString();
                ParticipantInfo.RolePlay   = row.Cells["dgvPreParticipantRole"].Value.ToString();
                ParticipantInfo.ProName    = HAZOP分析系统.ProName;
                ParticipantInfoList.Add(ParticipantInfo);
            }
            if (pbll.Update_ParticipantInfo(ParticipantInfoList))
            {
                MessageBox.Show("保存成功!");
                ParticipantInfoDataBind();
            }
        }