protected override void CtrlSearchItemCommand(object source, RepeaterCommandEventArgs e) { EventSearchItemCommand(source, e); var cArg = e.CommandArgument.ToString(); switch (e.CommandName.ToLower()) { case "search": var rp = (Repeater)source; SetSearchUserDataInfoVar(rp); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "resetsearch": UInfo.ClearSearchData(); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "new": Response.Redirect(EditUrl("itemid", "0", CtrlTypeCode), true); break; case "return": UInfo.SelItemId = ""; // clear any proviously selected items UInfo.SortItemId = ""; UInfo.Save(); Response.Redirect(UInfo.RtnUrl); break; case "exit": Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID)); break; } }
protected override void CtrlListItemCommand(object source, RepeaterCommandEventArgs e) { EventListItemCommand(source, e); var cArg = e.CommandArgument.ToString(); switch (e.CommandName.ToLower()) { case "selectitemid": UInfo.SelItemId = cArg; UInfo.Save(); Response.Redirect(UInfo.RtnSelUrl); break; case "edit": Response.Redirect(EditUrl("itemid", cArg, CtrlTypeCode)); break; case "delete": if (Utils.IsNumeric(cArg)) { var obj = ((DataCtrlInterface)ObjCtrl).Get(Convert.ToInt32(cArg)); if (obj.ModuleId == ModuleId | obj.ModuleId == -1) //only delete items linked with this module or portalwide (-1). { ((DataCtrlInterface)ObjCtrl).Delete(Convert.ToInt32(cArg)); } } Response.Redirect(EditUrl(CtrlTypeCode)); break; case "search": var rp = (Repeater)source; SetSearchUserDataInfoVar(rp); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "sort": UInfo.SortItemId = cArg; UInfo.Save(); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "sortselect": SortEntityRecords(EntityTypeCode, UInfo.SortItemId, cArg); UInfo.SortItemId = ""; UInfo.Save(); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "copy": CopyEntry(cArg); Response.Redirect(EditUrl(CtrlTypeCode)); break; case "exit": Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID)); break; } }