If e.DataCol.name = "公历日期" Then
systemready = False
If e.NewValue = Nothing Then
e.DataRow("农历日期") = Nothing
Else
e.DataRow("农历日期") = (New Lunar(e.NewValue)).LunarDate
End If
systemready = True
ElseIf e.DataCol.name = "农历日期" Then
systemready = False
If e.NewValue = Nothing Then
e.DataRow("公历日期") = Nothing
Else
Dim d As Date = e.NewValue
e.DataRow("公历日期") = (New Lunar(d.Year,d.Month,d.Day,True)).SolarDate
End If
systemready = True
End If
至于是不是闰月,要自己建一个表,记录所有的闰月,然后查表判断