public void AddOrEditMenu(SetMenuRightPreamInput model) { //如果是模块授权 if (model.CurrentType == "module") { if (model.OperatingState.ToLower() == "insert") { bool flag = ConfigContext.Current.ModuleConfig.AddModuleOperate(model.Id, model.ParentId, model.CurrentPath, model.Name, model.MenuValue, model.OperatingState); if (flag) { ConfigContext.Current.Save(); } } else if (model.OperatingState.ToLower() == "update") { bool flag = ConfigContext.Current.ModuleConfig.UpdateModuleOperate(model.Id, model.ParentId, model.CurrentPath, model.Name, model.MenuValue, model.OperatingState); if (flag) { ConfigContext.Current.Save(); } } } else { if (model.OperatingState.ToLower() == "insert") { bool flag = ConfigContext.Current.ModuleConfig.AddMenuOperate(model.Id, model.ParentId, model.CurrentPath, model.Name, model.MenuValue, model.OperatingState, model.SelectValueList); if (flag) { ConfigContext.Current.Save(); } } else if (model.OperatingState.ToLower() == "update") { bool flag = ConfigContext.Current.ModuleConfig.UpdateMenuOperate(model.Id, model.ParentId, model.CurrentPath, model.Name, model.MenuValue, model.OperatingState, model.SelectValueList); if (flag) { ConfigContext.Current.Save(); } } } }
public InfoEarthFrame.Common.ModuleConfig.ParentMenu GetMenuInfo(SetMenuRightPreamInput model) { InfoEarthFrame.Common.ModuleConfig.ParentMenu data = new InfoEarthFrame.Common.ModuleConfig.ParentMenu(); data = ConfigContext.Current.ModuleConfig.GetMenuDataInfo(model.Id, model.ParentId, model.CurrentPath, model.Name, model.MenuValue, model.OperatingState, model.CurrentType); return(data); }