/// <summary> /// 双击 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Dgv_Info_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { pvb.operate = true; if (pvb.IvBatchSaved == 1 && pvb.ChangeSendBatch == "0") { MessageBox.Show("<已发送> 状态瓶签不可修改批次,如需修改,请修改配置", "批次提示", MessageBoxButtons.OK); return; } if (pvb.IvBatchSaved == 2 && pvb.ChangePrintBatch == "0") { MessageBox.Show("<已打印> 状态瓶签不可修改批次,如需修改,请修改配置", "批次提示", MessageBoxButtons.OK); return; } batch.Close(); batch = new Pivas_setBatch(); string LabelNo = Dgv_Info.Rows[e.RowIndex].Cells["瓶签号"].Value.ToString(); string BatchRule = Dgv_Info.Rows[e.RowIndex].Cells["批次规则"].Value.ToString(); string Teamter = Dgv_Info.Rows[e.RowIndex].Cells["TeamNumber"].Value.ToString(); string PetCode = Dgv_Info.Rows[e.RowIndex].Cells["病人编码"].Value.ToString(); string Batch = Dgv_Info.Rows[e.RowIndex].Cells["批次"].Value.ToString(); batch.ShowSetBatch(true, LabelNo, Teamter, BatchRule, null, PetCode, Batch, true); batch.ChangeTextVal += new DelegateChangeTextVal(ChangeBatch); batch.Show(this); } }
/// <summary> /// 单击 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Dgv_Info_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { Application.DoEvents(); pvb.operate = true; string PetCode = Dgv_Info.Rows[e.RowIndex].Cells["病人编码"].Value.ToString(); if (e.ColumnIndex == 3) { batch.Dispose(); if (pvb.IvBatchSaved == 1 && pvb.ChangeSendBatch == "0") { MessageBox.Show("<已发送> 状态瓶签不可修改批次,如需修改,请修改配置", "批次提示", MessageBoxButtons.OK); return; } if (pvb.IvBatchSaved == 2 && pvb.ChangePrintBatch == "0") { MessageBox.Show("<已打印> 状态瓶签不可修改批次,如需修改,请修改配置", "批次提示", MessageBoxButtons.OK); return; } batch = new Pivas_setBatch(); string LabelNo = Dgv_Info.Rows[e.RowIndex].Cells["瓶签号"].Value.ToString(); string BatchRule = Dgv_Info.Rows[e.RowIndex].Cells["批次规则"].Value.ToString(); string Teamter = Dgv_Info.Rows[e.RowIndex].Cells["TeamNumber"].Value.ToString(); // string PetCode = Dgv_Info.Rows[e.RowIndex].Cells["病人编码"].Value.ToString(); string Batch = Dgv_Info.Rows[e.RowIndex].Cells["批次"].Value.ToString(); batch.ShowSetBatch(true, LabelNo, Teamter, BatchRule, null, PetCode, Batch, true); batch.ChangeTextVal += new DelegateChangeTextVal(ChangeBatch); batch.Show(this); //} } string[] a = Dgv_Info.Rows[e.RowIndex].Cells["病区"].Value.ToString().Split('('); ((UserControlBatch)(this.Parent.Parent.Parent)).med1.Wardcode = a[1].Substring(0, a[1].Length - 1); string Naem = a[0] + " " + Dgv_Info.Rows[e.RowIndex].Cells["床号"].Value.ToString().Trim().Replace("床", "") + "床" + " " + Dgv_Info.Rows[e.RowIndex].Cells["姓名"].Value.ToString(); string Groupno = Dgv_Info.Rows[e.RowIndex].Cells["组号"].Value.ToString(); ((UserControlBatch)(this.Parent.Parent.Parent)).med1.Visible = true; ((UserControlBatch)(this.Parent.Parent.Parent)).med1.rows = e.RowIndex; ((UserControlBatch)(this.Parent.Parent.Parent)).med1.Groupno = Groupno; ((UserControlBatch)(this.Parent.Parent.Parent)).med1.Label_BedNo.Text = Dgv_Info.Rows[e.RowIndex].Cells["床号"].Value.ToString().Trim(); ((UserControlBatch)(this.Parent.Parent.Parent)).med1.AddMed(PetCode, tf, IsSame, "", "", Dgv_Info.Rows[0].Cells["批次规则"].Value.ToString()); ((UserControlBatch)(this.Parent.Parent.Parent)).med1.Label_Info.Text = Naem; //Dgv_Info.Rows[Dgv_Info.CurrentRow.Index].DefaultCellStyle.BackColor = System.Drawing.ColorTranslator.FromHtml(SelectColor); ColorS(); } else { lieMing = Dgv_Info.Columns[e.ColumnIndex].HeaderText; } }