Пример #1
0
        private void RestorePreviousState()
        {
            DbTransaction         dbTransaction = new DbTransaction();
            TimeSheetDetailsTable previousTask  = dbTransaction.GetUnfinshedTaskDetails();

            if (previousTask != null)
            {
                this.taskIDTextBox.Text      = previousTask.TaskID;
                this.taskNameComboBox.Text   = previousTask.TaskName;
                this.clientNameComboBox.Text = previousTask.ClientName;
                this.codingCheckBox.Checked  = bool.Parse(previousTask.IsCoded);
                this.reviewCheckBox.Checked  = bool.Parse(previousTask.IsReviewed);
                this.checkinCheckBox.Checked = bool.Parse(previousTask.IsCheckin);
                this.commentTextBox.Text     = previousTask.Comment;
                this.startTimeValue.Text     = excelWriter.GetStandardTimeFormat(previousTask.TaskStartTime);

                this.endButton.Enabled   = true;
                this.startButton.Enabled = false;
                this.endButton.Focus();
                this.ActiveControl = this.endButton;

                ExportButton_Disable();
                DisableTextBoxes();
            }
            else
            {
                this.endButton.Enabled = false;
                ExportButton_Enable();
            }
        }