Exemple #1
0
        //TODO: Logger
        //TODO: foreign plaque and firefox problem
        public String GetPlaque()
        {
            String finalPlaque = "";

            try
            {
//                if (chkStrange.Checked)
//                {
//                    finalPlaque = CommonUtilities.CorrectStringFarsi(txtStrange.Text);
//                }
//                else
                {
                    finalPlaque = txtTwoLeft.Text + txtAlphabet.Text + txtThree.Text + "ایران" + txtCityCode.Text;
                }
                return(CommonUtilities.CorrectStringFarsi(finalPlaque));
            }
            catch (FormatException ex)
            {
                Log.Debug("Entering wrong format data in baskool billID", ex);
                lblError.Text    = "لطفا شماره پلاک و یا شماره قبض باسکول را صحیح وارد نمایید";
                lblError.Visible = true;
            }
            catch (UserInterfaceException ex)
            {
                Log.Warn("Getting exception in loading data for PatteNo:'" + txtPatteNo.Text + "' or plaque:'" + finalPlaque + "'", ex);
                lblError.Text    = ex.Message;
                lblError.Visible = true;
            }
            catch (Exception ex)
            {
                Log.Fatal("Unexpected exception in loading information for PatteNo:'" + txtPatteNo.Text + "' or plaque:'" + finalPlaque + "'", ex);
                lblError.Text    = ex.Message;
                lblError.Visible = true;
            }
            return(null);
        }