/// <summary> /// 评分人接受反馈之后再次发送整改通知书 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNoticeAgain_Click(object sender, EventArgs e) { //客观 DataTable dtObjective = new DataTable(); DataColumn dcA_1 = new DataColumn("质控项目"); dtObjective.Columns.Add(dcA_1); DataColumn dcA_2 = new DataColumn("状态"); dtObjective.Columns.Add(dcA_2); DataColumn dcA_3 = new DataColumn("分值"); dtObjective.Columns.Add(dcA_3); DataColumn dcA_4 = new DataColumn("项目编码"); dtObjective.Columns.Add(dcA_4); //主观 DataTable dtSubjective = new DataTable(); DataColumn dcK_1 = new DataColumn("评分项目"); dtSubjective.Columns.Add(dcK_1); DataColumn dcK_2 = new DataColumn("分值"); dtSubjective.Columns.Add(dcK_2); DataColumn dcK_3 = new DataColumn("扣分标准"); dtSubjective.Columns.Add(dcK_3); bool flag = false; //自动质控的数据 for (int i = 0; i < dgvObjective.Rows.Count; i++) { DataRow dr = dtObjective.NewRow(); dr["质控项目"] = dgvObjective.Rows[i].Cells["质控项目"].Value.ToString(); dr["状态"] = dgvObjective.Rows[i].Cells["状态"].Value.ToString(); dr["分值"] = dgvObjective.Rows[i].Cells["分值"].Value.ToString(); dr["项目编码"] = dgvObjective.Rows[i].Cells["项目编码"].Value.ToString(); dtObjective.Rows.Add(dr); } //手动质控未确认数据 for (int i = 0; i < dgvSubjective.Rows.Count; i++) { if (dgvSubjective.Rows[i].Cells["colBtn_1"].Value.ToString() != "已确认") { DataRow dr = dtSubjective.NewRow(); dr["评分项目"] = dgvSubjective.Rows[i].Cells["评分项目"].Value.ToString(); dr["分值"] = dgvSubjective.Rows[i].Cells["分值"].Value.ToString(); dr["扣分标准"] = dgvSubjective.Rows[i].Cells["扣分标准"].Value.ToString(); dtSubjective.Rows.Add(dr); flag = true; } } //自动有数据,手动有未确认数据 if (flag || dgvObjective.Rows.Count > 0) { frmSendNotice frm = new frmSendNotice(dtSubjective, dtObjective, inpat, type, infoId); frm.BtnEnable += new frmSendNotice.RefEventHandler(BtnEnable); frm.ShowDialog(); //if(frm.DialogResult=) } else { App.Msg("没有质控信息,无法发送整改通知书!"); } }
/// <summary> /// 整改通知书 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNotice_Click(object sender, EventArgs e) { if (!SaveData()) { App.Msg("保存失败,请稍后再试!"); return; } //“项目编码”为自动质控主键 //客观 DataTable dtAutomaticScoring = new DataTable(); DataColumn dcA_1 = new DataColumn("质控项目"); dtAutomaticScoring.Columns.Add(dcA_1); DataColumn dcA_2 = new DataColumn("状态"); dtAutomaticScoring.Columns.Add(dcA_2); DataColumn dcA_3 = new DataColumn("分值"); dtAutomaticScoring.Columns.Add(dcA_3); DataColumn dcA_4 = new DataColumn("项目编码"); dtAutomaticScoring.Columns.Add(dcA_4); //主观 DataTable dtKouFen = new DataTable(); DataColumn dcK_1 = new DataColumn("评分项目"); dtKouFen.Columns.Add(dcK_1); DataColumn dcK_2 = new DataColumn("分值"); dtKouFen.Columns.Add(dcK_2); DataColumn dcK_3 = new DataColumn("扣分标准"); dtKouFen.Columns.Add(dcK_3); //bool flag = false; //选中“通知发送”的数据 for (int i = 0; i < dgvAutomaticScoring.Rows.Count; i++) { //if (dgvAutomaticScoring.Rows[i].Cells["dcFlag_2"].Value.ToString() == Boolean.TrueString) //{ DataRow dr = dtAutomaticScoring.NewRow(); dr["质控项目"] = dgvAutomaticScoring.Rows[i].Cells["质控项目"].Value.ToString(); dr["状态"] = dgvAutomaticScoring.Rows[i].Cells["状态"].Value.ToString(); dr["分值"] = dgvAutomaticScoring.Rows[i].Cells["分值"].Value.ToString(); dr["项目编码"] = dgvAutomaticScoring.Rows[i].Cells["项目编码"].Value.ToString(); dtAutomaticScoring.Rows.Add(dr); //flag = true; //} } for (int i = 0; i < dgvKouFen.Rows.Count; i++) { if (dgvKouFen.Rows[i].Cells["isNew"].Value.ToString() != "D") { DataRow dr = dtKouFen.NewRow(); dr["评分项目"] = dgvKouFen.Rows[i].Cells["评分项目"].Value.ToString(); dr["分值"] = dgvKouFen.Rows[i].Cells["分值"].Value.ToString(); dr["扣分标准"] = dgvKouFen.Rows[i].Cells["扣分标准"].Value.ToString(); dtKouFen.Rows.Add(dr); } } //自动质控和手动质控没有记录 if (dgvAutomaticScoring.Rows.Count > 0 || dgvKouFen.Rows.Count > 0) { frmSendNotice frm = new frmSendNotice(dtKouFen, dtAutomaticScoring, inPatient, type, ""); frm.BtnEnable += new frmSendNotice.RefEventHandler(BtnEnable); frm.ShowDialog(); } else { App.Msg("没有质控信息,无法发送整改通知书!"); } }