Beispiel #1
0
        //Добавление подпараметров в SysTabl
        public void AddSysSubParam(string templatePath, //Файл с шаблонным SysTabl
                                   string paramName,    //Имя параметра
                                   string subParamName) //Имя подпараметра
        {
            int paramId;

            using (var sysTablRs = new DaoRec(templatePath, "SELECT ParamId,ParamName FROM SysTabl WHERE ParamName='" + paramName + "'"))
                paramId = sysTablRs.GetInt("ParamId");
            Execute("INSERT INTO SysSubTabl " +
                    "SELECT ParamId, SubParamNum, SubParamName,SubParamType, SubParamValue, SubParamDescription, SubParamTag, SubParamRowSource " +
                    "FROM [" + templatePath + "].SysSubTabl t1 WHERE t1.ParamId=" + paramId + " AND t1.SubParamName='" + subParamName +
                    "' AND NOT EXISTS(SELECT * FROM SysSubTabl t2 WHERE t1.SubParamName = t2.SubParamName)");
        }
Beispiel #2
0
 public void WriteStart(LogCommand command)
 {
     LogEventTime = DateTime.Now;
     RunHistoryOperation(_history, () =>
     {
         _history.AddNew();
         if (ProgressCommand != null)
         {
             _history.Put("SuperHistoryId", _superHistoryId);
         }
         _history.Put("Command", command.Name);
         _history.Put("Params", command.Params);
         _history.Put("Status", command.Status);
         _history.Put("Time", command.StartTime);
         _history.Put("Context", command.Context, true);
         _historyId = _history.GetInt("HistoryId");
     });
 }
Beispiel #3
0
 public void WriteStartSuper(ProgressCommand command)
 {
     RunHistoryOperation(_superHistory, () =>
     {
         _superHistory.AddNew();
         _superHistory.Put("Command", command.Name);
         _superHistory.Put("Params", command.Params);
         _superHistory.Put("Context", command.Context, true);
         if (Logger.PeriodCommand != null)
         {
             _superHistory.Put("PeriodBegin", Logger.PeriodBegin);
             _superHistory.Put("PeriodEnd", Logger.PeriodEnd);
             _superHistory.Put("PeriodMode", Logger.PeriodMode);
         }
         _superHistory.Put("Status", command.Status);
         _superHistory.Put("Time", command.StartTime);
         _superHistoryId = _superHistory.GetInt("SuperHistoryId");
     });
 }