<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pointcard_generateterms.aspx.cs" Inherits="VA.Modules.JDingMember.pointcard.pointcard_generateterms" %>
<% 
    string termUnit = Request.QueryString["termunit"];
    if (termUnit == "月")
    {
        DateTime baseDateTime = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
        for (int i = 1; i <= 5; i++)
        {
            string radioID= "terms_" + i.ToString();
            string itemText = baseDateTime.AddMonths(i).ToString("yyyyMM", System.Globalization.CultureInfo.InvariantCulture);
            
            //单选框
            //Response.Write("<input type='radio' id='"+ radioID +"' name='terms' value='"+ itemText +"' /><label for='"+ radioID +"'>"+ itemText +"</label>");
            
            //复选框
            Response.Write("<input type='checkbox' id='" + radioID + "' name='terms' value='" + itemText + "' onclick='caculateAmount();' /><label for='" + radioID + "' onclick='caculateAmount();' >" + itemText + "</label>");
        }
    }
    else if (termUnit == "年")
    {
        DateTime baseDateTime = new DateTime(DateTime.Today.Year, 1, 1);
        for (int i = 1; i <= 5; i++)
        {
            string radioID = "terms_" + i.ToString();
            string itemText = baseDateTime.AddYears(1).ToString("yyyy", System.Globalization.CultureInfo.InvariantCulture);
            
            //单选框
            //Response.Write("<input type='radio' id='" + radioID + "' name='terms' value='" + itemText + "' /><label for='" + radioID + "'>" + itemText + "</label>");
            
            //复选框
            Response.Write("<input type='checkbox' id='" + radioID + "' name='terms' value='" + itemText + "' onclick='caculateAmount();' /><label for='" + radioID + "' onclick='caculateAmount();' >" + itemText + "</label>");
        }
    }
%>