public static bool ValidTaxBand(IEditTaxBandView view) { bool validition = true; decimal temp; if (string.IsNullOrEmpty(view.BandMin)) { validition = false; view.BandMinMessage = "不可为空"; } else if (!Decimal.TryParse(view.BandMin, out temp)) { validition = false; view.BandMinMessage = "格式错误"; } else if (Convert.ToDecimal(view.BandMin) < 0) { validition = false; view.BandMinMessage = "不可小于0"; } if (string.IsNullOrEmpty(view.TaxRate)) { validition = false; view.TaxRateMessage = "不可为空"; } else if (!Decimal.TryParse(view.TaxRate, out temp)) { validition = false; view.TaxRateMessage = "格式错误"; } else if (Convert.ToDecimal(view.TaxRate) < 0) { validition = false; view.TaxRateMessage = "不可小于0"; } return(validition); }
/// <summary> /// for test /// </summary> public AddTaxBandPresenter(IEditTaxBandView view, bool isPostBack, ITaxFacade mockTax) : this(view, isPostBack) { _ITax = mockTax; }
public AddTaxBandPresenter(IEditTaxBandView view, bool isPostBack) : base(view) { AttachViewEvent(); Init(isPostBack); }
/// <summary> /// fot test /// </summary> public UpdateTaxBandPresenter(IEditTaxBandView view, bool isPostBack, ITaxFacade mockTax) : base(view) { _ITax = mockTax; AttachViewEvent(); Init(isPostBack); }
public EditTaxBandBase(IEditTaxBandView view) { _IEditTaxBandView = view; }