Пример #1
0
        protected void btnAdd_Click(Object Sender, EventArgs e)
        {
            int intModel    = Int32.Parse(Request.Form[hdnParent.UniqueID]);
            int intPlatform = Int32.Parse(Request.Form[hdnPlatform.UniqueID]);

            if (Request.Form[hdnId.UniqueID] == "0")
            {
                oHost.Add(txtName.Text, intModel, intPlatform, txtPath.Text, txtPrefix.Text, (chkStorage.Checked ? 1 : 0), (oHost.Gets(0).Tables[0].Rows.Count + 1), (chkEnabled.Checked ? 1 : 0));
            }
            else
            {
                oHost.Update(Int32.Parse(Request.Form[hdnId.UniqueID]), txtName.Text, intModel, intPlatform, txtPath.Text, txtPrefix.Text, (chkStorage.Checked ? 1 : 0), (chkEnabled.Checked ? 1 : 0));
            }
            if (Request.Form[hdnOrder.UniqueID] != "")
            {
                string strOrder = Request.Form[hdnOrder.UniqueID];
                int    intCount = 0;
                while (strOrder != "")
                {
                    intCount++;
                    int intId = Int32.Parse(strOrder.Substring(0, strOrder.IndexOf("&")));
                    strOrder = strOrder.Substring(strOrder.IndexOf("&") + 1);
                    oHost.UpdateOrder(intId, intCount);
                }
            }
            Response.Redirect(Request.Path);
        }
Пример #2
0
 public void Add(StripToolPage aPage)
 {
     Host.Add(aPage);
     if (_List.IndexOf(aPage) < 0)
     {
         _List.Add(aPage);
     }
 }
        public virtual void Configuration(IAppBuilder app)
        {
            var host = new Host();

            host.Add <JsonConverter>(new StringEnumConverter());
            host.Compose();

            app.UseCors(CorsOptions.AllowAll)
            .UseArriba(host);
        }