public ActionResult Index(FormCollection collection)
        {
            string name = string.Empty;

            ViewBag.Query1 = string.Format("&appid={0}&tabid={1}", Request.QueryString["appid"], Request.QueryString["tabid"]);
            RoadFlow.Platform.QueryDesign queryDesign = new RoadFlow.Platform.QueryDesign();
            IEnumerable <RoadFlow.Data.Model.QueryDesign> queryDesignList;

            if (collection != null)
            {
                if (!Request.Form["DeleteBut"].IsNullOrEmpty())
                {
                    string ids = Request.Form["checkbox_app"];
                    foreach (string id in ids.Split(','))
                    {
                        Guid bid;
                        if (!id.IsGuid(out bid))
                        {
                            continue;
                        }
                        queryDesign.Delete(bid);
                    }
                }
                queryDesignList = queryDesign.GetAll();

                if (!Request.Form["Search"].IsNullOrEmpty())
                {
                    name = Request.Form["Name"];
                    if (!name.IsNullOrEmpty())
                    {
                        queryDesignList = queryDesignList.Where(p => p.Name.IndexOf(name) >= 0);
                    }
                }
            }
            else
            {
                queryDesignList = queryDesign.GetAll();
            }
            ViewBag.Name = name;
            return(View(queryDesignList));
        }