protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            FastTrackPage page = this.Page as FastTrackPage;

            if (page != null)
            {
                PropertyInfo property = page.GetPropertyInfo(page.SelectedPropertyName);
                if (property != null)
                {
                    if (page.IsListProperty(property.Name))
                    {
                        IList list = (IList)page.GetPropertyValue(property.Name);
                        list.Add(obj);
                    }
                    else
                    {
                        page.SetPropertyValue(property.Name, obj);
                    }

                    page.SaveObject(page.SelectedObject);

                    page.Response.Redirect(page.GetEditUrl(page.SelectedObject, ""));
                }
            }
        }
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            FastTrackPage page = this.Page as FastTrackPage;

            if (page != null)
            {
                page.SaveObject();
            }
        }
Пример #3
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            FastTrackPage page = this.Page as FastTrackPage;

            if (page != null)
            {
                IList list = (IList)page.GetPropertyValue(propertyName);
                list.Remove(obj);

                page.SaveObject(page.SelectedObject);

                page.Response.Redirect(page.Request.Url.OriginalString);
            }
        }