Exemplo n.º 1
0
        private void lb_role_Click(object sender, EventArgs e)
        {
            UserRoleADD uradd = new UserRoleADD();

            uradd.rbool             = true;
            uradd.YesNoBoolRoleUser = false;
            mf.ShowChildForm(uradd);
        }
        private void btn_SetUpDefaultTemplate_Click(object sender, EventArgs e)
        {
            try
            {
                if (btn_SetUpDefaultTemplate.Enabled)
                {
                    btn_SetUpDefaultTemplate.Enabled = false;
                }
                Save();
                SystemSet ss = new SystemSet();
                ss.InitComName();
                mf = new MainFrom();
                //ss.tabControlIndex = 2;
                ss.tabControl1.SelectedIndex = 2;
                mf.ShowChildForm(ss);

                this.Close();
            }
            catch (Exception ex)
            {
                Common.WriteTextLog("PrintTemplateSetUpForm.btn_SetUpDefaultTemplate_Click()" + ex.Message.ToString());
            }
            finally
            {
                btn_SetUpDefaultTemplate.Enabled = true;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 权限设置
        /// </summary>
        /// <param name="?"></param>
        private void tsl_Role_Click()
        {
            try
            {
                if (lvwUserList.SelectedRows.Count > 0)//选择行
                {
                    if (lvwUserList.SelectedRows.Count > 1)
                    {
                        MessageBox.Show("只能选择一行进行权限设置", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        if (lvwUserList.SelectedRows[0].Cells["Userid"].Value == null)
                        {
                            return;
                        }
                        if (lvwUserList.SelectedRows[0].Cells["Role_Id"].Value == null)
                        {
                            return;
                        }

                        if (Common.GetInt(lvwUserList.SelectedRows[0].Cells["Userid"].Value.ToString()) > 0)
                        {
                            UserRoleADD uradd = new UserRoleADD();
                            uradd.YesNoBoolRoleUser = true;
                            uradd.rbool             = false;
                            Common.UserID           = Common.GetInt(lvwUserList.SelectedRows[0].Cells["Userid"].Value.ToString());
                            Common.RoleID           = Common.GetInt(lvwUserList.SelectedRows[0].Cells["Role_Id"].Value.ToString());
                            mf.ShowChildForm(uradd);
                            //uradd.ShowDialog();
                        }
                    }
                }
                else
                {
                    MessageBox.Show("请选择行", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                Common.WriteTextLog("UserRole.tsl_Role_Click()" + ex.Message.ToString());
            }
        }
 private void btn_Route_Click(object sender, EventArgs e)
 {
     try
     {
         if (btn_Route.Enabled)
         {
             btn_Route.Enabled = false;
         }
         PrintTemplateSetUpForm ptsuf = new PrintTemplateSetUpForm();
         mf = new MainFrom();
         mf.ShowChildForm(ptsuf);
     }
     catch (Exception ex)
     {
         Common.WriteTextLog("SystemSet.btn_Route_Click()" + ex.Message.ToString());
     }
     finally
     {
         btn_Route.Enabled = true;
     }
 }