Example #1
0
        public IHttpActionResult GetCondoRegisterMenu2(SearchMap searchDto)
        {
            var        repos    = new TDAssetRespository();
            SetionType sectionT = new SetionType();

            /* switch (SectionType)
             * {
             *   case "1":sectionT = SetionType.Region;break;
             *   case "2": sectionT = SetionType.Provice; break;
             *   case "3": sectionT = SetionType.Amphur; break;
             * }*/

            if (searchDto.FromYear != null && searchDto.FromMonth != null)
            {
                searchDto.FromYearMonth = searchDto.FromYear + Converting.ToInt(searchDto.FromMonth).ToString("##00");
            }

            if (searchDto.ToYear != null && searchDto.ToMonth != null)
            {
                searchDto.ToYearMonth = searchDto.ToYear + Converting.ToInt(searchDto.ToMonth).ToString("##00");
            }

            var estimateData = repos.GetCondoRegisterMenu2(searchDto);

            return(Json(estimateData));
        }