Пример #1
0
        // IWebPrehander

        public override bool ProcessRequest(HttpContext context)
        {
            if (base.ProcessRequest(context))
            {
                return(true);
            }
            ISource source = ParentGrid.Source;

            if (!ReadOnly && (ColumnName != String.Empty) && Session.IsActionLink(context, _checkID) && ParentGrid.DataLink.Active && !source.DataView.IsEmpty())
            {
                string rowIndex = context.Request.QueryString["RowIndex"];
                if (rowIndex != null)
                {
                    ParentGrid.MoveTo(Int32.Parse(rowIndex));
                    DAE.Client.DataField    field    = source.DataView.Fields[ColumnName];
                    DAE.Client.DataSetState oldState = source.DataView.State;
                    field.AsBoolean = !(field.HasValue() && field.AsBoolean);
                    if (oldState == DAE.Client.DataSetState.Browse)
                    {
                        try
                        {
                            source.DataView.Post();
                        }
                        catch
                        {
                            source.DataView.Cancel();
                            throw;
                        }
                    }
                    return(true);
                }
            }
            return(false);
        }
Пример #2
0
        // IWebHandler

        public virtual bool ProcessRequest(HttpContext context)
        {
            if (Session.IsActionLink(context, _triggerID))
            {
                string rowIndex = context.Request.QueryString["RowIndex"];
                if (rowIndex != null)
                {
                    ParentGrid.MoveTo(Int32.Parse(rowIndex));
                    if (GetEnabled())
                    {
                        Action.Execute();
                    }
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }