借记单开始日期 [英] Debit Order StartDate

查看:71
本文介绍了借记单开始日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我有一个棘手的问题..
假设用户可以选择每月每月15号,20号,25号和30号何时扣除其银行帐户.现在,您必须设置借记单日期...请牢记此规则...

Hi Guys, i have a tricky problem..
Assume the user has an option to choose when should his bank account be deducted each month thus:15th ,20th,25th and 30th of each month. Now you have to set a debit order date... bearing this rule in mind...

If today is 30 November 2011 the DebitStartDate can only be the 1st – 31st of January 2012
If today is 19 November 2011 the DebitStartDate can only be the 1st – 31st of December 2011


如果用户选择15号,则必须设置其他日期,所有选项均以此类推..我想听听您的想法..


If the user selects 15th a different date must be set and so and on for all option.. i would like to hear your ideas please..

推荐答案

Get date from user
If day is not one of (15, 20, 25, 30)
    Throw exception
If today is greater than (some limit value) AND
    Month is less than this month plus (some limit value)
        Throw exception
If date is valid
    Set date in Target
Else
    Throw exception


我让您填写详细信息.


I leave you to fill in the details.


这篇关于借记单开始日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