예제 #1
0
 protected virtual void ProcessCallbackData(ControlCallbackManager cbk)
 {
     cbk.WriteJson(new
     {
         info = string.Format("[Callback Service] Control: {0} {1} | Command: {2} | Parameter count: {3}", cbk.ControlName, cbk.ControlId, cbk.CommandName, cbk.CommandParameter.Count),
         msg  = string.Format(cbk.CommandParameter["msg"].ToString(), cbk.CommandParameter["obj"])
     });
 }
예제 #2
0
        protected virtual bool TakeCharge()
        {
            var cbk = new ControlCallbackManager(this.ViewContext.HttpContext);

            if (!cbk.IsCallback || cbk.ControlId != this.ID)
            {
                return(false);
            }
            ProcessCallbackData(cbk);
            return(true);
        }