/*__________________________________________________________________________________________*/
        private void BtnAppend_Click(object sender, EventArgs e)
        {
            string   commentText      = checkNull(this.TxbComment.Text);
            string   empNumber        = checkNull(this.TxbEmployeeNumber.Text);
            Category selectedCategory = (Category)this.CmbBoxCategory.SelectedItem;
            string   categoryId       = selectedCategory.CategoryId.ToString();

            if (commentText.Equals(string.Empty) || categoryId.Equals("0"))
            {
                MessageBox.Show("Please enter Comments and category and submit again.", "Error", MessageBoxButtons.OK);

                if (commentText.Equals(string.Empty))
                {
                    this.TxbComment.Focus();
                }

                if (categoryId.Equals(string.Empty))
                {
                    this.LblCategory.ForeColor = Color.Red;
                    this.LblCategory.Focus();
                }
                return;
            }

            bool         retValue = false;
            DialogResult dgr;
            string       errorCode    = string.Empty;
            string       errorMessage = string.Empty;

            try
            {
                do
                {
                    string userId = Support.Logic.CashlinxPawnSupportSession.Instance.LoggedInUserSecurityProfile.UserID;
                    retValue = new Support.Controllers.Database.Procedures.CustomerDBProcedures(GlobalDataAccessor.Instance.DesktopSession).
                               WriteSupportCustomerCommentToDBData(
                        CustToEdit.CustomerNumber,
                        commentText,
                        userId,
                        categoryId,
                        empNumber,
                        out errorCode,
                        out errorMessage);

                    if (retValue)
                    {
                        var commentRecord = new SupportCommentsVO();
                        commentRecord.CommentNote    = commentText;
                        commentRecord.LastUpDateDATE = DateTime.Now;
                        commentRecord.UpDatedBy      = Support.Logic.CashlinxPawnSupportSession.Instance.LoggedInUserSecurityProfile.UserID;;
                        commentRecord.Category       = selectedCategory.CategoryName;//categoryId;
                        commentRecord.EmployeeNumber = empNumber;
                        //CustToEdit.addSupportComment(commentRecord);
                        CustToEdit.insertSupportComment(commentRecord, 0);
                        break;
                    }
                    else
                    {
                        dgr = errorCode.Equals("1") ? MessageBox.Show("Inserting Customer Comments Failed. Please retry or cancel" + ":  " + errorMessage, "Warning", MessageBoxButtons.OK) : MessageBox.Show("Inserting Customer Comments Failed. Please retry or cancel" + ":  " + errorMessage, "Error", MessageBoxButtons.OK);
                    }
                } while (dgr == DialogResult.Retry);
                if (errorCode.Equals("1"))
                //    return;
                //this.Close();
                {
                    this.NavControlBox.IsCustom     = true;
                    this.NavControlBox.CustomDetail = "SupportCustomerComment";
                    this.NavControlBox.Action       = NavBox.NavAction.BACK;
                }
            }
            catch (ApplicationException aEx)
            {
                //exception already handled at the oracledataaccessor level
                MessageBox.Show(aEx.Message);
            }
            //this.Close();
            this.NavControlBox.IsCustom     = true;
            this.NavControlBox.CustomDetail = "SupportCustomerComment";
            this.NavControlBox.Action       = NavBox.NavAction.BACK;
        }
        /*__________________________________________________________________________________________*/
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            DialogResult dgr;

            checkDateOfBirth();
            if (custDateOfBirth.isValid)
            {
                checkReqFields();
                if (_isFormValid)
                {
                    bool retValue = false;
                    getFormData();
                    mapFormFields();
                    if (custInfoChanged())
                    {
                        /* *****
                        * ***** Skip duplicate check. Refer to Bugzilla #117
                        * ***** (http://192.168.106.16/bugzilla/show_bug.cgi?id=117)
                        * *****
                        *  //If name and dob is changed check to see if there are
                        *  //any other customers in the system with the same information
                        *  if (_nameChanged || _dobChanged)
                        *  {
                        *   if (doNameCheck())
                        *   {
                        *       //if there are duplicate customers, show the error message and let the user
                        *       //decide whether they would like to continue with the change or not
                        *           dgr = MessageBox.Show(Commons.GetMessageString("DuplicateNameMessage"), "Warning", MessageBoxButtons.YesNo);
                        *           if (dgr == DialogResult.No)
                        *               return;
                        *   }
                        *  }
                        ***** */
                        try
                        {
                            do
                            {
                                retValue = new Support.Controllers.Database.Procedures.CustomerDBProcedures(GlobalDataAccessor.Instance.DesktopSession).UpdatePersonalInfoDetails(
                                    _strTitle, _strFirstName, _strMiddleName, _strLastName,
                                    _strTitleSuffix, _strLanguage, _strDob, _strSsn, _strUserId, _partyId,
                                    _marital_status,
                                    _spouse_first_name,
                                    _spouse_last_name,
                                    _spouse_ssn,
                                    _cust_sequence_number,
                                    _privacy_notification_date,
                                    _opt_out_flag,
                                    _status,
                                    _reason_code,
                                    _last_verification_date,
                                    _next_verification_date,
                                    _cooling_off_date_pdl,
                                    _customer_since_pdl,
                                    _spanish_form,
                                    _prbc,
                                    _planbankruptcy_protection,
                                    _years,
                                    _months,
                                    _own_home,
                                    _monthly_rent,
                                    _military_stationed_local,
                                    out _errorCode, out _errorMsg);
                                if (retValue)
                                {
                                    MessageBox.Show("Customer information updated");
                                    var updatedCustomer = Support.Logic.CashlinxPawnSupportSession.Instance.ActiveCustomer;

                                    /*CustomerVOForSupportApp updatedCustomer = new CustomerVOForSupportApp
                                     *                               {
                                     *                                   FirstName = _strFirstName,
                                     *                                   MiddleInitial = _strMiddleName,
                                     *                                   LastName = _strLastName,
                                     *                                   DateOfBirth = _dateOfBirth,
                                     *                                   CustTitle = _strTitle,
                                     *                                   CustTitleSuffix = _strTitleSuffix,
                                     *                                   NegotiationLanguage = _strLanguage,
                                     *                                   SocialSecurityNumber = _strSsn
                                     *                               };
                                     */
                                    updatedCustomer.FirstName            = _strFirstName;
                                    updatedCustomer.MiddleInitial        = _strMiddleName;
                                    updatedCustomer.LastName             = _strLastName;
                                    updatedCustomer.DateOfBirth          = _dateOfBirth;
                                    updatedCustomer.CustTitle            = _strTitle;
                                    updatedCustomer.CustTitleSuffix      = _strTitleSuffix;
                                    updatedCustomer.NegotiationLanguage  = _strLanguage;
                                    updatedCustomer.SocialSecurityNumber = _strSsn;


                                    updatedCustomer.MaritalStatus      = _marital_status;
                                    updatedCustomer.CustSequenceNumber = _cust_sequence_number;
                                    updatedCustomer.OptOutFlag         = _opt_out_flag;
                                    if (!string.IsNullOrEmpty(_last_verification_date))
                                    {
                                        updatedCustomer.LastVerificationDate = Convert.ToDateTime(_last_verification_date);
                                    }
                                    else
                                    {
                                        updatedCustomer.LastVerificationDate = DateTime.MinValue;
                                    }

                                    if (!string.IsNullOrEmpty(_next_verification_date))
                                    {
                                        updatedCustomer.NextVerificationDate = Convert.ToDateTime(_next_verification_date);
                                    }
                                    else
                                    {
                                        updatedCustomer.NextVerificationDate = DateTime.MinValue;
                                    }


                                    //DateTime _lastVerDate;
                                    //DateTime _nextVerDate;

                                    if (!string.IsNullOrEmpty(_years))
                                    {
                                        updatedCustomer.Years = Convert.ToInt32(_years);
                                    }

                                    if (!string.IsNullOrEmpty(_months))
                                    {
                                        updatedCustomer.Months = Convert.ToInt32(_months);
                                    }
                                    updatedCustomer.OwnHome = _own_home;
                                    updatedCustomer.MilitaryStationedLocal = _military_stationed_local;

                                    /*updatedCustomer.SpouseFirstName = _spouse_first_name;
                                     * updatedCustomer.SpouseLastName = _spouse_last_name;
                                     * updatedCustomer.SpouseSsn = _spouse_ssn;
                                     * updatedCustomer.PrivacyNotificationDate = Convert.ToDateTime(_privacy_notification_date);
                                     * updatedCustomer.Status = _status;
                                     * updatedCustomer.ReasonCode = _reason_code;
                                     * updatedCustomer.CoolingOffDatePDL = Convert.ToDateTime(_cooling_off_date_pdl);
                                     * updatedCustomer.CustomerSincePDL = Convert.ToDateTime(_customer_since_pdl);
                                     * updatedCustomer.SpanishForm = _spanish_form;
                                     * updatedCustomer.PRBC = _prbc;
                                     * updatedCustomer.PlanBankruptcyProtection = _planbankruptcy_protection;
                                     */
                                    string monthlyRent = checkNull(_monthly_rent);
                                    if (!monthlyRent.Equals(string.Empty))
                                    {
                                        updatedCustomer.MonthlyRent = Convert.ToInt32(_monthly_rent);
                                    }
                                    else
                                    {
                                        updatedCustomer.MonthlyRent = 0;
                                    }
                                    //double Num;
                                    //bool isNum = double.TryParse(_monthly_rent, out Num);
                                    //if (isNum)
                                    //{
                                    //    updatedCustomer.MonthlyRent = Convert.ToDouble(_monthly_rent);
                                    //}
                                    //else
                                    //{
                                    //    updatedCustomer.MonthlyRent = 0;
                                    //}
                                    updatedCustomer.Age = _age != 0 ? _age : _custToEdit.Age;

                                    /*Form ownerForm = this.Owner;
                                     * if (ownerForm.GetType() == typeof(ViewCustomerInformation))
                                     * {
                                     *
                                     *  ((ViewCustomerInformation)ownerForm).UpdatedCustomerToView = updatedCustomer;
                                     *  ((ViewCustomerInformation)ownerForm).ShowUpdates = true;
                                     * }
                                     * updatedCustomer = null; */

                                    break;
                                }
                                else
                                {
                                    dgr = _errorCode.Equals("1") ? MessageBox.Show(Commons.GetMessageString("CustPersInfoUpdateFailure") + ":  " + _errorMsg, "Warning", MessageBoxButtons.OK) : MessageBox.Show(Commons.GetMessageString("CustPersInfoUpdateFailure") + ":  " + _errorMsg, "Error", MessageBoxButtons.OK);
                                }
                            } while (dgr == DialogResult.Retry);
                            if (_errorCode.Equals("1"))
                            {
                                return;
                            }
                        }
                        catch (ApplicationException aEx)
                        {
                            //exception already handled at the oracledataaccessor level
                            MessageBox.Show(aEx.Message);
                        }
                    }
                    else
                    {
                        MessageBox.Show(Commons.GetMessageString("NoChangesInForm"));
                    }
                    //this.Close();
                    //this.Dispose(true);
                    this.NavControlBox.IsCustom     = true;
                    this.NavControlBox.CustomDetail = "UpdateCustomerDetails";
                    this.NavControlBox.Action       = NavBox.NavAction.BACK;
                }
                else
                {
                    MessageBox.Show(Commons.GetMessageString("FormRequiredFieldsFilledError"));
                }
            }
            else
            {
                MessageBox.Show(Commons.GetMessageString("FormRequiredFieldsFilledError"));
            }
        }