示例#1
0
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            Form f = null;

            switch (_functionName)
            {
            case "Fun_ts_mzys_blcflr_lscx":
                Frmblcf_cx Frmblcf_cx = new Frmblcf_cx(_menuTag, _chineseName, _mdiParent, new Guid(CommunicateValue[0].ToString()), Guid.Empty);

                if (_mdiParent != null)
                {
                    Frmblcf_cx.MdiParent = _mdiParent;
                }
                //Frmblcf_cx.Show();
                f = Frmblcf_cx;
                break;

            case "Fun_ts_mzys_blcflr_zyz":
                Frmzyz Frmzyz = new Frmzyz(_menuTag, _chineseName, _mdiParent, new Guid(CommunicateValue[0].ToString()), Convert.ToInt32(CommunicateValue[1]));
                f = Frmzyz;
                break;

            case "Fun_ts_mztfsh":
            case "Fun_ts_mztfsq_ys":    //add by zouchihua 2014-9-14 医生申请也可以挂菜单
                Frm_TF_Apply frm_tfsq = new Frm_TF_Apply(_menuTag, _chineseName, _mdiParent);
                f = frm_tfsq;
                break;

            case "Fun_ts_mztfsq_hj":    //add by zouchihua 2014-9-14 如果是划价的话,也可以挂菜单
                Frm_TF_Apply frm_tfsq1 = new Frm_TF_Apply(_menuTag, _chineseName, _mdiParent);
                f = frm_tfsq1;
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(f);
        }
