protected internal void GetFormAccess() { //SecurityManager manager = new SecurityManager(); FormAccessRights obj = new FormAccessRights(); String formName = string.Empty; #if DEBUG { formName = Request.Url.AbsolutePath; } #else { formName = Request.Url.AbsolutePath.Replace(@"/ERP", ""); } #endif try { if ((bool)HttpContext.Current.Session[SessionConstants.IsAdmin] == true) { accessRights = new FormAccessRights { CanSelect = true, CanInsert = true, CanUpdate = true, CanDelete = true, CanSend = true, CanCheck = true, CanApprove = true, CanPreview = true, CanReceive = true }; } else { this.accessRights = obj.GetFormAccessRightsByUserCodeAndFormName(HttpContext.Current.Session[SessionConstants.User].ToString(), formName); } } catch (Exception) { //throw; } }
public FormAccessRights GetFormAccessRightsByUserCodeAndFormName(string userCode, string formName) { FormAccessRights obj = new FormAccessRights(); return(obj.GetFormAccessRightsByUserCodeAndFormName(userCode, formName)); }
public FormAccessRights GetFormAccessRights(string userCode, string formName) { return(FormAccessRights.GetFormAccessRightsByUserCodeAndFormName(userCode, formName)); }