private void getAuthorization() { int MenuId = 0; int iResult, uResult, dResult; string idStr = Request.QueryString["M_Id"]; if (idStr != null) MenuId = Convert.ToInt32(idStr); I_Option = true; U_Option = true; D_Option = true; if (MenuId > 0) { cls_Menu_Employees mEmp = new cls_Menu_Employees(); mEmp.MenuId = MenuId; mEmp.EmployeeId = Convert.ToInt32(Session["UserId"].ToString()); mEmp.CheckAllOptions(out iResult, out uResult, out dResult); if (iResult > 0) I_Option = true; else I_Option = false; if (uResult > 0) U_Option = true; else U_Option = false; if (dResult > 0) D_Option = true; else D_Option = false; } I_Option = true; U_Option = true; D_Option = true; }
private void CheckAuThority(int IDUser,int IDGroup) { try { //RadTreeNode objTreeNode = default(RadTreeNode); cls_Menu_Employees objU = new cls_Menu_Employees(); dtMenuUser = objU.GetAuthorityUser(IDUser, IDGroup); RadTreeNode objTemp = trFunction.Nodes[0]; objTemp.Checked = false; UnCheckNodeCon(objTemp); bool OK = false; CheckFunctionTree(objTemp, dtMenuUser,ref OK); if (OK) trFunction.Nodes[0].Checked = true; } catch (Exception ex) { } }