Exemple #1
0
        /// <summary>
        /// 删除某范围账目流水信息
        /// </summary>
        /// <param name="time"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public bool deleteLogMessage(DateTime time, flagCode code)
        {
            try {
                switch (code)
                {
                case flagCode.day:
                    DB.deleteByDay(time.Year, time.Month, time.Day);
                    break;

                case flagCode.month:
                    DB.deleteByMonth(time.Year, time.Month);
                    break;

                case flagCode.year:
                    DB.deleteByYear(time.Year);
                    break;

                default:
                    break;
                }
            }
            catch (Exception) {
                return(false);
            }
            return(true);
        }
Exemple #2
0
 public bool deteleLogMessageByYear(DateTime time)
 {
     return(DB.deleteByYear(time.Year));
 }