Exemplo n.º 1
0
        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.Users busers = new RoadFlow.Platform.Users();
                for (int i = 0; i < sortArray.Length; i++)
                {
                    Guid gid;
                    if (!sortArray[i].IsGuid(out gid))
                    {
                        continue;
                    }
                    busers.UpdateSort(gid, i + 1);
                }
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "parent.frames[0].reLoad('" + parentID + "');", true);
            }
            Users = new RoadFlow.Platform.Organize().GetAllUsers(parentID.ToGuid());
        }
Exemplo n.º 2
0
        public ActionResult SortUsers(FormCollection collection)
        {
            string parentID = Request.QueryString["parentid"];

            if (collection != null)
            {
                string   sort                  = Request.Form["sort"] ?? "";
                string[] sortArray             = sort.Split(',');
                RoadFlow.Platform.Users busers = new RoadFlow.Platform.Users();
                for (int i = 0; i < sortArray.Length; i++)
                {
                    Guid gid;
                    if (!sortArray[i].IsGuid(out gid))
                    {
                        continue;
                    }
                    busers.UpdateSort(gid, i + 1);
                }
                ViewBag.Script = "parent.frames[0].reLoad('" + parentID + "');";
            }
            var users = new RoadFlow.Platform.Organize().GetAllUsers(parentID.ToGuid());

            return(View(users));
        }