/// <summary> /// 获取当前页面用户的操作信息 /// </summary> /// <param name="url">The URL.</param> /// <param name="userid">The userid.</param> /// <returns></returns> /// <remarks></remarks> public IList <SspPageAction> GetUserPageActionList(int menuId, int userId) { string stmtId = "GetUserPageActionList"; Dictionary <string, object> where = new Dictionary <string, object>(); where.Add("PageMenuId", menuId); where.Add("UserId", userId); DataTable dt = this.GetDataTableByStatement(stmtId, where); IList <SspPageAction> resultList = new List <SspPageAction>(); foreach (DataRow row in dt.Rows) { var p = new SspPageAction(); p.ObjId = ToInt(row, "OBJID"); p.PageMenuId = ToInt(row, "PAGE_MENU_ID"); p.ActionId = ToInt(row, "ACTION_ID"); p.ActionName = ToString(row, "ACTION_NAME"); p.ActionUrl = ToString(row, "ACTION_URL"); p.ShowName = ToString(row, "SHOW_NAME"); p.Remark = ToString(row, "REMARK"); p.IcoName = ToString(row, "ICO_NAME"); p.RecordUserId = ToInt(row, "RECORD_USER_ID"); p.RecordTime = ToDateTime(row, "RECORD_TIME"); p.SeqIndex = ToInt(row, "SEQ_INDEX"); p.DeleteFlag = ToInt(row, "DELETE_FLAG"); p.BakupFlag = ToInt(row, "BAKUP_FLAG"); p.BakupTime = ToDateTime(row, "BAKUP_TIME"); resultList.Add(p); } return(resultList); }
/// <summary> /// 获取当前页面数据库对应的权限信息 /// </summary> /// <returns></returns> public IList <PageAction> GetPageActionList(PageMenu pageMenu) { var m = new SspPageAction(); m.PageMenuId = pageMenu.ObjId; var manager = AppBizFactory.CreateInstance <IPageActionManager>(); var lst = manager.GetEntityList(m); return(SspToPageAction(lst, pageMenu)); }
/// <summary> /// 将当前页面的菜单类保存到数据库 /// </summary> /// <param name="page"></param> public void AddPageAction(PageAction pageAction) { var manager = AppBizFactory.CreateInstance <IPageActionManager>(); object max = manager.GetMaxObjId(null); int iMax = 0; if (max != null) { int.TryParse(max.ToString(), out iMax); } iMax++; var sspPageAction = new SspPageAction(); sspPageAction.ObjId = iMax; sspPageAction.PageMenuId = pageAction.PageMenu.ObjId; sspPageAction.ActionId = pageAction.ActionId; sspPageAction.ActionName = pageAction.ActionName; sspPageAction.ShowName = pageAction.ShowName; sspPageAction.DeleteFlag = 0; manager.Insert(sspPageAction); }
/// <summary> /// 获取ObjId最大值 /// </summary> /// <returns></returns> public object GetMaxObjId(SspPageAction entity) { return(basicService.GetMaxValue("OBJID", entity)); }
public IList <SspPageAction> GetEntityList(SspPageAction entity) { return(basicService.GetEntityList(entity)); }
/// <summary> /// 插入数据 /// </summary> /// <param name="pageAction">The pageActionId.</param> /// <returns></returns> /// <remarks></remarks> public int Insert(SspPageAction entity) { return(basicService.Insert(entity)); }
/// <summary> /// 获取ObjId最大值 /// </summary> /// <returns></returns> public object GetMaxObjId(SspPageAction entity) { return(this.DbCIService.GetMaxObjId(entity)); }