Example #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;
            }
        }
Example #2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TigerForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                //AllowDelete = false;
                //设置数据源

                m_employeeTree = new EmployeeTree(tvEmployee);
                //显示树
                m_employeeTree.ShowTreeByImg();
                //加载列表信息
                LoadFromInfo();
                dstEmployee.TCOM_USER.EMPLOYEETYPEColumn.DefaultValue = "正式";
                dstEmployee.TCOM_USER.ENABLEColumn.DefaultValue       = true;
                //保存表格默认样式
                WindDataManager.SaveDefaltGridViewLayout(gdvEmployee, this.Name);
                //恢复表格样式
                WindDataManager.RestoreGridViewLayout(gdvEmployee, this.Name);
                //保存默认布局样式
                WindDataManager.SaveDefaltControlLayout(layoutControl1, this.Name);
                //恢复布局样式
                WindDataManager.RestoreControlLayout(layoutControl1, this.Name);
                dstTCONF_WORD.FillDevComboBox("薪资类型", WorkTypeComboBox);
                dstTCONF_WORD.FillDevComboBox("员工类型", EMPLOYEETYPEComboBox);
                dstEmployee.GetAllData();
                dstEmployee.GetAllUserName();
            }
            catch (Exception ex)
            {
                UserMessages.ShowErrorBox(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }