Exemple #1
0
        private void ReadSYSGRANTSFunctionInfo(object RoleID)
        {
            MenuInfoHelper menuInfoHelper = new MenuInfoHelper();
            DataTable      rolesMenuPri   = (new SysGrants()).GetRolesMenuPri(RoleID.ToString());

            for (int i = 0; i < rolesMenuPri.Rows.Count; i++)
            {
                DataRow  item     = rolesMenuPri.Rows[i];
                string   str      = Convert.ToString(item["GRANTOBJECT"]);
                MenuInfo menuInfo = menuInfoHelper.Load(str);
                if (menuInfo != null)
                {
                    string str1 = menuInfo.CAPTION.Trim();
                    if (str1.Length == 0)
                    {
                        str1 = menuInfo.NAME.Trim();
                    }
                    ListViewItem listViewItem = new ListViewItem(str1)
                    {
                        Tag = menuInfo
                    };
                    this.lvFunctions.Items.Add(listViewItem);
                }
            }
        }
Exemple #2
0
 public BulidMenuXMLByDB(string string_3)
 {
     this.string_0           = "";
     this.string_1           = "";
     this.sysGrants_0        = null;
     this.menuInfoHelper_0   = new MenuInfoHelper();
     this.dataProviderType_0 = DataProviderType.Sql;
     this.int_0              = 0;
     this.string_0           = string_3;
     this.sysGrants_0        = new SysGrants();
     this.dataProviderType_0 = DataProviderType.Sql;
     string[] strArray2 = ConfigurationManager.AppSettings["SYSPRIVDB"].Split(new string[] { "||" },
                                                                              StringSplitOptions.RemoveEmptyEntries);
     if ((strArray2[0].ToLower() == "sqlserver") || (strArray2[0].ToLower() == "sql"))
     {
         this.dataProviderType_0 = DataProviderType.Sql;
     }
     else if (strArray2[0].ToLower() == "oracle")
     {
         this.dataProviderType_0 = DataProviderType.Oracle;
     }
     else if (strArray2[0].ToLower() == "oledb")
     {
         this.dataProviderType_0 = DataProviderType.OleDb;
     }
     else if (strArray2[0].ToLower() == "odbc")
     {
         this.dataProviderType_0 = DataProviderType.Odbc;
     }
     else if (strArray2[0].ToLower() == "access")
     {
         this.dataProviderType_0 = DataProviderType.Access;
     }
     this.string_2 = strArray2[1];
 }