protected void Page_Load(object sender, EventArgs e) { string parentid = Request.QueryString["parentid"]; if (IsPostBack) { string sort = Request.Form["sort"] ?? ""; string[] sortArray = sort.Split(','); RoadFlow.Platform.Organize borganize = new RoadFlow.Platform.Organize(); for (int i = 0; i < sortArray.Length; i++) { Guid gid; if (!sortArray[i].IsGuid(out gid)) { continue; } borganize.UpdateSort(gid, i + 1); } Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "parent.frames[0].reLoad('" + parentid + "');", true); } Orgs = new RoadFlow.Platform.Organize().GetChilds(parentid.ToGuid()); }
public ActionResult Sort(FormCollection collection) { string parentid = Request.QueryString["parentid"]; if (collection != null) { string sort = Request.Form["sort"] ?? ""; string[] sortArray = sort.Split(','); RoadFlow.Platform.Organize borganize = new RoadFlow.Platform.Organize(); for (int i = 0; i < sortArray.Length; i++) { Guid gid; if (!sortArray[i].IsGuid(out gid)) { continue; } borganize.UpdateSort(gid, i + 1); } ViewBag.Script = "parent.frames[0].reLoad('" + parentid + "');"; } var orgs = new RoadFlow.Platform.Organize().GetChilds(parentid.ToGuid()); return(View(orgs)); }