Example #1
0
        private static Boolean checkDateTime(DateTime time)
        {
            Boolean result = false;
            String path = ApplicationData.Current.LocalFolder.Path + "/time.txt";
            if (File.Exists(path)) {

                TextReader reader = new StreamReader(path);
                String date = reader.ReadLine();
                reader.Close();
                DateTime timeFile = DateTime.Parse(date);
                int compared = timeFile.CompareTo(time);
                if (compared > 0)
                {
                    TextWriter tw = new StreamWriter(path);
                    tw.WriteLine(time.ToLongDateString() + " " + time.ToLongTimeString());
                    tw.Close();
                    result = true;
                }
            } else {
                TextWriter tw = new StreamWriter(path);
                tw.WriteLine(time.ToLongDateString() + " " + time.ToLongTimeString());
                tw.Close();
            }
            return result;
        }
Example #2
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     clockOutDateTime = DateTime.Now;
     Label2.Text = "Time ended: " + clockOutDateTime.ToLongTimeString();
     SubmitButton.Visible = true;
     ClockOutButton.Visible = false;
 }
Example #3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     clockInDateTime = DateTime.Now;
     Label1.Text = "Time started: " + clockInDateTime.ToLongTimeString();
     ClockOutButton.Visible = true;
     ClockInButton.Visible = false;
 }
        public void DisplayText(NetworkEvent ne)
        {
            this.m_Image = null;
            DateTime time = new DateTime(ne.timeIndex);
            this.infoLabel.Text = "";
            this.appendText("Sender: " + ne.source);
            this.appendText("Time: " + time.ToLongDateString() + " " + time.ToLongTimeString());
            if (ne is NetworkChunkEvent) {
                NetworkChunkEvent nce = ne as NetworkChunkEvent;
                this.appendText("Category: Chunk");
                this.appendText("Message Sequence: " + nce.chunk.MessageSequence);
                this.appendText("Chunk Sequence: " + nce.chunk.ChunkSequence);
                this.appendText("First Chunk Sequence of Message: " + nce.chunk.FirstChunkSequenceOfMessage);
                this.appendText("Number of Chunks: " + nce.chunk.NumberOfChunksInMessage);
            } else if (ne is NetworkMessageEvent) {
                NetworkMessageEvent nme = ne as NetworkMessageEvent;
                this.appendText("Category: Message");
                this.displayMessageEventRecursive(nme.message);
            } else if (ne is NetworkNACKMessageEvent) {

            } else {
                //Unknown
                this.infoLabel.Text = "Unknown Type";
            }
            this.doubleBufferPanel.Invalidate();
        }
Example #5
0
 private void BtStopwatchOptionsClick(object sender, EventArgs e)
 {
     switch (btStopwatchOptions.Text)
     {
         case "Скинути":
             tabCircle.Controls.Clear();
             btControlStopwatch.Text = "Старт";
             btStopwatchOptions.Visible = false;
             btStopwatchOptions.Text = "Новий круг";
             dtStopwatch = new DateTime(2010, 2, 10, 0, 0, 0, 0);
             lbStopwatchResult.Text = String.Format("{0}:{1}", dtStopwatch.ToLongTimeString(), dtStopwatch.Millisecond / 100);
             for (int i = 0; i < tabPageList.dtList.Count; i++)
             {
                 tabPageList.dtList[i] = new DateTime(2010, 2, 10, 0, 0, 0, 0);
             }
             break;
         case "Новий круг":
             tabCircle.Controls.Add(tabPageList[tabPageList.Index]);
             tabPageList[tabPageList.Index].UseVisualStyleBackColor = true;
             tabCircle.SelectTab(tabPageList.Index) ;
             tabPageList.Index++;
             if (tabPageList.Index ==9)
             {
                 btStopwatchOptions.Enabled = false;
             }
             break;
         default:
             MessageBox.Show("Error");
             break;
     }
 }
