Beispiel #1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TigerForm_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                //设置数据源

                m_UserTree = new EmployeeTree(UserTree);
                //显示用户树
                m_UserTree.ShowTree();


                //保存表格默认样式
                WindDataManager.SaveDefaltGridViewLayout(gridView2, this.Name);
                //恢复表格样式
                WindDataManager.RestoreGridViewLayout(gridView2, this.Name);
                //保存默认布局样式
                WindDataManager.SaveDefaltControlLayout(layoutControl1, this.Name);
                //恢复布局样式
                WindDataManager.RestoreControlLayout(layoutControl1, this.Name);
            }
            catch (Exception ex)
            {
                UserMessages.ShowErrorBox(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Beispiel #2
0
 /// <summary>
 /// 保存数据
 /// </summary>
 private void DoSaveData()
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         gdvEmployee.PostEditor();
         this.dstEmployee.Save();
         gdvEmployee.BestFitColumns();
         m_employeeTree.ShowTree();
     }
     catch (Exception ex)
     {
         UserMessages.ShowErrorBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }