private void frmMain_Load(object sender, EventArgs e)
        {
            if (dsMeunData != null)
            {
                //��ǰ�û�
                //BWS.ERP.Security.SecurityCenter.CurrentUserID = "admin";

                #region �˵����
                //��ʼ���˵�
                initMenu(dsMeunData);
                #endregion

                #region �ײ�״̬����ʾ

                //�ײ�״̬����ʾ
                barServerName.Caption = "������:" + BWS.ERP.BaseControl.ConnectSetting.GetAppConfig("ServerName", true);
                barDataBase.Caption = "���ݿ�:" + BWS.ERP.BaseControl.ConnectSetting.GetAppConfig("DataBase", true);
                barDate.Caption = "����:" + DateTime.Now.Date.ToString("yyyy��MM��dd") + " " + BWS.ERP.BasePublic.SysPublic.ChsWeek(DateTime.Now.Date) + " ũ��:" + BWS.ERP.BasePublic.SysPublic.CNDate();
                barUserName.Caption = "�û�:" + BWS.ERP.Security.SecurityCenter.CurrentUserName;
                barDeptName.Caption = "�������:" + BWS.ERP.Security.SecurityCenter.CurrentDeptName;
            }
            else
            {
                pnlMenu.Width = 0;
                frmLogin frm = new frmLogin();
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    firstExit = true;
                }
                else
                {
                    this.Close();
                }
            }

            //���汳��
            if (System.IO.File.Exists(BWS.ERP.BaseControl.ConnectSetting.GetAppConfig("BackImg", false)))
            {
                picBack.Image = Image.FromFile(BWS.ERP.BaseControl.ConnectSetting.GetAppConfig("BackImg", false));
            }

            #endregion
        }
 //#region ��ӡ���öԻ��� protected virtual PrinterSettings ShowPrintSetupDialog(PrintDocument printDocument)
 //protected virtual PrinterSettings ShowPrintSetupDialog(PrintDocument printDocument)
 //{
 //    //��������ֵ��PrinterSettings
 //    PrinterSettings ps = new PrinterSettings();
 //    if (printDocument == null)
 //    {
 //        //throw new Exception("�����Ĵ�ӡ�ĵ�����Ϊ�գ�");
 //    }
 //    try
 //    {
 //        //������ʵ����PrintDialog
 //        PrintDialog pDlg = new PrintDialog();
 //        //����ѡ��ҳ
 //        pDlg.AllowSomePages = true;
 //        //ָ����ӡ�ĵ�
 //        pDlg.Document = printDocument;
 //        //��ʾ�Ի���
 //        DialogResult result = pDlg.ShowDialog();
 //        if (result == DialogResult.OK)
 //        {
 //            //�����ӡ����
 //            ps = pDlg.PrinterSettings;
 //            //��ӡ
 //            //printDocument.Print();
 //        }
 //    }
 //    catch (System.Drawing.Printing.InvalidPrinterException e)
 //    {
 //        MessageBox.Show("δ��װ��ӡ���������ϵͳ���������Ӵ�ӡ����", "��ӡ", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 //    }
 //    return ps;
 //}
 //#endregion
 private void barRelogin_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (this.MdiChildren.Length > 0)
     {
         BWS.ERP.BaseControl.Public.SystemInfo("���ȹر����д򿪵Ĵ��壡");
     }
     else
     {
         this.Hide();
         frmLogin frm = new frmLogin(true);
         frm.ShowDialog();
         this.Close();
     }
 }