예제 #1
0
        /// <summary>
        /// 窗体载入
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormClient_Load(object sender, EventArgs e)
        {
            if (!m_clientServer.GetAllClient(out m_findClient, out m_err))
            {
                MessageDialog.ShowErrorMessage(m_err);
                return;
            }

            RefreshDataGridView(m_findClient);

            dataGridView1.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dataGridView1.Columns[2].Visible      = false;
        }
예제 #2
0
        /// <summary>
        /// 窗体载入
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UserControlClient_Load(object sender, EventArgs e)
        {
            if (!m_clientServer.GetAllClient(out m_findClient, out m_err))
            {
                MessageDialog.ShowErrorMessage(m_err);
                return;
            }

            RefreshDataGridView(m_findClient);

            txtCode.Focus();

            // 添加数据定位控件
            if (m_dataLocalizer == null)
            {
                m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name,
                                                               UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));
                this.panelPara.Controls.Add(m_dataLocalizer);
                m_dataLocalizer.Dock    = DockStyle.Bottom;
                m_dataLocalizer.Visible = true;
            }
        }