Example #1
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (_functionName == "")
            {
                return(null);
            }
            frmYZGL frmYzgl     = null;
            FrmCzxx frmczxx     = null;
            string  sSql        = "";
            int     nType       = 0;
            Guid    inpatientID = Guid.Empty;

            if (_communicateValue != null)
            {
                sSql  = _communicateValue[0].ToString();
                nType = Convert.ToInt32(_communicateValue[1]);
            }
            Form frm = null;

            switch (_functionName)
            {
            //add by zouchihua 2013-1-17 单病人查询
            case "Fun_ts_zyhs_yzgl_inpatient_cx":
                inpatientID = new Guid(_communicateValue[2].ToString());
                frm         = new frmYZGL(_chineseName, 0, inpatientID, true);
                break;
            }
            return(frm);
        }
Example #2
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            frmYZGL frmYzgl     = null;
            FrmCzxx frmczxx     = null;
            FrmCzhz frmczhz     = null;
            string  sSql        = "";
            int     nType       = 0;
            Guid    inpatientID = Guid.Empty;

            if (_communicateValue != null)
            {
                sSql  = _communicateValue[0].ToString();
                nType = Convert.ToInt32(_communicateValue[1]);
            }
            switch (_functionName)
            {
            case "Fun_ts_zyhs_yzgl":
                frmYzgl = new frmYZGL(_chineseName, 0);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            case "Fun_ts_zyhs_yzgl_ssmz":
            case "Fun_ts_zyhs_yzgl_ssmz_noexe":     //Add By Tany 2015-05-04 手麻引出一个不能发送的界面
                frmYzgl = new frmYZGL(_chineseName, sSql, nType, _functionName);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            case "Fun_ts_zyhs_yzgl_cx":
                frmYzgl = new frmYZGL(_chineseName, true);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            case "Fun_ts_zyhs_yzgl_tszl":
                frmYzgl = new frmYZGL(_chineseName, 1);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            case "Fun_ts_zyhs_yzgl_fycz":    //静脉配置费用冲正
                FrmPvsCostoffset FrmPvsCostoffset = new FrmPvsCostoffset();
                if (_mdiParent != null)
                {
                    FrmPvsCostoffset.MdiParent = _mdiParent;
                }
                if (BCurrentDept.DeptId == 598)
                {
                    FrmPvsCostoffset.Show();
                    FrmPvsCostoffset.WindowState = FormWindowState.Maximized;
                }
                break;

            case "Fun_ts_zyhs_yzgl_inpatient":
                inpatientID = new Guid(_communicateValue[2].ToString());
                frmYzgl     = new frmYZGL(_chineseName, 1, inpatientID);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            //add by zouchihua 2013-1-17 单病人查询
            case "Fun_ts_zyhs_yzgl_inpatient_cx":
                inpatientID = new Guid(_communicateValue[2].ToString());
                frmYzgl     = new frmYZGL(_chineseName, 0, inpatientID, true);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                    // frmYzgl.WindowState = FormWindowState.Maximized;
                }
                frmYzgl.Show();
                frmYzgl.Activate();
                break;

            case "Fun_ts_zyhs_czxxcx":
                frmczxx = new FrmCzxx();
                if (_mdiParent != null)
                {
                    frmczxx.MdiParent = _mdiParent;
                }
                frmczxx.Show();
                break;

            case "Fun_ts_zyhs_czxx_ypbcslyxx":
                frmYzgl = new frmYZGL(_chineseName, 0, true);
                if (_mdiParent != null)
                {
                    frmYzgl.MdiParent = _mdiParent;
                }
                frmYzgl.Show();
                break;

            case "Fun_ts_zyhs_czxx_hzcx":
                frmczhz = new FrmCzhz();
                if (_mdiParent != null)
                {
                    frmczhz.MdiParent = _mdiParent;
                }
                frmczhz.Show();
                break;

            case "Fun_ts_zyhs_qfzx":
                FrmQFZX frmQFZX = new FrmQFZX();
                if (_mdiParent != null)
                {
                    frmQFZX.MdiParent = _mdiParent;
                }
                frmQFZX.Show();
                break;

            case "Fun_ts_zyhs_PvsCancelScn":
                FrmPvsCancelScn frmCcS = new FrmPvsCancelScn();
                if (_mdiParent != null)
                {
                    frmCcS.MdiParent = _mdiParent;
                }
                if (BCurrentDept.DeptId == 598)
                {
                    frmCcS.Show();
                }
                break;

            case "Fun_ts_zyhs_Ybznsh":
                FrmYbZnSh fymYbznsh = new FrmYbZnSh();
                fymYbznsh.Show();
                if (_mdiParent != null)
                {
                    fymYbznsh.MdiParent = _mdiParent;
                }
                break;

            case "Fun_ts_zyhs_Ybznsh_hs":
                FrmYbZnSh fymYbznshhs = new FrmYbZnSh(1);
                fymYbznshhs.Show();
                if (_mdiParent != null)
                {
                    fymYbznshhs.MdiParent = _mdiParent;
                }
                break;

            case "Fun_ts_zyhs_Ybznsh_SC":
                FrmYbZnSh fymYbznsh_SC = new FrmYbZnSh(true);
                fymYbznsh_SC.Show();
                if (_mdiParent != null)
                {
                    fymYbznsh_SC.MdiParent = _mdiParent;
                }
                break;

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