Ejemplo n.º 1
0
 /// <summary>
 /// 进入麻醉记录单
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tsmiMZJLD_Click(object sender, EventArgs e)
 {
     if (dataGridView1.Rows.Count > 0)
     {
         string   patid   = Convert.ToString(dataGridView1.SelectedRows[0].Cells["PatZhuYuanID"].Value);
         string   oroom   = dataGridView1.SelectedRows[0].Cells["Oroom"].Value.ToString();
         DateTime odate   = DateTime.Parse(dataGridView1.SelectedRows[0].Cells["Column2"].Value.ToString());
         int      mzjldid = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["mzid"].Value);
         //this.Close();
         MzjldEdit mzjld1 = new MzjldEdit(patid, oroom, odate, mzjldid, true);
         mzjld1.Show();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 1)
            {
                if (this.rdNew.Checked == true)
                {
                    string patid = Convert.ToString(dataGridView1.SelectedRows[0].Cells["病人编号"].Value);
                    string oroom = dataGridView1.SelectedRows[0].Cells["手术间名称"].Value.ToString();
                    string odate = dtDATE.Value.ToString("yyyy-MM-dd");

                    DataTable dt = new DataTable();
                    dt = _MzjldDal.GetMzjldByPatId(patid);
                    if (dt.Rows.Count > 0)
                    {
                        DialogResult result = MessageBox.Show("此病人当日麻醉记录单已存在,是否新建?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                        if (result == DialogResult.No)
                        {
                            return;
                        }
                        else
                        {
                            this.Close();
                            MzjldEdit mzjld1 = new MzjldEdit(patid, oroom, DateTime.Parse(odate), 0);
                            mzjld1.Show();
                        }
                    }
                    else
                    {
                        this.Close();
                        MzjldEdit mzjld1 = new MzjldEdit(patid, oroom, DateTime.Parse(odate), 0);
                        mzjld1.Show();
                    }
                }

                else if (this.rdOld.Checked == true)
                {
                    string   patid = Convert.ToString(dataGridView1.SelectedRows[0].Cells["病人编号"].Value);
                    string   oroom = dataGridView1.SelectedRows[0].Cells["手术间名称"].Value.ToString();
                    DateTime odate = DateTime.Parse(dtDATE.Value.ToShortDateString());
                    mzjldid = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["麻醉编号"].Value);
                    this.Close();
                    MzjldEdit mzjld1 = new MzjldEdit(patid, oroom, odate, mzjldid);
                    mzjld1.Show();
                }
            }
        }