Exemplo n.º 1
0
 //检验申请
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable dataSource = this.myDataGrid1.DataSource as DataTable;
         if ((dataSource != null) && (dataSource.Rows.Count > 0))
         {
             int currentRowIndex = this.myDataGrid1.CurrentRowIndex;
             if (currentRowIndex != -1)
             {
                 DataRow row = dataSource.Rows[currentRowIndex];
                 Ts_zyys_jysq.InstanceForm._database    = InstanceForm.BDatabase;
                 Ts_zyys_jysq.InstanceForm._currentDept = InstanceForm.BCurrentDept;
                 Ts_zyys_jysq.InstanceForm._currentUser = InstanceForm.BCurrentUser;
                 Guid    guid  = new Guid(row["INPATIENT_ID"].ToString());
                 long    num2  = long.Parse(row["BABY_ID"].ToString());
                 FrmJYSQ mjysq = new FrmJYSQ(guid, num2, true);
                 mjysq.BinID  = new Guid(row["INPATIENT_ID"].ToString());
                 mjysq.DeptID = long.Parse(row["Dept_ID"].ToString());
                 mjysq.BabyID = long.Parse(row["BABY_ID"].ToString());
                 mjysq._Zyid  = row["住院号"].ToString();
                 mjysq.ShowDialog();
             }
         }
     }
     catch
     {
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            FrmJYSQ frmjysq = null;

            switch (_functionName)
            {
            case "Fun_Ts_zyys_jcsq":
                frmjysq = new FrmJYSQ(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmjysq.MdiParent = _mdiParent;
                }
                frmjysq.BringToFront();
                frmjysq.ShowDialog();
                break;

            case "Fun_Ts_zyys_jysq_bmwh":
                FrmJyxmBm frmybm = new FrmJyxmBm();    // new FrmJYSQ(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmybm.MdiParent = _mdiParent;
                }
                frmybm.BringToFront();
                frmybm.WindowState = FormWindowState.Maximized;
                frmybm.Show();
                break;

            default:
                throw new Exception("引出函数名错误!");
            }
        }