Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string editID = Request.QueryString["id"];
            string type   = Request.QueryString["typeid"];

            if (editID.IsGuid())
            {
                appLibrary = bappLibrary.Get(editID.ToGuid());
            }
            if (!IsPostBack)
            {
                if (appLibrary != null)
                {
                    this.Title1.Value          = appLibrary.Title;
                    this.Address.Value         = appLibrary.Address;
                    this.TypeOptions.Text      = new FoWoSoft.Platform.AppLibrary().GetTypeOptions(appLibrary.Type.ToString());
                    this.OpenModelOptions.Text = new FoWoSoft.Platform.Dictionary().GetOptionsByCode("appopenmodel", value: appLibrary.OpenMode.ToString());
                    this.Params.Value          = appLibrary.Params;
                    this.Width.Value           = appLibrary.Width.ToString();
                    this.Height.Value          = appLibrary.Height.ToString();
                    this.UseMember.Value       = appLibrary.UseMember;
                    this.Note.Value            = appLibrary.Note;
                }
                else
                {
                    this.TypeOptions.Text      = new FoWoSoft.Platform.AppLibrary().GetTypeOptions("");
                    this.OpenModelOptions.Text = new FoWoSoft.Platform.Dictionary().GetOptionsByCode("appopenmodel");
                }
            }
        }
Exemple #2
0
        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"];

            FoWoSoft.Platform.AppLibrary bapp = new FoWoSoft.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);
                            }
                        }
                    }
                    FoWoSoft.Platform.Log.Add("删除了一批应用程序库", delxml.ToString(), FoWoSoft.Platform.Log.Types.角色应用);
                }
            }

            FoWoSoft.Platform.Dictionary bdict = new FoWoSoft.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;
        }