public void MoveModuleNode(int pageId, int moduleId, string paneName) { rb_Modules db = new rb_Modules(); var module = db.Single(moduleId); module.TabID = pageId; module.PaneName = paneName.TrimEnd(); db.Update(module, moduleId); }
public JsonResult RenameModule(int id, string name) { try { var db = new rb_Modules(); var module = db.Single(id); module.ModuleTitle = name; db.Update(module, module.ModuleID); } catch (Exception) { return(Json(new { error = true })); } return(Json(new { error = false })); }
public JsonResult MoveModuleNode(int pageId, int moduleId, string paneName) { if (UserProfile.isCurrentUserAdmin || UserProfile.CurrentUser.HasPermission(AccessPermissions.MODULE_EDITING)) { rb_Modules db = new rb_Modules(); var module = db.Single(moduleId); module.TabID = pageId; module.PaneName = paneName.TrimEnd(); db.Update(module, moduleId); return(Json("")); } else { string errorMessage = General.GetString("ACCESS_DENIED", "You don't have permissin to move module", this); return(Json(new { error = true, errorMess = errorMessage })); } }
public JsonResult RenameModule(int id, string name) { try { if ((UserProfile.isCurrentUserAdmin) || UserProfile.CurrentUser.HasPermission(AccessPermissions.MODULE_EDITING)) { var db = new rb_Modules(); var module = db.Single(id); module.ModuleTitle = name; db.Update(module, module.ModuleID); } else { string errorMessage = General.GetString("ACCESS_DENIED", "You don't have permissin to rename module", this); return(Json(new { error = true, errorMess = errorMessage })); } } catch (Exception) { return(Json(new { error = true })); } return(Json(new { error = false })); }
public JsonResult RenameModule(int id, string name) { try { var db = new rb_Modules(); var module = db.Single(id); module.ModuleTitle = name; db.Update(module, module.ModuleID); } catch (Exception) { return Json(new { error = true }); } return Json(new { error = false }); }