Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public CtrlTrigger()
 {
     InitializeComponent();
     triggerOptions   = null;
     cnlNumChanged    = false;
     deviceNumChanged = false;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Clears the fields.
 /// </summary>
 public void Clear()
 {
     triggerOptions         = null;
     chkActive.Checked      = false;
     txtSql.Text            = "";
     txtCnlNum.Text         = "";
     txtName.Text           = "";
     chkSingleQuery.Checked = false;
     lvParametrs.Items.Clear();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Shows data cur triggers.
 /// </summary>
 private void ShowTriggersProps(DataTriggerOptions triggerOptions, ExportTargetConfig exportTargetConfig)
 {
     if (triggerOptions == null)
     {
         ctrlTrigger.Visible = false;
     }
     else
     {
         ctrlTrigger.DbmsType = exportTargetConfig.ConnectionOptions.KnownDBMS;
         ctrlTrigger.Visible  = true;
         ctrlTrigger.Clear();
         ctrlTrigger.DataTriggerOptions = triggerOptions;
         ctrlConnectionOptions.Visible  = false;
         ctrlGeneralOptions.Visible     = false;
         ctrlArcUploadOptions.Visible   = false;
         ctrlEventTrigger.Visible       = false;
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes the command parameters.
        /// </summary>
        protected override void InitParams()
        {
            DataTriggerOptions options = (DataTriggerOptions)Options;

            DateTimeParam = DataSource.SetParam(Command, "dateTime", DateTime.MinValue);
            KpNumParam    = DataSource.SetParam(Command, "kpNum", 0);

            if (options.SingleQuery)
            {
                foreach (int cnlNum in options.CnlNums)
                {
                    string cnlNumStr = cnlNum.ToString();
                    DataSource.SetParam(Command, "val" + cnlNumStr, 0.0);
                    DataSource.SetParam(Command, "stat" + cnlNumStr, 0);
                }
            }
            else
            {
                CnlNumParam = DataSource.SetParam(Command, "cnlNum", 0);
                ValParam    = DataSource.SetParam(Command, "val", 0.0);
                StatParam   = DataSource.SetParam(Command, "stat", 0);
            }
        }