Example #6
0
 void TmStopwatchTick(object sender, EventArgs e)
 {
     dtStopwatch = dtStopwatch.AddMilliseconds(100);
     tabPageList.dtList[tabPageList.Index - 1] = tabPageList.dtList[tabPageList.Index - 1].AddMilliseconds(100);
     lbStopwatchResult.Text = String.Format("{0}:{1}", dtStopwatch.ToLongTimeString(), dtStopwatch.Millisecond / 100);
     tabPageList.tabpLabel[tabPageList.Index - 1].Text = String.Format("{0}:{1}", tabPageList.dtList[tabPageList.Index - 1].ToLongTimeString(), tabPageList.dtList[tabPageList.Index - 1].Millisecond / 100);
 }
        public void setOutlookFields(DateTime startDate, DateTime endDate, string room, DateTime startTime, DateTime endTime)
        {
            //Set To: field
            DateTime dateTimeStart;
            //String a = " 04:00 A.M";

            String test = startDate.ToLongDateString();
            String test2 = startDate.ToShortTimeString();
            String test4 = startDate.ToLongTimeString();
            String test3 = startDate.ToShortTimeString();

            dateTimeStart = DateTime.Parse(startDate.Month.ToString() + "/" + startDate.Day.ToString() + "/" + startDate.Year.ToString()  +" "+ startTime.Hour +":" + startTime.Minute +":" + startTime.Second+"." + startTime.Millisecond);

            DateTime dateTimeEnd;
            dateTimeEnd = DateTime.Parse(endDate.Month.ToString() + "/" + endDate.Day.ToString() + "/" + endDate.Year.ToString() + " " + endTime.Hour + ":" + endTime.Minute + ":" + endTime.Second + "." + endTime.Millisecond);

            //if (dateTimeStart > dateTimeEnd)
            //{

            //}
            //else
            //{
                (Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as Outlook.AppointmentItem).StartInStartTimeZone = dateTimeStart;
                (Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as Outlook.AppointmentItem).EndInEndTimeZone = dateTimeEnd;
                (Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as Outlook.AppointmentItem).Location = room;
            //}
        }
Example #8
0
 private void CheckPause(string data)
 {
     if (data.Contains("recaptcha_response_field"))
     {
         StatusUpdate(this, new StatusChanged { ChangedData = ChangedType.Stop, Param = 1 });
         return;
     }
     if (data.Contains("class=\"i3\"") || data.Contains("class=\"i4\""))
     {
         StatusUpdate(this, new StatusChanged() { ChangedData = ChangedType.Stop, Param = 0 });
         return; // no igm found, go on processing.
     }
     if(NextRead > DateTime.Now)
         return; // too short interval, go on pausing.
     data = this.pageQuerier.PageQuery(0, "nachrichten.php", null, true, true);
     if(data == null)
         return; // cannot read... network problem?
     int next = rand.Next(15,30);
     NextRead = DateTime.Now.AddMinutes(next);
     if(Regex.Match(data, "<a href=\"nachrichten.php[^\"]+\">" + RemoteStopWord + "</a>", RegexOptions.IgnoreCase).Success)
     {
         NextExec = DateTime.Now.AddMinutes(next + rand.Next(1,5));
         DebugLog("Pause: To " + NextExec.ToLongTimeString(), DebugLevel.W);
         StatusUpdate(this, new StatusChanged() { ChangedData = ChangedType.Stop, Param = 1 });
     }
     else
         StatusUpdate(this, new StatusChanged() { ChangedData = ChangedType.Stop, Param = 0 });
 }
Example #9
0
        public string EncryptTime(DateTime time)
        {
            string timeString = time.ToLongTimeString();
             string encryptString =  Crypto.Encrypt(timeString);

             return encryptString;
        }
Example #10
0
 private void Form1_Load(object sender, EventArgs e)
 {
     LeXML L = new LeXML(File);
     label1.Text = O.Retorna_Pos_Ult_Prodt().ToString();
     Tempo_Atual = DateTime.Now;
     DataHora.Text = Tempo_Atual.ToLongDateString()+"  -  " + Tempo_Atual.ToLongTimeString();
 }
Example #11
0
        /// <summary>
        /// Цифровые часы
        /// </summary>
        /// <param name="graphics"></param>
        public void DrawDigitalClock(Graphics graphics, Point point)
        {
            _time = DateTime.Now;

            graphics.DrawString(_time.ToLongTimeString(), new Font("Arial", 30),
                new SolidBrush(Color.Red), point);
        }
Example #12
0
 public Call(DateTime dateTime, string phoneNumber, int duration)
 {
     this.Date = dateTime.ToShortDateString();
     this.Time = dateTime.ToLongTimeString();
     this.DialedPhone = phoneNumber;
     this.DurationInSeconds = duration;
 }
