コード例 #1
0
ファイル: ApiController.cs プロジェクト: BoyJJ/Shxi
        /// <summary>
        /// 查询部门(ID)内所有人的某月工资
        /// </summary>
        /// <param name="departmentid">部门ID</param>
        /// <param name="time">要查询的年月eg:2019-01-01、2019-12-01</param>
        /// <returns>工资记录列表</returns>
        public object QueryDepartmentWage(string departmentid, string time)
        {
            WageService wageService = new WageService();
            var         wageList    = wageService.QueryDepartmentWage(departmentid, time);

            return(Json(new
            {
                code = 200,
                msg = "Wage query successfully!",
                wageList = wageList
            }));
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: BoyJJ/Shxi
        public static void Main()
        {
            WageRepository wageRepository = new WageRepository();
            WageService    wageService    = new WageService();
            var            a = wageService.QueryDepartmentWage("zjc2016001", "2019-12-01");
            //Console.WriteLine(a[0].Wagetime);
            var b = wageRepository.FixTime(a);

            foreach (var aa in b)
            {
                Console.WriteLine(aa.Wagetime.ToString() + " " + aa.Totalwage);
            }

            Console.ReadLine();
        }