Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmBrcx frm = (frmBrcx)this.Owner;

            frm.StrValue = this.comboxss.SelectedValue.ToString();
            this.Close();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (IsSsDept() == false)
            {
                return(null);
            }
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            frmBrcx frmBrcx = null;

            switch (_functionName)
            {
            case "Fun_Ts_ss_Brcx":
                if (_communicateValue != null)
                {
                    frmBrcx = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue);
                }
                else
                {
                    frmBrcx = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                }

                if (_mdiParent != null)
                {
                    frmBrcx.MdiParent = _mdiParent;
                }
//					frmSsapcx.WindowState=FormWindowState.Maximized;
//					frmSsapcx.BringToFront();
                frmBrcx.Show();
                break;

            case "Fun_Ts_tszl_brcx":
                if (_communicateValue != null)
                {
                    frmBrcx = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue);
                }
                else
                {
                    frmBrcx = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                }

                if (_mdiParent != null)
                {
                    frmBrcx.MdiParent = _mdiParent;
                }
                //					frmSsapcx.WindowState=FormWindowState.Maximized;
                //					frmSsapcx.BringToFront();
                frmBrcx.Show();
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(frmBrcx);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            frmBrcx frmBrcx = null;

            object [] _value = new object[1];
            switch (_functionName)
            {
            case "Fun_Ts_ss_brcx":
                if (IsSsDept() == false)
                {
                    return;
                }
                _value[0] = 0;  //0 手术麻醉 1=特殊治疗
                frmBrcx   = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName, _value);
                if (_mdiParent != null)
                {
                    frmBrcx.MdiParent = _mdiParent;
                }
                frmBrcx.WindowState = FormWindowState.Maximized;
                frmBrcx.BringToFront();
                frmBrcx.Show();
                break;

            case "Fun_Ts_tszl_brcx":
                _value[0] = 1;  //0 手术麻醉 1=特殊治疗
                frmBrcx   = new frmBrcx(_currentUser.UserID, _currentDept.DeptId, _chineseName, _value);
                if (_mdiParent != null)
                {
                    frmBrcx.MdiParent = _mdiParent;
                }
                frmBrcx.WindowState = FormWindowState.Maximized;
                frmBrcx.BringToFront();
                frmBrcx.Show();
                break;

            default:
                throw new Exception("引出函数名错误!");
            }
        }
Ejemplo n.º 4
0
        private void FrmShow_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmBrcx frm = (frmBrcx)this.Owner;

            frm.StrValue = this.comboxss.SelectedValue.ToString();
        }