private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { updateFlag = true; Con_ClearCntrValue.ClearCntrValue(this.gpbFixTime, true); if (lvwQualitys.SelectedItems.Count > 0) { Class_Quality_HLB_View q = (Class_Quality_HLB_View)lvwQualitys.SelectedItems[0].Tag; chp.Id = q.Id; cboTextKind.Text = q.Document_Type; //文书类型 cboMonitoring.Text = q.Sub_Item; //监控子项 cboMonitorType.Text = q.Inpatient_Type; //患者类型 txtExceTimes.Text = q.ExceTimes.ToString(); //执行次数 cboCKTime.Text = q.Base_Time; //参考时间 txtExecCycles.Text = q.Runcycle.ToString(); //执行周期 cboCyclesUnit.Text = q.Runcycleunit; //执行周期单位 txtItemMax.Text = q.Item_Max.ToString(); //项目最大值 txtItemMin.Text = q.Item_Min.ToString(); //项目最小值 if (q.Isprealert == "是") { rdoIsOverAlert.Checked = true; rdoIsOverAlertF.Checked = false; txtPrealertTime.Text = q.Prealerttime.ToString(); //预警时间 cboPrealertUnit.Text = q.Pretimeunit; //单位 } else { rdoIsOverAlert.Checked = false; rdoIsOverAlertF.Checked = true; } if (q.Is_Renew == "是") { rdoIsMend.Checked = true; rdoIsMendF.Checked = false; txtDeduction.Text = q.Take_Grade.ToString();//扣分值 } else { rdoIsMend.Checked = false; rdoIsMendF.Checked = true; } if (q.Is_Notice == "是") { rdoIsNotice.Checked = true;//是否提醒 } else { rdoIsNotice.Checked = false; } if (q.Istoday == "是") { rdoIsCheck.Checked = true;//是否当天检查一次 } else { rdoIsCheck.Checked = false; } if (txtExceTimes.Text != "") { txtExceTimes.Enabled = true; } Con_CheckBoxListUtil.SetCheck(gpbFixTime, q.Fix_Time); } else { App.MsgErr("请选择一条修改的记录"); ResetAll(); } }
private void frmSectionCheck_Load(object sender, EventArgs e) { //老代码注释掉 //DataSet dataSet = App.GetDataSet("select distinct(ts.sid),ts.section_name from t_Section_Area tsa inner join t_Sectioninfo ts on tsa.sid=ts.sid"); #region 消息提醒使用 DataSet dataSet = new DataSet(); if (strT_Msg_Setting == 3) { dataSet = App.GetDataSet("select t.said as SID,t.sick_area_name as SECTION_NAME from T_SICKAREAINFO t"); } else { if (strT_Msg_Setting == 2) { dataSet = App.GetDataSet("select distinct(ts.sid),ts.section_name from t_Sectioninfo ts"); } else { dataSet = App.GetDataSet("select distinct(ts.sid),ts.section_name from t_Section_Area tsa inner join t_Sectioninfo ts on tsa.sid=ts.sid"); } } #endregion Class_Sections[] class_Sections; int lenght = dataSet.Tables[0].Rows.Count; CheckBox[] ff = new CheckBox[lenght]; for (int i = 0; i < lenght; i++) { class_Sections = new Class_Sections[lenght]; class_Sections[i] = new Class_Sections(); class_Sections[i].Sid = Convert.ToInt32(dataSet.Tables[0].Rows[i]["SID"].ToString()); class_Sections[i].Section_Name = dataSet.Tables[0].Rows[i]["SECTION_NAME"].ToString(); chkSectionListBox.Items.Add(class_Sections[i]); chkSectionListBox.DisplayMember = "Section_Name"; chkSectionListBox.ValueMember = "SID"; } if (ucYWCParam.FlexSection != null) { // Con_CheckBoxListUtil.SetCheck(this.chkSectionListBox, frmYWCParam.FlexSection); //chkSectionListBox.Items.Clear(); string[] temp = ucYWCParam.FlexSection.Split(','); foreach (string str in temp) { for (int i = 0; i < chkSectionListBox.Items.Count; i++) { if (str == chkSectionListBox.GetItemText(chkSectionListBox.Items[i])) { chkSectionListBox.Items.RemoveAt(i); //除自身规则的科室以外,已被选择的科室则移除它 } } } //Con_CheckBoxListUtil.RemoveExitItems(chkSectionListBox); } if (ywcSectionName != null) { Con_CheckBoxListUtil.SetCheck(this.chkSectionListBox, ywcSectionName); //老代码注释掉 //this.groupBox1.Text = "文书类型为:[" + documentType + "]的科室列表"; #region 消息提醒使用 if (strT_Msg_Setting == 3) { this.groupBox1.Text = "病区列表"; } else if (strT_Msg_Setting == 1 || strT_Msg_Setting == 2) { this.groupBox1.Text = "科室列表"; } else { this.groupBox1.Text = "文书类型为:[" + documentType + "]的科室列表"; } #endregion } else { //老代码注释掉 //this.groupBox1.Text = "科室列表"; #region 消息提醒使用 if (strT_Msg_Setting == 3) { this.groupBox1.Text = "病区列表"; } else { this.groupBox1.Text = "科室列表"; } #endregion } #region 消息提醒使用 if (strT_Msg_Setting == 1 || strT_Msg_Setting == 2 || strT_Msg_Setting == 3)//消息提醒使用 { // DataSet ds; if (STRMSGSECTION_IDS == "")//如果等于空,不需要进行选中提示 { for (int i = 0; i < chkSectionListBox.Items.Count; i++) { chkSectionListBox.SetItemChecked(i, false); } ywcSectionID = ""; ywcSectionName = ""; } } #endregion }