public static void LoadItems(AjaxResponse prevResponse, IAjaxMng ajaxMng, ComboBox cbx, String bioCode, Params bioParams, Action<ComboBox, AjaxResponse> callback, Boolean addNullItem, Boolean useCache) { if ((prevResponse != null) && (!prevResponse.Success)) { if (callback != null) callback(cbx, prevResponse); return; } var v_cli = new JsonStoreClient { AjaxMng = ajaxMng, BioCode = bioCode }; CbxItems storedItems = null; if (useCache) storedItems = _restoreItems(bioCode); if (storedItems != null) { _loadItems(cbx, storedItems, addNullItem); if (callback != null) callback(cbx, new AjaxResponse { Success = true }); } else { v_cli.Load(bioParams, (s, a) => { if (a.Response.Success) { var cbxitems = new CbxItems {metadata = v_cli.JSMetadata, ds = v_cli.DS}; if (useCache) _storeItems(bioCode, cbxitems); _loadItems(cbx, cbxitems, addNullItem); } if (callback != null) callback(cbx, a.Response); }); } }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="ajaxMng">ссылка на AjaxMng</param> /// <param name="bioCode">Код объекта - описание курсора</param> /// <param name="execBioCode">Код объекта - описание скрипта</param> /// <param name="title">Заголовок</param> public DSFetchClient(IAjaxMng ajaxMng, String bioCode, String execBioCode, String title) : base(ajaxMng, bioCode, title) { this.requestType = RequestType.DSFetch; this.ExecBioCode = execBioCode; }
public static void LoadItems(AjaxResponse prevResponse, IAjaxMng ajaxMng, ComboBox cbx, String bioCode, Params bioParams, Action<ComboBox, AjaxResponse> callback) { LoadItems(prevResponse, ajaxMng, cbx, bioCode, bioParams, callback, false, false); }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="ajaxMng">ссылка на AjaxMng</param> /// <param name="bioCode">Код</param> /// <param name="title">Заголовок</param> public RptClient(IAjaxMng ajaxMng, String bioCode, String title) : base(ajaxMng, bioCode, title) { this.requestType = RequestType.Rpt; }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="ajaxMng">ссылка на AjaxMng</param> /// <param name="bioCode">Код</param> /// <param name="title">Заголовок</param> public ExpClient(IAjaxMng ajaxMng, String bioCode, String title):base(ajaxMng, bioCode, title) { this.requestType = RequestType.DS2XL; }
/// <summary> /// Конструктор класса. /// </summary> /// <param name="ajaxMng">ссылка на AjaxMng</param> /// <param name="bioCode">Код</param> /// <param name="title">Заголовок</param> public LongOpClient(IAjaxMng ajaxMng, String bioCode, String title) : base(ajaxMng, bioCode, title) { this.requestType = RequestType.srvLongOp; }