コード例 #1
0
ファイル: Sort.aspx.cs プロジェクト: BanpoClan/MyWFLearn
        protected void Page_Load(object sender, EventArgs e)
        {
            string parentid = Request.QueryString["parentid"];

            if (IsPostBack)
            {
                string   sort      = Request.Form["sort"] ?? "";
                string[] sortArray = sort.Split(',');
                MyCreek.Platform.Organize borganize = new MyCreek.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 MyCreek.Platform.Organize().GetChilds(parentid.ToGuid());
        }
コード例 #2
0
        public ActionResult Sort(FormCollection collection)
        {
            string parentid = Request.QueryString["parentid"];

            if (collection != null)
            {
                string   sort      = Request.Form["sort"] ?? "";
                string[] sortArray = sort.Split(',');
                MyCreek.Platform.Organize borganize = new MyCreek.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 MyCreek.Platform.Organize().GetChilds(parentid.ToGuid());

            return(View(orgs));
        }