Exemplo n.º 1
0
 private void FrmRoleDlg_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         UserRoleTree functionTree = new UserRoleTree(this.systemtree);
         functionTree.ShowFunctionTree();
         //保存表格默认样式
         WindDataManager.SaveDefaltGridViewLayout(TCOM_ROLEgridView, this.Name);
         //恢复表格样式
         WindDataManager.RestoreGridViewLayout(TCOM_ROLEgridView, this.Name);
         //保存默认布局样式
         WindDataManager.SaveDefaltControlLayout(layoutControl1, this.Name);
         //恢复布局样式
         WindDataManager.RestoreControlLayout(layoutControl1, this.Name);
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 2
0
 private void FrmBusinessReg_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         WindDataManager.RestoreGridViewLayout(this.gridView1, this.Name);
         dstTCONF_WORD.FillComBoBox("注册进度", 注册进度ComboBox);
         dstTCONF_WORD.FillComBoBox("外勤进度", 外勤进度ComboBox);
         DataSet dst = dstTCONF_WORD.GetParaItems("外勤进度进出口");
         if (dst.Tables[0].Rows.Count > 0)
         {
             foreach (DataRow row in dst.Tables[0].Rows)
             {
                 外勤进度ComboBox.Items.Add(row["GROUPLISTITEM"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 3
0
 private void HyForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     //保存表格样式
     WindDataManager.SaveGridViewLayout(gridView1, this.Name);
     //保存布局样式
     WindDataManager.SaveControlLayout(layoutControl1, this.Name);
 }
Exemplo n.º 4
0
 private void FrmBusinessReg_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         WindDataManager.RestoreGridViewLayout(this.gridView1, this.Name);
         dstTCONF_WORD.FillComBoBox("注册进度", 注册进度ComboBox);
         dstTCONF_WORD.FillComBoBox("外勤进度", 外勤进度ComboBox);
         DataSet dst = dstTCONF_WORD.GetParaItems("外勤进度进出口");
         if (dst.Tables[0].Rows.Count > 0)
         {
             foreach (DataRow row in dst.Tables[0].Rows)
             {
                 外勤进度ComboBox.Items.Add(row["GROUPLISTITEM"].ToString());
             }
         }
         if (Security.UserBusiness.Contains("主管") || Security.UserBusiness.Contains("总经理") || Security.UserName.ToLower() == "admin")
         {
             layoutControlItem9.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
         }
         else
         {
             layoutControlItem9.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
         }
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TigerForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;


                m_DepartmentTree = new DepartmentTree(DepartmentTree);
                m_DepartmentTree.ShowTree();
                AddDepartmentItem     = new ToolStripMenuItem("添加根部门");
                LookCurrentDepartment = new ToolStripMenuItem("查看当前部门");
                ContextMenuStrip DepartmentMenu = m_DepartmentTree.FTreeView.ContextMenuStrip;
                AddDepartmentItem.Click     += new EventHandler(AddDepartmentItem_Click);
                LookCurrentDepartment.Click += new EventHandler(LookCurrentDepartment_Click);
                //保存表格默认样式
                WindDataManager.SaveDefaltGridViewLayout(gridView1, this.Name);
                //恢复表格样式
                WindDataManager.RestoreGridViewLayout(gridView1, this.Name);
                //保存默认布局样式
                //WindDataManager.SaveDefaltControlLayout(layoutControl1, this.Name);
                //恢复布局样式
                //WindDataManager.RestoreControlLayout(layoutControl1, this.Name);
            }
            catch (Exception ex)
            {
                UserMessages.ShowErrorBox(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 6
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;
            }
        }
Exemplo n.º 7
0
        private void btnDefaltStyle_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                Form frmActiveChild = this.ActiveMdiChild as Form;
                if (frmActiveChild != null)
                {
                    foreach (Control con in frmActiveChild.Controls)
                    {
                        //if (con.Focused)
                        //{

                        DevExpress.XtraGrid.GridControl view = con as DevExpress.XtraGrid.GridControl;
                        if (view != null)
                        {
                            DevExpress.XtraGrid.Views.Grid.GridView gview = view.Views[0] as DevExpress.XtraGrid.Views.Grid.GridView;
                            WindDataManager.RestoreDefaltGridViewLayout(gview, frmActiveChild.Name);
                        }
                        RestoreGridStyle(con, frmActiveChild);
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                UserMessages.ShowErrorBox(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 8
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         WindDataManager.SaveGridViewLayout(this.gridView1, this.Name);
     }
     catch (Exception ex)
     {
         UserMessages.ShowInfoBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// 导出数据
 /// </summary>
 private void ExportGridToFiles()
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         WindDataManager.ExportGrid(this.tB_EmployeeGridControl);
     }
     catch (Exception ex)
     {
         UserMessages.ShowErrorBox(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 10
0
 private void FrmClientSelectDlg_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         WindDataManager.RestoreGridViewLayout(gridView1, this.Name);
         selCsDataSet = new CsDataSet();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 11
0
 private void FrmAccountantSalary2021_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         yearSpinEdit.EditValue = DateTime.Today.AddMonths(-1).Year;
         monthComboBoxEdit.Text = DateTime.Today.AddMonths(-1).Month.ToString();
         WindDataManager.RestoreGridViewLayout(vW_AllAccountantSalaryGridview, this.Name);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 12
0
 private void FrmClientQuery_Load(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         dstTCONF_WORD.FillDevComboBox("公司性质", 公司性质ComboBoxEdit);
         dstTCONF_WORD.FillDevComboBox("公司类型", 公司类型ComboBoxEdit);
         dstTCONF_WORD.FillDevComboBox("客户分级", 客户分级ComboBoxEdit);
         WindDataManager.RestoreGridViewLayout(this.gridView1, this.Name);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 13
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pcon"></param>
 /// <param name="frm"></param>
 public void RestoreGridStyle(Control pcon, Form frm)
 {
     try
     {
         foreach (Control con in pcon.Controls)
         {
             DevExpress.XtraGrid.GridControl view = con as DevExpress.XtraGrid.GridControl;
             if (view != null)
             {
                 DevExpress.XtraGrid.Views.Grid.GridView gview = view.Views[0] as DevExpress.XtraGrid.Views.Grid.GridView;
                 WindDataManager.RestoreDefaltGridViewLayout(gview, frm.Name);
             }
             RestoreGridStyle(con, frm);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 14
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;
            }
        }
Exemplo n.º 15
0
 private void btnSaveLayout_Click(object sender, EventArgs e)
 {
     WindDataManager.SaveGridViewLayout(vW_AllAccountantSalaryGridview, this.Name);
 }