/// <summary> /// metod za prikaz na site funkcii po korisnik. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void RoleFunctionsList_DataBound(object sender, EventArgs e) { if (IsPostBack) { List <int> functions = new List <int>(); foreach (ListItem item in RoleFunctionsList.Items) { item.Selected = true; functions.Add(Convert.ToInt32(item.Value)); } bool[] enabled = new bool[functions.Count]; int userId = Convert.ToInt32(ddlUsers.SelectedValue); UserManagementController.fillEnabled(userId, enabled, functions); int c = 0; foreach (ListItem item in RoleFunctionsList.Items) { item.Enabled = enabled[c++]; } } }