public string SqlSelect(string conectionstring, AngularModel command) { var sqlconnect = new SqlConnectionType(); SerializeJson serializeJson = new SerializeJson(); switch (command.Id) { case 1: return(serializeJson.JsonLibary((SysNum)sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, command.Command, typeof(SysNum)))); case 12: return(serializeJson.JsonLibary((Mail)sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, command.Command, typeof(Mail)))); case 13: return(serializeJson.JsonLibary((ModelFull)sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, command.Command, typeof(ModelFull)))); case 14: return (serializeJson.JsonLibary( (Soprovod) sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, command.Command, typeof(Soprovod)))); case 21: return(serializeJson.JsonLibary((No)sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, command.Command, typeof(No)))); default: return("Данная комманда не определена!!!"); } }
/// <summary> /// Данный блок относится к БДК /// </summary> /// <param name="conectionstring">Строка соединения</param> /// <param name="select">Команда Select</param> /// <returns>Возвращаем модель JSON в виде строки</returns> public string BdkSqlSelect(string conectionstring, string select) { var sqlconnect = new SqlConnectionType(); SerializeJson serializeJson = new SerializeJson(); return(serializeJson.JsonLibary((AnalisBdkFull)sqlconnect.SelectFullParametrSqlReader <string, string>(conectionstring, select, typeof(AnalisBdkFull)))); }
/// <summary> /// Создание процесса Прием КРСБ Наследника Массово /// </summary> /// <param name="conectstring">Строка соединения</param> /// <param name="setting">Настройки</param> /// <returns></returns> public string CreateKrsb(string conectstring, FullSetting setting) { try { var delocreate = new AddKrsb(); var sqlconnect = new SqlConnectionType(); SerializeJson serializeJson = new SerializeJson(); if (setting.DeloPriem.DelaPriem.Count > 0) { delocreate.CreateDelo(setting.DeloPriem.DelaPriem); sqlconnect.StartingProcedure <string, string>(conectstring, ((ServiceWcf) sqlconnect.SelectFullParametrSqlReader(conectstring, ModelSqlFullService.ProcedureSelectParametr, typeof(ServiceWcf), ModelSqlFullService.ParamCommand("19"))).ServiceWcfCommand.Command); return(serializeJson.JsonLibary((CreateDela)sqlconnect.SelectFullParametrSqlReader <string, string>(conectstring, ((ServiceWcf) sqlconnect.SelectFullParametrSqlReader(conectstring, ModelSqlFullService.ProcedureSelectParametr, typeof(ServiceWcf), ModelSqlFullService.ParamCommand("20"))).ServiceWcfCommand.Command, typeof(CreateDela)))); } Loggers.Log4NetLogger.Error(new Exception("Нет дел для создания процессов!!!")); return(null); } catch (Exception e) { Loggers.Log4NetLogger.Error(e); return(null); } }
/// <summary> /// Вытягивание выборки на сайт для подставления в нее параметров данных /// </summary> /// <param name="conectionstring">Строка соединения</param> /// <param name="setting">Параметры настройки</param> /// <returns></returns> public string ServiceCommand(string conectionstring, FullSetting setting) { var sqlconnect = new SqlConnectionType(); SerializeJson serializeJson = new SerializeJson(); return(serializeJson.JsonLibary( (ServiceWcf) sqlconnect.SelectFullParametrSqlReader(conectionstring, ModelSqlFullService.ProcedureSelectParametr, typeof(ServiceWcf), ModelSqlFullService.ParamCommand(setting.ParamService.IdCommand.ToString())))); }
/// <summary> /// Выборка Всех из БД B зависимости от номера 1: Пользователи 2: Отделы и т д /// </summary> /// <returns></returns> public string SelectFull(ModelParametr.ModelParametr parametr) { var sqlconnect = new SqlConnectionType(); SerializeJson serializeJson = new SerializeJson(); switch (parametr.IdParamSelect) { case 1: return (serializeJson.JsonLibary( (AllUsers) sqlconnect.SelectFullParametrSqlReader(Connection, Command.InfoLogic.NameProcedure, typeof(AllUsers), ModelProcedure.ModelProcedure.ParamCommand(parametr.IdParamSelect.ToString())))); default: return(null); } }
/// <summary> /// Выгрузка поставщиков /// </summary> /// <returns></returns> public string Supply() { SerializeJson json = new SerializeJson(); return(json.JsonLibary(Inventory.Supplies)); }