public virtual async Task RenderFormAsync(IModel r)
        {
            if (r == null)
            {
                throw new BaseEngineException("پارامتر نال است");
            }


            var parameters = Request?.Params;

            IDropDownParameter    dropdownparam          = GetDropDownParams(parameters);
            ITreeParameter        _ITreeParameter        = GetTreeParams(parameters);
            IMultiSelectParameter _IMultiSelectParameter = GetMultiSelectParams(parameters);
            IDataTableParameter   _IDataTableParameter   = GetDataTableParams(parameters);

            Dictionary <string, DropDownAttribute>      dropdowns    = _engineService.GetModelDropdownAttributes <T>();
            Dictionary <string, DataTableAttribute>     datatables   = _engineService.GetModelTableAttributes <T>();
            Dictionary <string, TreeAttribute>          trees        = _engineService.GetModelTreeAttributes <T>();
            Dictionary <string, MultiSelectAttribute>   multiselects = _engineService.GetModelMultiSelectAttributes <T>();
            Dictionary <string, List <SelectListItem> > enums        = _engineService.GetEnumsAttributes <T>(r);

            Dictionary <string, List <IDropDownOption> > dropdownData =
                await _engineService.GetDropdownDataAsync(dropdowns, dropdownparam);

            Dictionary <string, IQueryable <IDataTable> > dataTableData =
                await _engineService.GetDataTableDataAsync(datatables, _IDataTableParameter);

            Dictionary <string, ITreeNode> treeData = await _engineService.GetTreeDataAsync(trees, _ITreeParameter);

            Dictionary <string, List <IDropDownOption> > multiSelectData =
                await _engineService.GetMultiSelectDataAsync(multiselects, _IMultiSelectParameter);

            _engineService.SetData(dropdownData.Keys.ToArray(), dropdownData.Values.ToArray(), ViewData);
            _engineService.SetData(dataTableData.Keys.ToArray(), datatables.Values.ToArray(), ViewData);
            _engineService.SetData(treeData.Keys.ToArray(), treeData.Values.ToArray(), ViewData);
            _engineService.SetData(multiSelectData.Keys.ToArray(), multiSelectData.Values.ToArray(), ViewData);
            _engineService.SetData(enums.Keys.ToArray(), enums.Values.ToArray(), ViewData);
        }
 public virtual async Task <ITreeNode> GetTreeAsync(ITreeParameter p)
 {
     return(await Task.FromResult <ITreeNode>(null));
 }
 public virtual ITreeNode GetTree(ITreeParameter p)
 {
     return(null);
 }
 /// <summary>
 /// دیتای های مربوط به Tree را بر میگرداند
 /// </summary>
 /// <typeparam name="B"></typeparam>
 /// <returns></returns>
 public virtual async Task <Dictionary <string, ITreeNode> > GetTreeDataAsync
     (Dictionary <string, TreeAttribute> trees, ITreeParameter @params)
 {
     return(await GetDataAsync <ITreeNode, TreeAttribute>(trees, @params));
 }