Exemple #1
0
        /// <summary>
        /// Writes data to the database for the records and sets the chrStartDate and chrLastCheck
        /// </summary>
        /// <param name="HighRiskData"></param>
        private void CheckandInitialiseNullRecords(CheckPointHighRisk HighRiskRecord)
        {
            Database db = new Database(this.database);

            UpdateQuery update = new UpdateQuery();

            update.SetTable("checkpointhighrisk");
            update.SetFields(new string[] { "chrLastCheck", "chrStartTime" });

            string        _nullDateTime = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss");
            List <string> _nullDates    = new List <string>();

            _nullDates.Add(_nullDateTime);
            _nullDates.Add(_nullDateTime);

            update.SetRowValues(_nullDates);
            update.SetId(HighRiskRecord.id.ToString());

            db.Update(update);
        }