Example #1
0
        private static object GetTax(dynamic _)
        {
            int year;
            int month;
            int day;

            try
            {
                year  = int.Parse(_.year);
                month = int.Parse(_.month);
                day   = int.Parse(_.day);
            }
            catch (Exception e)
            {
                return(Helper.ErrorResponse(e, HttpStatusCode.InternalServerError));
            }

            try
            {
                return(Taxes.GetTax(_.municipality.ToString(), new DateTime(year, month, day)));
            }
            catch (Exception e)
            {
                return(Helper.ErrorResponse(e, HttpStatusCode.InternalServerError));
            }
        }