コード例 #1
0
ファイル: MainWindow.cs プロジェクト: zeus911/tale
 protected void SetUserAuthTypes(bool authType)
 {
     try
     {
         this.manageResultTextBox.Clear();
         foreach (DataGridViewRow row in allUserListDataGridView.Rows)
         {
             if (Convert.ToBoolean(row.Cells[0].Value))
             {
                 if (UserAuthObj.QueryUserAuthType(row.Cells[2].Value.ToString()) == authType)
                 {
                     this.manageResultTextBox.Text += row.Cells[1].Value.ToString() + " 没有变化." + Environment.NewLine;
                 }
                 else
                 {
                     UserAuthObj.SetUserAuthType(row.Cells[2].Value.ToString(), authType);
                     this.manageResultTextBox.Text += row.Cells[1].Value.ToString() + " 设置成功." + Environment.NewLine;
                 }
             }
         }
     }
     catch (COMException ex)
     {
         this.manageResultTextBox.Text = ex.Message;
     }
     finally
     {
         LoadAllRtxUsers();
     }
 }
コード例 #2
0
ファイル: RTX.cs プロジェクト: 080779/myProject
        public void GetUserType(string username)
        {
            CreateRoot();
            bool BAuthType;

            try
            {
                BAuthType = UserAuthObj.QueryUserAuthType(username);

                //if (BAuthType == true)
                //    MessageBox.Show(username + " 的认证方式为第三方认证");
                //else
                //    MessageBox.Show(username + " 的认证方式为RTX系统本地认证");
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }