Beispiel #1
0
 private void EnterMZD_ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvJizhenPaiban.Rows.Count > 0)
     {
         string PatID = dgvJizhenPaiban.CurrentRow.Cells["PatZhuYuanID"].Value.ToString();
         if (string.IsNullOrEmpty(PatID))
         {
             MessageBox.Show("住院号不能为空。");
             return;
         }
         string Oroom = dgvJizhenPaiban.CurrentRow.Cells["oroom"].Value.ToString();
         if (string.IsNullOrEmpty(Oroom))
         {
             MessageBox.Show("手术间号不能为空。");
             return;
         }
         int       mzjldID = 0;
         string    Odate   = dtOSDate.Value.ToString("yyyy-MM-dd HH:mm");
         DataTable dt      = _MzjldDal.GetMzjldByPatId(PatID);
         if (dt.Rows.Count > 0)
         {
             mzjldID = Convert.ToInt32(dt.Rows[0][0]);
         }
         MzjldEdit F1 = new MzjldEdit(PatID, Oroom, DateTime.Parse(Odate), mzjldID);
         F1.ShowDialog();
         this.Close();
         new PaibanForm().Close();
     }
 }
Beispiel #2
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();
     }
 }
Beispiel #3
0
 private void MZJLDToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvMzjld.SelectedRows.Count == 1)
     {
         int       mzID   = Convert.ToInt32(dgvMzjld.SelectedRows[0].Cells["mzjldid"].Value);
         String    patID  = Convert.ToString(dgvMzjld.SelectedRows[0].Cells["patid"].Value);
         String    oroom  = Convert.ToString(dgvMzjld.SelectedRows[0].Cells["oroom"].Value);
         string    dttime = dgvMzjld.SelectedRows[0].Cells["otime"].Value.ToString();
         DateTime  dt     = Convert.ToDateTime((Convert.ToDateTime(dgvMzjld.SelectedRows[0].Cells["otime"].Value)).ToShortDateString());
         MzjldEdit mzjld1 = new MzjldEdit(patID, oroom, dt, mzID, true);
         mzjld1.ShowDialog();
     }
 }
Beispiel #4
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();
                }
            }
        }
Beispiel #5
0
        void newPAL_DoubleClick(object sender, EventArgs e)
        {
            Point  p = Cursor.Position;
            IntPtr h = WindowFromPoint(p);

            foreach (Control con in this.Controls)
            {
                if (con.Handle == h)
                {
                    string    OROOM = con.Name;
                    DataTable dt    = bll.slectOroomINFO(OROOM);
                    if (Convert.ToInt32(dt.Rows[0][0]) != 0)
                    {
                        this.Close();
                        MzjldEdit mzjldform = new MzjldEdit(dt.Rows[0][2].ToString(), OROOM, Convert.ToDateTime(DateTime.Now.ToShortDateString()), Convert.ToInt32(dt.Rows[0][1]), true);
                        mzjldform.ShowDialog();
                    }
                }
            }
        }