Пример #1
0
        private void CreateStatusHistory(bool as_is_flag)
        {
            try
            {
                claim_status currentStatus;
                if (cmbStatus.SelectedIndex >= 0)
                {
                    currentStatus = (claim_status)cmbStatus.SelectedItem;
                }
                else
                {
                    currentStatus = null;
                }

                if (chkSetRevisitDate.Checked)
                {
                    _formClaim.CreateStatusHistory(currentStatus, ctlRevisitDate.DateValue, as_is_flag);
                }
                else
                {
                    _formClaim.CreateStatusHistory(currentStatus, _formClaim.revisit_date, as_is_flag);
                }
            }
            catch (Exception err)
            {
                LoggingHelper.Log("Error in frmClaimStatus.CreateStatusHistory\n" + err.Message, LogSeverity.Error);
                MessageBox.Show(this, "An error occurred creating the status history for this change. Your save should continue as " +
                                "normal, but please notify a system administrator of this error:\n\n" + err.Message, "Error saving note",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }