Example #1
0
        private void GetHistory_ODBC(Name name)
        {
            // establish ODBC connection
            var siteService    = _vhs.SiteService.GetSiteService();
            var table          = ODBCTools.GetServiceNameAsOdbcTable(siteService);
            var odbcConnection = ODBCTools.GetOdbcConnection(siteService);

            odbcConnection.Open();

            var pointTag    = new PointTag(name.ID);
            var startString = _start.ToString("yyyy-MM-dd");
            var endString   = _end.ToString("yyyy-MM-dd");

            var command = odbcConnection.CreateCommand();
            var sql     = $"SELECT Value,RecordTime FROM {table}.HistoricalValues WHERE PointIdLong='{pointTag.LongId}' AND RecordTime > '{startString}' AND RecordTime < '{endString}'";

            command.CommandText = sql;

            var adapter = new OdbcDataAdapter();

            adapter.SelectCommand = command;

            var tables = new DataSet();

            adapter.Fill(tables, String.Format("{0}.BS_HEADER_RECORD", table));

            odbcConnection.Close();
        }
Example #2
0
    void GivePoints()
    {
        Player.instance.points = Player.instance.points + pointAmount;
        WaveSpawner.instance.pointsGainedDuringWave = WaveSpawner.instance.pointsGainedDuringWave + pointAmount;
        UIManager.instance.pointsToGive             = UIManager.instance.pointsToGive + pointAmount;

        GameObject pointTagGO     = Instantiate(pointTag, transform.position, Quaternion.identity);
        PointTag   pointTagScript = pointTagGO.GetComponent <PointTag>();

        pointTagScript.PointAssigner(pointAmount);
    }
Example #3
0
        public void StartRunMode()
        {
            IsInRunMode = true;

            Points.Clear();

            try
            {
                // determine which properties/values you want for the point
                PropertyIdList propertyList = new PropertyIdList
                {
                    CygNetCoreProperties.CygNetProperty.Value,
                    CygNetCoreProperties.CygNetProperty.FacilityDescription,
                };

                var pointTag = new PointTag(CygNetPointTag);
                Points.Add(new CoreCacheTag(pointTag), propertyList);
            }
            catch (Exception)
            {
                CurrentValue = "Invalid Point Tag";
            }
        }
Example #4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PointTag obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }