Exemplo n.º 1
0
        public void TestReturnObjectJson()
        {
            var logica = new EfDatabaseAutomation.Automation.SelectParametrSheme.LogicsSelectAutomation();

            logica.SelectUser = "******";
            var select = new SelectAll();
            //   var t = select.SqlModelAutomation<>(logica);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Выборка
 /// </summary>
 /// <param name="sqlSelect">Запрос</param>
 /// <returns></returns>
 public async Task <string> Select(LogicsSelectAutomation sqlSelect)
 {
     return(await Task.Factory.StartNew(() =>
     {
         string model = null;
         if (sqlSelect.SelectUser != null)
         {
             Type type = Type.GetType($"{sqlSelect.FindNameSpace}, {sqlSelect.NameDll}");
             model = (string)typeof(SelectAll).GetMethod("SqlModelAutomation")?.MakeGenericMethod(type).Invoke(new SelectAll(), new object[] { sqlSelect });
         }
         return model;
     }));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Создание отчета на сервере
        /// </summary>
        /// <param name="sqlSelect">С генерированный запрос с клиента</param>
        /// <returns></returns>
        public async Task <Stream> GenerateFileXlsxSqlView(LogicsSelectAutomation sqlSelect)
        {
            var selectFull = new SelectFull(_parameterConfig.ConnectionString);

            return(await Task.Factory.StartNew(() => selectFull.GenerateStreamToSqlViewFile(sqlSelect.SelectUser, "REPORTSQLSERVER", sqlSelect.SelectInfo, _parameterConfig.PathSaveTemplate)));
        }