コード例 #1
0
        /// <summary>
        /// 主界面构造函数1,根据配置文件的设置,初始化可停靠窗体
        /// </summary>
        /// <param name="user"></param>
        public frmMainForm(IModel user)
        {
            InitializeComponent();
            this.Text        = GetConfig.HospitalName;
            this.frmDockList = new List <DockForm>();
            myMainForm       = this;
            iUser            = user;
            Extender.SetSchema(this.dockPanel, BaseControls.Docking.Extender.Schema.FromBase);
            m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);
            if (GetConfig.DALAndModel == "SIS")
            {
                SIS_Model.MUser muser = (SIS_Model.MUser)iUser;
                this.tssl_User.Text = muser.DOCTOR_NAME;
                this.tssl_Dept.Text = muser.CLINIC_OFFICE;
                BuildStruct();
                this.initExamInfText();
                iGather = (frmImageGather)this.SetFormDisplay("图像采集", "SIS.frmImageGather");
                qQuery  = (frmQuickQuery)this.SetFormDisplay("快速查询", "SIS.frmQuickQuery");
            }
            else
            {
                PACS_Model.MUser muser = (PACS_Model.MUser)iUser;
                this.tssl_User.Text    = muser.USER_NAME;
                this.tssl_Dept.Text    = muser.DEPT_NAME;
                this.p_Patient.Visible = false;
                switch (GetConfig.SystemType)
                {
                case "DeptManage":
                    BuildStructPacsDeptManage();
                    break;

                case "Register":
                    BuildStructPacs();
                    qQuery = (frmQuickQuery)this.SetFormDisplay("快速查询", "SIS.frmQuickQuery");
                    break;

                case "QualityControl":
                    BuildStructPacsQualityControl();
                    break;
                }
            }
            this.timer_Main.Start();
            string configFile = Application.StartupPath + "\\Config\\MainDockPanel.config";

            if (File.Exists(configFile))
            {
                dockPanel.LoadFromXml(configFile, m_deserializeDockContent);
            }
            for (int i = 0; i < this.frmDockList.Count; i++)
            {
                if (!frmDockList[i].isShow)
                {
                    frmDockList[i].frmDock.Show(this.dockPanel, BaseControls.Docking.DockState.DockLeft);
                }
            }
        }
コード例 #2
0
ファイル: frmLogin.cs プロジェクト: xuanximoming/PIC
 /// <summary>
 /// 作用:进入锁定界面后,对工号和密码的初始化。
 /// 思路:将当前登录用户的ID赋值,密码清空。
 /// </summary>
 /// <param name="iuser"></param>
 public void initData(IModel iuser)
 {
     this.user = iuser;
     if (GetConfig.DALAndModel == "SIS")
     {
         SIS_Model.MUser muser = (SIS_Model.MUser)iuser;
         this.txt_DoctorId.Text = muser.DOCTOR_ID;
     }
     else
     {
         PACS_Model.MUser muser = (PACS_Model.MUser)iuser;
         this.txt_DoctorId.Text = muser.DB_USER;
     }
     this.txt_Pwd.Text = "";
 }
コード例 #3
0
        /// <summary>
        /// 动态夹杂着子系统模块,超声科
        /// </summary>
        private void BuildStruct()//动态加载子系统模块
        {
            if (GetConfig.SystemType.ToUpper() == "REGISTER")
            {
                BuildStructPacs();
            }
            else
            {
                BSystemFun BSysFun = new BSystemFun();
                MSystemFun MsysFun = new MSystemFun();

                DataTable       dt    = new DataTable();
                SIS_Model.MUser muser = (SIS_Model.MUser)iUser;

                switch (muser.DOCTOR_ROLE)
                {
                case "1":
                    dt = BSysFun.GetList(" MODEL_CLASS='1' AND UP_MODEL_ID=0 AND MODEL_NAME ='检查登记' ORDER BY SORT_FLAG ");
                    break;

                case "2":
                    dt = BSysFun.GetList(" MODEL_CLASS='1' AND UP_MODEL_ID=0 ORDER BY SORT_FLAG ");
                    break;
                }
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        frmDockForm tsl = new frmDockForm();
                        tsl.DockHandler.GetPersistStringCallback = null;
                        tsl.DockHandler.PersistString            = dt.Rows[i]["MODEL_ID"].ToString();
                        tsl.Name = dt.Rows[i]["MODEL_ID"].ToString();//将目录ID设置为名称
                        tsl.Tag  = "SIS.comm.ToolboxPanel";
                        tsl.Text = dt.Rows[i]["MODEL_NAME"].ToString();
                        if (dt.Rows[i]["IMAGE_ADDRESS"].ToString() != "")
                        {
                            tsl.Icon = new Icon(Application.StartupPath + "\\images\\" + dt.Rows[i]["IMAGE_ADDRESS"].ToString());
                        }
                        tsl.p = this.p_Sub;
                        DockForm df = new DockForm();
                        df.frmDock = tsl;
                        df.isShow  = false;
                        this.frmDockList.Add(df);
                    }
                }
            }
        }
コード例 #4
0
        /// <summary>
        /// 绑定检查组(诊室)
        /// </summary>
        public void Bind_ExamGroup(ComboBox cmb_ExamGroup, IModel iUser, bool isAddBlank)
        {
            BDeptVsQueue bDeptVsQueue = new BDeptVsQueue();

            SIS_Model.MUser mUser = (SIS_Model.MUser)iUser;
            DataTable       dt    = bDeptVsQueue.GetList("DEPT_CODE = '" + mUser.CLINIC_OFFICE_CODE + "'");

            if (isAddBlank)
            {
                DataRow dr = dt.NewRow();
                dr["QUEUE_ID"]   = 0;
                dr["DEPT_CODE"]  = "";
                dr["QUEUE_NAME"] = "";
                dt.Rows.InsertAt(dr, 0);
            }
            cmb_ExamGroup.DataSource    = dt;
            cmb_ExamGroup.DisplayMember = dt.Columns["QUEUE_NAME"].ColumnName;
        }
コード例 #5
0
        /// <summary>
        /// 绑定科室
        /// </summary>
        private void DeptBind()
        {
            this.cmb_Dept.DataSource = bDept.GetList(" 1=1 ");
            string ExamDept = "";

            if (GetConfig.DALAndModel == "SIS")
            {
                this.cmb_Dept.DisplayMember = "CLINIC_OFFICE";
                this.cmb_Dept.ValueMember   = "CLINIC_OFFICE_CODE";
                SIS_Model.MUser smUser = (SIS_Model.MUser) this.iUser;
                ExamDept = smUser.CLINIC_OFFICE_CODE;
            }
            else
            {
                this.cmb_Dept.DisplayMember = "DEPT_NAME";
                this.cmb_Dept.ValueMember   = "DEPT_CODE";
                PACS_Model.MUser pmUser = (PACS_Model.MUser) this.iUser;
                ExamDept = pmUser.USER_DEPT;
            }
            this.cmb_Dept.SelectedValue = ExamDept;
        }
コード例 #6
0
ファイル: frmLogin.cs プロジェクト: xuanximoming/PIC
        /// <summary>
        /// 作用:执行解锁验证。
        /// 思路:将登录成功的用户信息与输入的密码判断。
        /// </summary>
        private void Check()
        {
            string pwd = "";

            if (GetConfig.DALAndModel == "SIS")
            {
                SIS_Model.MUser muser = (SIS_Model.MUser)user;
                pwd = muser.DOCTOR_PWD;
            }
            else
            {
                PACS_Model.MUser muser = (PACS_Model.MUser)user;
                pwd = muser.USER_PWD;
            }
            if (this.txt_Pwd.Text == pwd)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBoxEx.Show("密码错", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #7
0
ファイル: frmLogin.cs プロジェクト: xuanximoming/PIC
 /// <summary>
 /// 作用:对登录用户的身份验证。
 /// 思路:对输入的用户工号和密码,实例化一个用户,并查询数据库用户表
 /// </summary>
 /// <returns></returns>
 private bool CheckUser()
 {
     if (GetConfig.DALAndModel == "SIS")
     {
         SIS_Model.MUser muser = (SIS_Model.MUser)user;
         muser.DOCTOR_ID  = this.txt_DoctorId.Text.Trim().ToString();
         muser.DOCTOR_PWD = this.txt_Pwd.Text.Trim().ToString();
     }
     else
     {
         PACS_Model.MUser muser = (PACS_Model.MUser)user;
         muser.DB_USER  = this.txt_DoctorId.Text.Trim().ToString();
         muser.USER_PWD = this.txt_Pwd.Text.Trim().ToString();
     }
     try
     {
         return(new BUser().Exists(user));
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message);
         return(false);
     }
 }