예제 #1
0
        /// <summary>
        /// 根据用户名,获取建筑列表,第一个建筑能耗分类,第一个建筑的第一个分类的支路列表以及支路的月报表
        /// </summary>
        /// <returns></returns>
        public object GetReport()
        {
            try
            {
                string userName = User.Identity.Name;

                return(service.GetViewModel(userName));
            }
            catch (Exception e)
            {
                return(e.Message);
            }
        }
예제 #2
0
        public void TestGetViewModelBy_user_Build()
        {
            MultiRateService service = new MultiRateService();
            var viewModel            = service.GetViewModel("Admin", "000001G003");

            Console.WriteLine(UtilTest.GetJson(viewModel));
        }
예제 #3
0
        public void TestGetViewModelBy_Build_type_date_YY()
        {
            MultiRateService service = new MultiRateService();
            DateTime         today   = DateTime.Now;
            var viewModel            = service.GetViewModel("000001G001", "YY", today.ToString("yyyy-MM-dd"));

            Console.WriteLine(UtilTest.GetJson(viewModel));
        }