Example #13
0
        private void timer_Tick(object sender, EventArgs e)
        {
            _dtNow = DateTime.Now;
            DatetimeNow = _dtNow.ToLongTimeString();
            _sec = _dtNow.Second;
            _min = _dtNow.Minute;
            _hor = _dtNow.Hour;

            _angle = Math.PI / 30 * _sec - Math.PI / 2;

            if (_lnHor != null && _lnMin != null && _lnHor != null)
            {
                _lnSec.X2 = 50 + Math.Cos(_angle) * _secLen;
                _lnSec.Y2 = 50 + Math.Sin(_angle) * _secLen;

                _angle = Math.PI / 1800 * (_min * 60 + _sec) - Math.PI / 2;

                _lnMin.X2 = 50 + Math.Cos(_angle) * _minLen;
                _lnMin.Y2 = 50 + Math.Sin(_angle) * _minLen;

                _angle = Math.PI / 21600 * (_hor * 3600 + _min * 60 + _sec) - Math.PI / 2;

                _lnHor.X2 = 50 + Math.Cos(_angle) * _horLen;
                _lnHor.Y2 = 50 + Math.Sin(_angle) * _horLen;
            }
        }
Example #14
0
        public NRVFile(string ERName, string Door, string CardType, DateTime StartTime, string NVRFile, string VideoRecord)
        {
            InitializeComponent();

            txt_ERName.Text = ERName;
            txt_Door.Text = Door;
            txt_StartTime.Text = StartTime.ToLongDateString() + " " + StartTime.ToLongTimeString();
            txt_EventName.Text = CardType;
            nvrFile = NVRFile;

            string showNVRFile= "/VideoRecord/" + nvrFile.Trim();
            //media.Source = new Uri("http://192.192.85.64/secure/ClientBin" + showNVRFile,UriKind.Absolute);
            media.Source = new Uri(VideoRecord + showNVRFile, UriKind.Absolute);
           

            double totalSeconds = media.Position.TotalSeconds;      // 获取当前位置秒数
            double nowTotalSeconds = media.NaturalDuration.TimeSpan.TotalSeconds;  //获取文件总播放秒数

            nowTime.Text = totalSeconds.ToString();
            totalTime.Text = (Math.Round(nowTotalSeconds, 0)).ToString();

            //WebClient wc = new WebClient();
            //wc.OpenReadCompleted +=(s,a)=>
            //    {
            //        media.SetSource(a.Result as Stream);
            //    };
            //wc.OpenReadAsync(new Uri("http://192.192.85.64/secure/ClientBin" + showNVRFile,UriKind.Absolute));
        }
		public void WriteText(System.IO.TextWriter writer, LogLevels level, DateTime dateTime, string text)
		{
			string sLevel;
			switch (level)
			{
				case LogLevels.Info:
				default:
					sLevel = "I";
					break;

				case LogLevels.Diagnostic:
					sLevel = "D";
					break;

				case LogLevels.Warning:
					sLevel = "W";
					break;

				case LogLevels.Error:
					sLevel = "E";
					break;
			}

			writer.WriteLine("{0}:{1} {2} [{4}]: {3}",
				sLevel, dateTime.ToShortDateString(), dateTime.ToLongTimeString(),
				text, Thread.CurrentThread.GetHashCode());
		}
