Ejemplo n.º 1
0
        /// <summary>
        /// 获取报告期的报告日
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        private static int GetDay(String p)
        {
            int result = 30;

            switch (CommDao.SafeToInt(p))
            {
            case 1:
                result = 31;
                break;

            case 2:
                result = 30;
                break;

            case 3:
                result = 30;
                break;

            case 4:
                result = 31;
                break;

            case 5:
                result = 30;
                break;

            case 6:
                result = 31;
                break;
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取报告期的报告月
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        private static int GetMonth(String p)
        {
            int result = 3;

            switch (CommDao.SafeToInt(p))
            {
            case 1:
                result = 3;
                break;

            case 2:
                result = 6;
                break;

            case 3:
                result = 9;
                break;

            case 4:
                result = 12;
                break;

            case 5:
                result = 6;
                break;

            case 6:
                result = 12;
                break;
            }
            return(result);
        }