private ActionResult query(string title1, string address) { string pager; string appid = Request.QueryString["appid"]; string tabid = Request.QueryString["tabid"]; string typeid = Request.QueryString["typeid"]; MyCreek.Platform.Dictionary bdict = new MyCreek.Platform.Dictionary(); MyCreek.Platform.AppLibrary bapp = new MyCreek.Platform.AppLibrary(); string typeidstring = typeid.IsGuid() ? bapp.GetAllChildsIDString(typeid.ToGuid()) : ""; string query = string.Format("&appid={0}&tabid={1}&title1={2}&typeid={3}&address={4}", Request.QueryString["appid"], Request.QueryString["tabid"], title1.UrlEncode(), typeid, address.UrlEncode() ); string query1 = string.Format("{0}&pagesize={1}&pagenumber={2}", query, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); List <MyCreek.Data.Model.AppLibrary> appList = bapp.GetPagerData(out pager, query, title1, typeidstring, address); ViewBag.Pager = pager; ViewBag.AppID = appid; ViewBag.TabID = tabid; ViewBag.TypeID = typeid; ViewBag.Title1 = title1; ViewBag.Address = address; ViewBag.Query1 = query1; return(View(appList)); }
protected void Page_Load(object sender, EventArgs e) { string pager; string appid = Request.QueryString["appid"]; string tabid = Request.QueryString["tabid"]; string typeid = Request.QueryString["typeid"]; string title1 = Request.QueryString["title1"]; string address = Request.QueryString["address"]; MyCreek.Platform.AppLibrary bapp = new MyCreek.Platform.AppLibrary(); if (IsPostBack) { title1 = Request.Form["Title1"]; address = Request.Form["Address"]; //删除 if (!Request.Form["Button1"].IsNullOrEmpty()) { string deleteID = Request.Form["checkbox_app"]; System.Text.StringBuilder delxml = new System.Text.StringBuilder(); foreach (string id in deleteID.Split(',')) { Guid gid; if (id.IsGuid(out gid)) { var app = bapp.Get(gid); if (app != null) { delxml.Append(app.Serialize()); bapp.Delete(gid); } } } MyCreek.Platform.Log.Add("删除了一批应用程序库", delxml.ToString(), MyCreek.Platform.Log.Types.角色应用); } } MyCreek.Platform.Dictionary bdict = new MyCreek.Platform.Dictionary(); string typeidstring = typeid.IsGuid() ? bapp.GetAllChildsIDString(typeid.ToGuid()) : ""; Query = string.Format("&appid={0}&tabid={1}&title1={2}&typeid={3}&address={4}", Request.QueryString["appid"], Request.QueryString["tabid"], title1.UrlEncode(), typeid, address.UrlEncode() ); Query1 = string.Format("{0}&pagesize={1}&pagenumber={2}", Query, Request.QueryString["pagesize"], Request.QueryString["pagenumber"]); AppList = bapp.GetPagerData(out pager, Query, title1, typeidstring, address); this.Pager.Text = pager; }