예제 #1
0
        protected bool ValidateAndInitTo(string to)
        {
            DateTime?dt = RequestMessageUtility.GetDateTime(to);

            if (dt == null)
            {
                return(false);
            }
            else
            {
                _To = Convert.ToDateTime(dt);
                return(true);
            }
        }
예제 #2
0
        protected bool ValidateAndInitFrom(string from)
        {
            DateTime?dt = RequestMessageUtility.GetDateTime(from);

            if (dt == null)
            {
                return(false);
            }
            else
            {
                _From = Convert.ToDateTime(dt);
                return(true);
            }
        }
예제 #3
0
        protected override bool ValidationAndInit()
        {
            List <string> strList = RequestMessageUtility.GetElement(_Message.Content);

            if (strList == null || strList.Count < 1)
            {
                return(false);
            }
            else if (strList.Count != RequestMessageUtility.GetElement(_Template).Count)
            {
                return(false);
            }
            else
            {
                return
                    (ValidateAndInitFromTo(strList[1], strList[2]) &&
                     ValidateAndInitCostTime() && InitPlace(strList[3]) && InitReason(strList[4]));
            }
        }