Beispiel #1
0
 private void m_cboDept_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     this.m_cboArea.Items.Clear();
     clsInPatientArea[] objAreaArr;
     m_objDepartmentManager.m_lngGetAllAreaInDept(((clsDepartment)(this.m_cboDept.SelectedItem)).m_StrDeptID, out objAreaArr);
     if (objAreaArr != null)
     {
         this.m_cboArea.Items.AddRange(objAreaArr);
         this.m_cboArea.SelectedIndex = 0;
     }
     this.Cursor = Cursors.Default;
 }
Beispiel #2
0
        private void m_txtSickArea_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (this.m_txtDept.Tag == null)
            {
                MessageBox.Show("必须选择科室");
                return;
            }
            if (e.KeyCode == Keys.Enter)
            {
                clsInPatientArea[] objAreaArr;
                m_objDepartmentManager.m_lngGetAllAreaInDept((string)this.m_txtDept.Tag, out objAreaArr);
                if (objAreaArr == null || objAreaArr.Length <= 0)
                {
                    m_blnIsHasArea = false;
                    return;
                }
                else
                {
                    m_blnIsHasArea = true;
                }

                this.HeaderName.Text = "病区名称";
                this.lsvInfo.Name    = "Area";
                this.lsvInfo.Columns.Clear();
                this.lsvInfo.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.HeaderName });
                this.groupBox1.Controls.Add(this.lsvInfo);
                #region
                this.lsvInfo.Size       = new System.Drawing.Size(152, 200);
                this.lsvInfo.Location   = new System.Drawing.Point(288, 69);
                this.lsvInfo.View       = System.Windows.Forms.View.Details;
                this.lsvInfo.GridLines  = true;
                this.lsvInfo.Scrollable = true;
                this.lsvInfo.Items.Clear();
                if (objAreaArr.Length > 0)
                {
                    for (int i = 0; i < objAreaArr.Length; i++)
                    {
                        System.Windows.Forms.ListViewItem lsvItem = new ListViewItem(objAreaArr[i].m_StrAreaName);
                        lsvItem.Tag = objAreaArr[i];
                        this.lsvInfo.Items.Add(lsvItem);
                    }
                }
                this.lsvInfo.Show();
                this.lsvInfo.Visible = true;
                this.lsvInfo.BringToFront();
                this.lsvInfo.Focus();
                #endregion
            }
        }