protected override void copyThis(ref AjaxRequest destObj) {
   base.copyThis(ref destObj);
   var dst = destObj as LongOpClientRequest;
   if (dst != null) {
     dst.Pipe = this.Pipe;
     dst.SessionUID = this.SessionUID;
   }
 }
Beispiel #2
0
 protected override void copyThis(ref AjaxRequest destObj) {
   base.copyThis(ref destObj);
   var dst = destObj as BioRequest;
   if (dst != null) {
     dst.BioCode = this.BioCode;
     dst.BioParams = (this.BioParams != null) ? (Params)this.BioParams.Clone() : null;
   }
 }
Beispiel #3
0
    protected override void processAjaxRequest(HttpContext context, AjaxRequest ajaxRequest) {
      var vMsg = CBioHandlerFactory.CreateBioHandler(context, ajaxRequest);

      if (vMsg.BioSession.Cfg.Debug) {
        var headersFN = vMsg.BioSession.Cfg.WorkspacePath + "\\debug\\hdrs(dir)_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".txt";
        httpSrvUtl.saveHeaders(headersFN, context);
      }

      vMsg.DoExecute();
    }
 protected override void copyThis(ref AjaxRequest destObj) {
   base.copyThis(ref destObj);
   var dst = destObj as DSFetchClientRequest;
   if (dst != null) {
     dst.Selection = this.Selection;
     dst.Sort = (this.Sort != null) ? (JsonStoreSort)this.Sort.Clone() : null;
     dst.Filter = (this.Filter != null) ? (JsonStoreFilter)this.Filter.Clone() : null;
     dst.ExecBioCode = this.ExecBioCode;
   }
 }
    public virtual void ProcessRequest(HttpContext context) {
      var curRqtp = RequestType.Unassigned;
      try {
        this.FLocalPath = context.Request.PhysicalApplicationPath;
        this.FAppURL = context.Request.ApplicationPath;
        context.Response.ContentType = SrvConst.HTML_CONTENT_TYPE;
        context.Response.BufferOutput = true;
        context.Response.ContentEncoding = Encoding.GetEncoding(Utl.SYS_ENCODING);
        var ar = AjaxRequest.ExtractFromQParams(context.Request.Params) as AjaxRequest;
        if (ar is BioRequestTyped)
          curRqtp = (ar as BioRequestTyped).RequestType;

        if (ar == null) {
          var rqType = context.Request.Params[csRequestTypeParamName];
          var bioCode = context.Request.Params[csBioCodeParamName];
          if (String.IsNullOrEmpty(rqType) || String.IsNullOrEmpty(bioCode))
            ar = new AjaxRequest();
          else {
            ar = new BioRequest {
              RequestType = enumHelper.GetFieldValueByValueName<RequestType>(rqType, StringComparison.CurrentCulture),
              BioCode = bioCode,
              BioParams = new Params(context.Request.Params)
            };
            (ar as BioRequest).BioParams.Remove(csRequestTypeParamName);
            (ar as BioRequest).BioParams.Remove(csBioCodeParamName);
          }
        }
        ar.Prms = new Params(context.Request.Params);

        this.processAjaxRequest(context, ar);
      } catch (ThreadAbortException) {
      } catch (EBioUnknownRequest bex) {
        context.Response.Write(new BioResponse { Success = true, Ex = bex }.Encode());
        context.Session.Abandon();
      } catch (EBioLoggedOut bex) {
        context.Response.Write(new BioResponse { Success = true, Ex = bex }.Encode());
        context.Session.Abandon();
      } catch (EBioRestartApp bex) {
        context.Response.Write(new BioResponse { Success = true, Ex = bex }.Encode());
      } catch (EBioException bex) {
        context.Response.Write(new BioResponse { Success = false, Ex = bex }.Encode());
      } catch (Exception bex) {
        var ebioex = new EBioException("Непредвиденная ошибка на сервере.\nСообщение: " + bex.Message, bex);
        context.Response.Write(new BioResponse { Success = false, Ex = ebioex }.Encode());
      }
    }
 public static ABioHandler CreateBioHandler(HttpContext pContext, AjaxRequest request) {
   String vHandlerImplTypeName = null;
   var rqt = request as BioRequestTyped;
   if (rqt != null)
     vHandlerImplTypeName = enumHelper.GetAttributeByValue<RequestTypeMappingAttribute>(rqt.RequestType).Mapping;
   if (String.IsNullOrEmpty(vHandlerImplTypeName))
     throw new EBioException("Ќе возможно определить тип сообщени¤!", null);
   var t = Type.GetType(vHandlerImplTypeName);
   if(t == null)
     throw new EBioException("Ќе найден тип сообщени¤: " + vHandlerImplTypeName, null);
   var parTypes = new Type[2];
   parTypes[0] = typeof(HttpContext);
   parTypes[1] = typeof(AjaxRequest);
   var parVals = new Object[] { pContext, request };
   var ci = t.GetConstructor(parTypes);
   if (ci != null) {
     var obj = (ABioHandler)ci.Invoke(parVals);
     return obj;
   }
   return null;
 }
 public tmio_FileSrv(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
    //public static JsonConverter[] GetConverters() {
    //  return new JsonConverter[] { new EBioExceptionConverter()/*t12, new CJsonStoreRowConverter() */};
    //}

    protected override void copyThis(ref AjaxRequest destObj) {
      base.copyThis(ref destObj);
      var dst = destObj as JsonStoreRequestGet;
      dst.getType = this.getType;
      dst.selection = this.selection;
    }
 protected virtual void copyThis(ref AjaxRequest destObj) {
   destObj.Prms = (this.Prms != null) ? (Params)this.Prms.Clone() : null;
   destObj.Silent = this.Silent;
   destObj.URL = this.URL;
   destObj.Timeout = this.Timeout;
   destObj.Callback = this.Callback;
   destObj.UserToken = this.UserToken;
 }
    //public static JsonConverter[] GetConverters() {
    //  return new JsonConverter[] { new EBioExceptionConverter() };
    //}

    protected override void copyThis(ref AjaxRequest destObj) {
      base.copyThis(ref destObj);
      BioLoginRequest dst = destObj as BioLoginRequest;
      dst.login = this.login;
    }
Beispiel #11
0
 public tmio_DS2XL(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
    //public static JsonConverter[] GetConverters() {
    //  return new JsonConverter[] { new EBioExceptionConverter()/*t12, new CJsonStoreRowConverter() */};
    //}

    protected override void copyThis(ref AjaxRequest destObj) {
      base.copyThis(ref destObj);
      BioSQLRequest dst = destObj as BioSQLRequest;
      dst.transactionCmd = this.transactionCmd;
      dst.transactionID = this.transactionID;
    }
 public tmio_rpt_xlr(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
 protected override void copyThis(ref AjaxRequest destObj) {
   base.copyThis(ref destObj);
   BioRequestTyped dst = destObj as BioRequestTyped;
   dst.RequestType = this.RequestType;
 }
 protected abstract void processAjaxRequest(HttpContext context, AjaxRequest ajaxRequest);
Beispiel #16
0
 public tm_logout(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
 public ABioHandlerBioTransacted(HttpContext context, AjaxRequest request) : base(context, request) { }
 protected override void copyThis(ref AjaxRequest destObj) {
   base.copyThis(ref destObj);
   var dst = destObj as RmtClientRequest;
   dst.title = this.title;
   dst.cmd = this.cmd;
 }
Beispiel #19
0
 public tmio_WebDB(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
Beispiel #20
0
 public tmio_Pipe(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }
Beispiel #21
0
 public tmio_rpt(HttpContext context, AjaxRequest request)
   : base(context, request) {
     this._request = request as RmtClientRequest;
 }
Beispiel #22
0
 public tmio_Templ(HttpContext context, AjaxRequest request)
   : base(context, request) {
 }