示例#2
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }

            switch (_functionName)
            {
            case "Fun_ts_mzys_blcflr":
            case "Fun_ts_mzys_blcflr_grmb":
            case "Fun_ts_mzys_blcflr_kjmb":
            case "Fun_ts_mzys_blcflr_yjmb":
            case "Fun_ts_mzys_blcflr_xdcf_yj":
            case "Fun_ts_mzys_blcflr_xdcf_kj":
            case "Fun_ts_zyys_blcflr":
                DateTime djsj = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                //验证科室是否需要分诊
                string    ssql          = "select * from MZYS_FZKS where ksdm=" + InstanceForm.BCurrentDept.DeptId + "";
                bool      IsSelect_Room = IsSelectRoom(djsj);
                DataTable tbks          = InstanceForm.BDatabase.GetDataTable(ssql);
                if (tbks.Rows.Count == 0 || (!IsSelect_Room) || (_functionName != "Fun_ts_zyys_blcflr" && _functionName != "Fun_ts_mzys_blcflr"))
                {
                    Frmblcf Frmhjsf = new Frmblcf(_menuTag, _chineseName, _mdiParent, 0);
                    if (_mdiParent != null)
                    {
                        Frmhjsf.MdiParent = _mdiParent;
                    }
                    Frmhjsf.Show();
                    return;
                }
                //如果需要分诊
                SystemCfg cg = new SystemCfg(3001);
                ssql = "select * from jc_zjsz where wkdz='" + PubStaticFun.GetMacAddress() + "'";
                DataTable tbjz = InstanceForm.BDatabase.GetDataTable(ssql);
                //判断是否启用分时段叫号系统 如果未启用则用老的选择诊室模式 Modify By zp 2013-06-18
                if (new SystemCfg(3070).Config == "1")
                {
                    #region 未用新分诊系统 则用老的模式选择诊室
                    if (tbjz.Rows.Count == 1)
                    {
                        if (Convert.ToInt16(cg.Config) == 0)
                        {
                            ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ", wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                        }
                        else
                        {
                            ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ",wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' , ksdm=" + InstanceForm.BCurrentDept.DeptId + " where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                        }
                        InstanceForm.BDatabase.DoCommand(ssql);

                        Frmblcf Frmhjsf = new Frmblcf(_menuTag, _chineseName, _mdiParent, Convert.ToInt32(tbjz.Rows[0]["zjid"]));
                        if (_mdiParent != null)
                        {
                            Frmhjsf.MdiParent = _mdiParent;
                        }
                        Frmhjsf.Show();
                        break;
                    }
                    else
                    {
                        Frmzjqr f = new Frmzjqr(_menuTag, _chineseName, _mdiParent);
                        f.ShowDialog();
                        break;
                    }
                    #endregion
                }
                else
                {
                    #region 启用新分诊系统
                    if (tbjz.Rows.Count == 1 && int.Parse(Convertor.IsNull(tbjz.Rows[0]["ZZYS"], "-1")) == InstanceForm.BCurrentUser.EmployeeId &&
                        int.Parse(Convertor.IsNull(tbjz.Rows[0]["KSDM"], "-1")) == InstanceForm.BCurrentDept.DeptId)        //得到结果后需要判断诊室记录的科室代码和医生代码与当前坐诊科室、坐诊医生是否一致
                    {
                        if (Convert.ToInt16(cg.Config) == 0)
                        {
                            ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ", wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                        }
                        else
                        {
                            ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ",wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' , ksdm=" + InstanceForm.BCurrentDept.DeptId + " where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                        }
                        InstanceForm.BDatabase.DoCommand(ssql);

                        Frmblcf Frmhjsf = new Frmblcf(_menuTag, _chineseName, _mdiParent, Convert.ToInt32(tbjz.Rows[0]["zjid"]));
                        if (_mdiParent != null)
                        {
                            Frmhjsf.MdiParent = _mdiParent;
                        }
                        Frmhjsf.Show();
                        break;
                    }
                    else      //通过参数3065决定诊室选择模式
                    {
                        DataTable dt = BindRoom();
                        Frmzjqr   f  = new Frmzjqr(_menuTag, _chineseName, _mdiParent, dt);
                        f.ShowDialog();
                        break;
                    }
                    #endregion
                }
                #region 注释代码 Modify By zp 2013-07-09
                //if (tbjz.Rows.Count == 1)
                //{
                //    if (Convert.ToInt16(cg.Config) == 0)
                //        ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ", wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                //    else
                //        ssql = "update jc_zjsz set BDLBZ=1,ZZYS=" + InstanceForm.BCurrentUser.EmployeeId.ToString() + ",wkdz='" + PubStaticFun.GetMacAddress() + "',dlsj='" + djsj.ToString() + "' , ksdm=" + InstanceForm.BCurrentDept.DeptId + " where zjid=" + tbjz.Rows[0]["zjid"].ToString() + " ";
                //    InstanceForm.BDatabase.DoCommand(ssql);

                //    Frmblcf Frmhjsf = new Frmblcf(_menuTag, _chineseName, _mdiParent, Convert.ToInt32(tbjz.Rows[0]["zjid"]));
                //    if (_mdiParent != null)
                //    {
                //        Frmhjsf.MdiParent = _mdiParent;
                //    }
                //    Frmhjsf.Show();
                //    break;
                //}
                //else
                //{
                //    Frmzjqr f = new Frmzjqr(_menuTag, _chineseName, _mdiParent);
                //    f.ShowDialog();
                //    break;
                //}
                #endregion
            case "Fun_ts_mzys_jzlscx":
            case "Fun_ts_mzys_jzlscx_all":
                Frmjzlscx Frmjzlscx = new Frmjzlscx(_menuTag, _chineseName, _mdiParent);

                if (_mdiParent != null)
                {
                    Frmjzlscx.MdiParent = _mdiParent;
                }
                Frmjzlscx.Show();
                break;

            case "Fun_ts_mzys_blcflr_wtsq":
                Frmwtsqcx Frmwtsqcx = new Frmwtsqcx(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    Frmwtsqcx.MdiParent = _mdiParent;
                }
                Frmwtsqcx.Show();
                break;

            case "Fun_ts_mzys_zymbwh":
                FrmZyMbWh frmzymbwh = new FrmZyMbWh(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    frmzymbwh.MdiParent = _mdiParent;
                }
                frmzymbwh.Show();
                break;

            case "Fun_ts_mztfsh":
            case "Fun_ts_mztfsq_ys":    //add by zouchihua 2014-9-14 医生申请也可以挂菜单
                Frm_TF_Apply frm_tfsq = new Frm_TF_Apply(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    frm_tfsq.MdiParent = _mdiParent;
                }
                frm_tfsq.Show();
                break;

            case "Fun_ts_mztfsq_hj":    //add by zouchihua 2014-9-14 如果是划价的话,也可以挂菜单
                Frm_TF_Apply frm_tfsq1 = new Frm_TF_Apply(_menuTag, _chineseName, _mdiParent);
                frm_tfsq1.Show();
                break;

            case "Fun_ts_mzys_yyjbsh":
                用药级别审核 Frmyyjbsh = new 用药级别审核(_menuTag, _chineseName, _mdiParent);

                if (_mdiParent != null)
                {
                    Frmyyjbsh.MdiParent = _mdiParent;
                }
                Frmyyjbsh.Show();
                break;

            case "Fun_ts_zyzCx":
                frmZyzCx frmActon = new frmZyzCx();
                if (frmActon != null)
                {
                    frmActon.MdiParent = _mdiParent;
                }
                frmActon.Show();
                frmActon.WindowState = FormWindowState.Maximized;
                break;

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