Exemplo n.º 1
0
 /// <summary>
 /// 窗体加载事件
 /// </summary>
 private void FrmApprovalList_Load(object sender, EventArgs e)
 {
     try
     {
         FrmCommonDAO commonDAO = new FrmCommonDAO();
         repItemLookUpTypeNo.DataSource   = commonDAO.QueryApprovalType(false);
         repItemLookUpApprover.DataSource = commonDAO.QueryUserInfo_OnlyColumn(false);
     }
     catch (Exception ex)
     {
         //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
         ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
     }
 }
Exemplo n.º 2
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            string moduleNoStr   = "123";
            string moduleNameStr = "测试模块";

            if (!FrmCommonDAO.CheckModuleAuthority(moduleNoStr, moduleNameStr))
            {
                MessageHandler.ShowMessageBox("我没有[" + moduleNameStr + "]权限");
            }
            else
            {
                MessageHandler.ShowMessageBox("我有[" + moduleNameStr + "]权限");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmApprovalList_Load(object sender, EventArgs e)
        {
            try
            {
                FrmCommonDAO commonDAO = new FrmCommonDAO();
                repItemLookUpTypeNo.DataSource   = commonDAO.QueryApprovalType(false);
                repItemLookUpApprover.DataSource = commonDAO.QueryUserInfo(false);

                if (editForm == null)
                {
                    editForm = new FrmBaseEdit();
                    editForm.FormBorderStyle     = FormBorderStyle.None;
                    editForm.TopLevel            = false;
                    editForm.TableName           = "PUR_ApprovalList";
                    editForm.TableCaption        = "审批信息设置";
                    editForm.Sql                 = string.Format("select * from PUR_ApprovalList where typeNo='{0}' Order by AppSequence", TypeNoStr);
                    editForm.PrimaryKeyColumn    = "AutoId";
                    editForm.MasterDataSet       = dSApprovalList;
                    editForm.MasterBindingSource = bSApprovalList;
                    //editForm.MasterEditPanel = pnlEdit;
                    editForm.BrowseXtraGridView = gridViewApprovalList;
                    editForm.CheckControl      += CheckControl;
                    editForm.SaveRowBefore     += SaveRowBefore;
                    editForm.DeleteRowBefore   += DeleteRowBefore;
                    editForm.ButtonList.Add(btnUp);
                    editForm.ButtonList.Add(btnDown);
                    editForm.DeleteAfterRefresh = true;
                    //editForm.btnSaveExcel.Visible = false;
                    editForm.VisibleSearchContrl = false;
                    this.pnlToolBar.Controls.Add(editForm);
                    editForm.Dock = DockStyle.Fill;
                    editForm.Show();
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }