Beispiel #1
0
        /// <summary>
        /// ValidateDataToSearch
        /// </summary>
        /// <returns></returns>
        /// <author>Trada</author>
        /// <date>Friday, Feb 17 2006</date>
        private bool ValidateDataToSearch()
        {
            const string METHOD_NAME = THIS + ".ValidateDataToSearch()";

            try
            {
                if (FormControlComponents.CheckMandatory(cboYear))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    cboYear.Focus();
                    return(false);
                }
                if (FormControlComponents.CheckMandatory(cboMonth))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    cboMonth.Focus();
                    return(false);
                }
                if (FormControlComponents.CheckMandatory(txtCustomer))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    txtCustomer.Focus();
                    return(false);
                }
                return(true);
            }
            catch (PCSException ex)
            {
                throw new PCSException(ex.mCode, METHOD_NAME, ex);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }