Exemple #1
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            MZ_RZ  yymzrz = new MZ_RZ();
            string strBlh = "";

            if (_communicateValue != null)
            {
                strBlh = _communicateValue[0].ToString();
            }

            switch (_functionName)
            {
            case "Fun_mz_rizhi":
                MZ_RZNew yymzrznew = new MZ_RZNew(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    yymzrznew.MdiParent = _mdiParent;
                }
                //YYMZRZ = new MZ_RZ(_menuTag, _chineseName, _mdiParent);
                yymzrznew.Show();
                yymzrznew.WindowState = FormWindowState.Maximized;
                break;

            case "Fun_mz_rz_one":
                //strBlh = "2012092110125";
                yymzrz = new MZ_RZ(this._chineseName, _menuTag, strBlh);
                yymzrz.Show();
                break;

            case "Fun_FrmMzrzCx":
                FrmMzrzCx yymzrzcx = new FrmMzrzCx(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    yymzrzcx.MdiParent = _mdiParent;
                }
                yymzrzcx.StartPosition = FormStartPosition.CenterScreen;
                yymzrzcx.Show();
                break;

            case "Fun_FrmPWS":
                FrmPatientWaitingSituation frm_pws = new FrmPatientWaitingSituation(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    frm_pws.MdiParent = _mdiParent;
                }
                frm_pws.StartPosition = FormStartPosition.CenterScreen;
                frm_pws.Show();
                break;

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

            return(yymzrz);
        }
Exemple #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            //if (this.dgvList.SelectedRows.Count == 0) return;
            //string strBlh = this.dgvList.SelectedRows[0].Cells["BLM"].Value.ToString();
            //if (string.IsNullOrEmpty(strBlh)) return;
            if (this.dgvList.SelectedRows.Count == 0)
            {
                MessageBox.Show("ÇëÏȲéѯÈÕÖ¾¼Ç¼£¡", "Ìáʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataRowView drv       = this.dgvList.SelectedRows[0].DataBoundItem as DataRowView;
            MZ_RZ       frmAction = new MZ_RZ(_chineseName, _menuTag, drv.Row);

            frmAction.ShowDialog();
            btnFind_Click(null, null);
        }
Exemple #3
0
        private void dgvList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string strBlh = this.dgvList.SelectedRows[0].Cells["BLM"].Value.ToString();

            if (string.IsNullOrEmpty(strBlh))
            {
                return;
            }
            if (this.dgvList.SelectedRows.Count == 0)
            {
                return;
            }

            DataRowView drv       = this.dgvList.SelectedRows[0].DataBoundItem as DataRowView;
            MZ_RZ       frmAction = new MZ_RZ(_chineseName, _menuTag, strBlh);

            frmAction.ShowDialog();
            btnFind_Click(null, null);
        }