在datagrid字段中的form2上,我有「admin」,它是一個複選框。當我從form1 調用form2時,首先要檢查該用戶(已登錄)是否在域「admin」中進行了檢查。 如果是,則授予用戶對form2的訪問權,否則返回form1,並帶有一個消息框,說明用戶無權訪問。如果複選框在C#中的數據網格中被選中
檢查「if has checked」是否在form2加載?
編輯:能不能做到像:
form1:
call form2 function test
form2:
function test that checks if the current user has checked the checkbox in the datagrid
總之,應該在form2上。問題是我無法檢查是否在加載時檢查複選框,因爲datagrid正在同一時間填充。所以它應該在此之後,但仍然不應該顯示該窗體(form2),如果這個用戶(登錄一個)沒有管理權限。 – djuvec123 2011-06-14 21:15:24