Example #16
0
 public int InsertSensorData(
     int sensorMetadataId, 
     int intermediateHwMetadataId, 
     string measuredData, 
     DateTime measuredAt, 
     DateTime polledAt, 
     int sensorType)
 {
     // using (SqlConnection connection = new SqlConnection(connectionStringb.ConnectionString))
     using (SqlConnection connection = new SqlConnection(this.connectionString))
     {
         string queryString =
             string.Format(
                 "INSERT INTO SensorData (SensorMetadataId, IntermediateHwMedadataId, MeasuredData, MeasuredAt, SendAt, PolledAt, UpdatedAt, CreatedAt,  SensorType) VALUES ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}');",
                 sensorMetadataId,
                 intermediateHwMetadataId,
                 measuredData,
                 measuredAt.ToLongDateString() + " " + measuredAt.ToLongTimeString(),
                 measuredAt.ToLongDateString() + " " + measuredAt.ToLongTimeString(),
                 polledAt.ToLongDateString() + " " + polledAt.ToLongTimeString(),
                 measuredAt.ToLongDateString() + " " + measuredAt.ToLongTimeString(),
                 measuredAt.ToLongDateString() + " " + measuredAt.ToLongTimeString(),
                 sensorType);
         SqlCommand command = new SqlCommand(queryString, connection);
         return ExecuteSQLCommand(command);
     }
 }
        public void MarkCycleTime(DateTime time, bool success)
        {
            cycleItem.Show();
            cycleTime.Text = "Recycled at " + time.ToLongTimeString();

            failureItem.Visibility = success ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
        }
        public void AddListViewItem(bool recieve, MQTTPacketTypes packetType, int? packetId, string topic, string data, DateTime time)
        {
            if (testing) return;
            // type id topic data time
            ListViewItem newItem = new ListViewItem(new[]
            {
                (packetId != null ? ((int) packetId).ToString() : ""),
                GetPacketTypeString(packetType),
                topic,
                data,
                time.ToShortDateString() + " " + time.ToLongTimeString()
            }) {BackColor = recieve ? Color.FromArgb(148, 255, 114, 114) : Color.FromArgb(148, 61, 218, 61)};
            _listViewItems.Add(newItem);

            if (packetType == MQTTPacketTypes.PINGRESP)
                UpdateLastPingTimeLabel(@"Last successful ping at ",time);

            if (autoScrollCheckBox.Checked)
                newItem.EnsureVisible();

            if (_showPings // if it is a ping and we are allowed to show it just let it through
                || (packetType != MQTTPacketTypes.PINGREQ && packetType != MQTTPacketTypes.PINGRESP)) // or if it isn't a ping
            {
                outputListView.Invoke((MethodInvoker) delegate
                {
                    AddListViewItem(newItem);
                });
            }
        }
Example #19
0
        /// <summary>
        ///    /************************************************************************************************
        ///    Populate CUSTOMER table
        ///    By Wesley D. Brown
        ///    Date 11/24/2007
        ///    Mod
        ///    **Description**
        ///    Functions:
        ///    **End Discription**
        ///    **Change Log**
        ///    **End Change Log**
        ///    ************************************************************************************************/
        /// </summary>
        /// <returns></returns>
        public void BuildCustomerTable()
        {
            var currdate = new DateTime();
            var dt = new DataTable();

            var sqlConnect = new SqlConnection {ConnectionString = Sqlconn};
            sqlConnect.Open();

            var dc = new SqlCommand("select top 0 * from dbo.CUSTOMER", sqlConnect) {CommandType = CommandType.Text};
            var da = new SqlDataAdapter(dc);
            da.FillSchema(dt, SchemaType.Mapped);

            sqlConnect.Close();
            sqlConnect.Dispose();

            var bulkCopy = new SqlBulkCopy(Sqlconn,SqlBulkCopyOptions.TableLock) {DestinationTableName = "dbo.CUSTOMER", BatchSize = 10000};

            int i = NumWh;
            int tid = (NumWh*10*3000) + 1;

            while (i < MaxNumWh + 1)
            {
                for (int id = 1; id < 11; id++)
                {
                    for (int cid = 1; cid < 3001; cid++)
                    {
                        DataRow dr  = dt.NewRow();
                        dr["C_ID"] = "C_W" + i + "_D" + id + "_" + cid;
                        dr["C_D_ID"] = "D_W" + i + "_" + id;
                        dr["C_W_ID"] = "W_" + i;
                        dr["C_FIRST"] = RandomString(5, 16);
                        dr["C_MIDDLE"] = "oe";
                        dr["C_LAST"] = RandomString(8, 16);
                        dr["C_STREET_1"] = RandomString(10, 20);
                        dr["C_STREET_2"] = RandomString(10, 20);
                        dr["C_CITY"] = RandomString(10, 20);
                        dr["C_STATE"] = RandomString(2, 2);
                        dr["C_ZIP"] = RandZip();
                        dr["C_PHONE"] = RandomString(12, 12);
                        dr["C_SINCE"] = currdate.ToLongTimeString();
                        dr["C_CREDIT"] = "GC";
                        dr["C_CREDIT_LIM"] = 5000;
                        dr["C_DISCOUNT"] = .5;
                        dr["C_BALANCE"] = -10.00;
                        dr["C_YTD_PAYMENT"] = 10.00;
                        dr["C_PAYMENT_CNT"] = 1;
                        dr["C_DELIVERY_CNT"] = 0;
                        dr["C_DATA"] = RandomString(300, 500);
                        dr["SEQ_ID"] = tid;
                        dt.Rows.Add(dr);
                    }
                }
                bulkCopy.WriteToServer(dt);
                dt.Clear();

                i++;
            }
            return;
        }
		/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/
		
		public void Log (object source, robotlegs.bender.framework.impl.LogLevel level, DateTime timestamp, object message, params object[] messageParameters)
		{
			UnityEngine.Debug.Log(string.Format(timestamp.ToLongTimeString()
			                      + " " + level.ToString()
			                      + " " + _context
			                      + " " + source
			                      + " " + message, messageParameters));
		}
		/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/

		public void Log (object source, robotlegs.bender.framework.impl.LogLevel level, DateTime timestamp, object message, params object[] messageParameters)
		{
			Console.WriteLine(timestamp.ToLongTimeString()
			      + " " + level.ToString()
			      + " " + _context
			      + " " + source
			      + " " + message, messageParameters);
		}
Example #22
0
 public CallLogModel(int CalleeID, DateTime StartTime)
 {
     this.CalleeID = CalleeID;
     this.StartTime = StartTime;
     this.logEntries = new EntitySet<CallLogEntry>(this.attachLog, this.detachLog);
     this._user = new EntityRef<UserModel>();
     this.CallLogID = CalleeID.ToString() + "_" + StartTime.ToLongTimeString();
 }
 public LogEventArgs(string Node, DateTime logTime, string title, string Type, string Msg)
 {
     node = Node;
     type = Type;
     msg = Msg;
     dateTime = logTime.ToShortDateString() + "," + logTime.ToLongTimeString();
     this.title = title;
 }
Example #24
0
		/// <summary>
		/// Generates an entity tag for the given key and last modification date.
		/// </summary>
		/// <param name="key">The entity key</param>
		/// <param name="modified">The modification date</param>
		/// <returns></returns>
		private static string GenerateEtag(string key, DateTime modified) {
			UTF8Encoding encoder = new UTF8Encoding();
			MD5CryptoServiceProvider crypto = new MD5CryptoServiceProvider();

			string str = key + modified.ToLongTimeString();
			byte[] bts = crypto.ComputeHash(encoder.GetBytes(str));
			return Convert.ToBase64String(bts, 0, bts.Length);
		}
        public void Execute(string ipAddress)
        {
            Manager = new RedisManagerPool(ipAddress);
            StartedAt = DateTime.UtcNow;

            var q = new Timer { Interval = 1000 };
            q.Elapsed += OnInterval;
            q.Enabled = true;

            using (PubSubServer = new RedisPubSubServer(Manager, Channel)
            {
                OnStart = () =>
                {
                    Console.WriteLine("OnStart: #" + Interlocked.Increment(ref StartCount));
                },
                OnHeartbeatSent = () =>
                {
                    Console.WriteLine("OnHeartbeatSent: #" + Interlocked.Increment(ref HeartbeatsSent));
                },
                OnHeartbeatReceived = () =>
                {
                    Console.WriteLine("OnHeartbeatReceived: #" + Interlocked.Increment(ref HeartbeatsReceived));
                },
                OnMessage = (channel, msg) =>
                {
                    Console.WriteLine("OnMessage: @" + channel + ": " + msg);
                },
                OnStop = () =>
                {
                    Console.WriteLine("OnStop: #" + Interlocked.Increment(ref StopCount));
                },
                OnError = ex =>
                {
                    Console.WriteLine("OnError: #" + Interlocked.Increment(ref ErrorCount) + " ERROR: " + ex);
                },
                OnFailover = server =>
                {
                    Console.WriteLine("OnFailover: #" + Interlocked.Increment(ref FailoverCount));
                },
                OnDispose = () =>
                {
                    Console.WriteLine("OnDispose: #" + Interlocked.Increment(ref DisposeCount));
                },
                OnUnSubscribe = channel =>
                {
                    Console.WriteLine("OnUnSubscribe: #" + Interlocked.Increment(ref UnSubscribeCount) + " channel: " + channel);
                },
            })
            {
                Console.WriteLine("PubSubServer StartedAt: " + StartedAt.ToLongTimeString());
                PubSubServer.Start();

                "Press Enter to Quit...".Print();
                Console.ReadLine();
                Console.WriteLine("PubSubServer EndedAt: " + DateTime.UtcNow.ToLongTimeString());
                Console.WriteLine("PubSubServer TimeTaken: " + (DateTime.UtcNow - StartedAt).TotalSeconds + "s");
            }
        }
Example #26
0
        // Static constructor to initialize the static variable.
        // It is invoked before the first instance constructor is run.
        static Bus()
        {
            globalStartTime = DateTime.Now;

            // The following statement produces the first line of output,
            // and the line occurs only once.
            Console.WriteLine("Static constructor sets global start time to {0}",
                globalStartTime.ToLongTimeString());
        }
Example #27
0
        public void OnTimeChanged(TimePicker view, int hour, int minute)
        {
            mDate = new DateTime(mDate.Year,  mDate.Month, mDate.Day, hour, minute, 0);

            Arguments.PutInt(EXTRA_HOUR, mDate.Hour);
            Arguments.PutInt(EXTRA_MINUTE, mDate.Minute);

            Console.WriteLine("Time Changed: {0}", mDate.ToLongTimeString());
        }
Example #28
0
 /// <summary>
 /// Logs the error with datetime to C:\apps\FotmLogs\FotmErrorLog.log.
 /// Also writes the error to console by default, change bool param to flip.
 /// </summary>
 /// <param name="currentDateTime">The date and time of the error.</param>
 /// <param name="errorMessage">The error message to write.</param>
 /// <param name="type">The type of log message to write.</param>
 /// <param name="writeToConsole">Set to true if the error should also be written to the console.</param>
 public static void LogMessage(DateTime currentDateTime, string errorMessage, LogType type = LogType.Error, bool writeToConsole = true, bool isAsync = true)
 {
     var logType = type.ToString().ToUpper();
     var error = $"{currentDateTime.ToLongTimeString()}--{logType.PadRight(10, '-')}{errorMessage}";
     if (isAsync)
         LogMessageAsync(error);
     else
         LogMessage(error);
     Console.WriteLine(error);
 }
Example #29
0
        public NoticeLabel(string Name, DateTime Time, double Offset)
        {
            InitializeComponent();

            this.NoticeName = Name;
            this.NoticeTime = Time;
            this.Offset     = Offset;

            NameLabel.Text = NoticeName;
            TimeLabel.Text = Time.ToLongTimeString();
        }
Example #30
0
        public void setFields(int versionPK, int customerPK, DateTime expectedDate, string comment, int pk, int employeePK, bool? contacted, bool done)
        {
            currentPK = pk;
            currentCustomer = customerPK;
            currentVersion = versionPK;

            useActual.Checked = done;

            if (done)
            {
                wasDone = true;
            }
            else
            {
                wasDone = false;
            }

            string versionID = Database.getVersionID(versionPK);

            string customerName = Database.getCustomerName(customerPK);

            List<Employee> employeeList = Database.GetEmployeeList();
            //employeeComboBox.DataSource

            employeeComboBox.ValueMember = "PK";
            employeeComboBox.DisplayMember = "Name";
            employeeComboBox.DataSource = employeeList;
            employeeComboBox.SelectedIndex = employeeList.FindIndex(k => k.PK == employeePK);
            //employeeComboBox.ValueType = typeof(Employee);

            versionLabel.Text = "Version: " + versionID;
            customerLabel.Text = "Customer: " + customerName;
            commentsTextBox.Text = comment;

            if (expectedDate != System.DateTime.MinValue)
            {
                expectedDatePicker.Text = expectedDate.ToShortDateString();
                expectedTimePicker.Text = expectedDate.ToLongTimeString();

                actualDatePicker.Text = DateTime.Now.ToShortDateString();
                actualTimePicker.Text = DateTime.Now.ToLongTimeString();
            }

            if (contacted == true)
            {
                contactedCB.Checked = true;
                this.wasContacted = true;
            }
            else
            {
                contactedCB.Checked = false;
                this.wasContacted = false;
            }
        }