Example #1
0
        private void CheckErrorInBookNumber()
        {
            CheckBookItem = CheckBookHelper.GetCheckBookNumber(serie.Series);

            switch (CheckBookItem.ErrorCode)
            {
            case 0:
                ErrorMessage = string.Empty;
                if (SelectedDownPayment == null)
                {
                    return;
                }
                SelectedDownPayment.NumAtCard = checkBookItem.Number.ToString(CultureInfo.InvariantCulture);
                break;

            case 1:
                if (SelectedDownPayment == null)
                {
                    return;
                }
                ErrorMessage = CheckBookItem.ErrorMessage;
                SelectedDownPayment.NumAtCard = string.Empty;
                break;

            default:
                //todo: hacer el error máximo
                break;
            }
            RaisePropertyChanged("IsReadOnlyCheckBookNumber");
        }