コード例 #1
0
        public void ShowWeekPlan(bool IsNew, clsControlWeekPlan clsObject)
        {
            this.clsWeek = clsObject;
            clsOPDoctorWkPlan_VO objPlan = null;

            IsDayPlan = false;
            clsRegisterType_VO[] clsRegType = null;
            this.IsNew = IsNew;
            SaveWeek   = clsObject.m_strGetWeek();
            SaveDepID  = clsObject.m_objViewer.m_TV.SelectedNode.Tag.ToString();
            if (!IsNew)
            {
                if ((string)clsObject.m_objViewer.m_TV.SelectedNode.Tag != "0000001")
                {
                    this.m_objViewer.txtOpdt.Enabled = false;
                }
                m_objViewer.m_txtDoc.Enabled = false;
                if (clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].Tag != null)
                {
                    objPlan         = (clsOPDoctorWkPlan_VO)clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].Tag;
                    this.SavePlanID = objPlan.m_strOPDrWkPlanID;
                }
                else
                {
                    this.m_Clear();
                    m_objViewer.ShowDialog();
                    return;
                }
                m_objViewer.m_txtDoc.Text     = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[2].Text;
                m_objViewer.m_txtDoc.Tag      = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[1].Text;
                this.m_objViewer.m_txtNum.Tag = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[0].Text;
                if (m_objViewer.m_cboRegType.Tag != null)
                {
                    clsRegType = (clsRegisterType_VO[])m_objViewer.m_cboRegType.Tag;
                }
                for (int i = 0; i < m_objViewer.m_cboRegType.Items.Count; i++)
                {
                    if (clsRegType[i].m_strRegisterTypeName == clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[3].Text)
                    {
                        m_objViewer.m_cboRegType.SelectedIndex = i;
                        break;
                    }
                }
                m_objViewer.m_cboPerio.Text = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[4].Text;
                string strTime = clsMain.IsNullToString(clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[5].Text, DateTime.Now.ToShortTimeString());
                m_objViewer.m_DtpStart.Value = Convert.ToDateTime(strTime);
                strTime = clsMain.IsNullToString(clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[6].Text, DateTime.Now.ToShortTimeString());
                m_objViewer.m_DtpEnd.Value    = Convert.ToDateTime(strTime);
                m_objViewer.m_txtRoom.Text    = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[7].Text;
                m_objViewer.m_txtNum.Text     = clsObject.m_objViewer.m_lvwPlan.SelectedItems[0].SubItems[8].Text;
                this.m_objViewer.txtOpdt.Text = objPlan.m_objOPDept.strDeptName;
                this.m_objViewer.txtOpdt.Tag  = objPlan.m_objOPDept.strDeptID;
            }
            TreeNode Tr;

            if (clsObject.m_objViewer.m_TV.Nodes.Count > 0)
            {
                Tr = (TreeNode)clsObject.m_objViewer.m_TV.Nodes[0].Clone();
                m_objViewer.m_TVDep.Nodes.Add(Tr);
            }
            if (IsNew)
            {
                this.m_objViewer.txtOpdt.Text = clsObject.m_objViewer.m_TV.SelectedNode.Text.Trim();
                this.m_objViewer.txtOpdt.Tag  = (string)clsObject.m_objViewer.m_TV.SelectedNode.Tag;
            }
            if ((string)clsObject.m_objViewer.m_TV.SelectedNode.Tag != "0000001")
            {
                m_objViewer.m_txtDoc.Focus();
            }
            TreeNode Tr1;

            if (clsObject.m_objViewer.m_TV.Nodes.Count > 0)
            {
                Tr1 = (TreeNode)clsObject.m_objViewer.m_TV.Nodes[0].Clone();
                m_objViewer.m_treelisv.Nodes.Add(Tr1);
            }
            m_objViewer.Cursor = Cursors.Default;
            m_objViewer.ShowDialog();
        }
コード例 #2
0
ファイル: frmAddPlan.cs プロジェクト: iamwsx05/HIS
        public void ShowWeekPlan(bool IsNew, clsControlWeekPlan clsObject)
        {
//			((clsControlAddPlan)this.objController).GetDepTV();
            ((clsControlAddPlan)this.objController).m_FillRegType();
            ((clsControlAddPlan)this.objController).ShowWeekPlan(IsNew, clsObject);
        }