Hello
I didn't find a solution to my issue after several search in this forum, perhaps I didn't type the correct keywords.
here is my issue:
I have 2 date time pickers fields (TempRequestDate & RequestDate ) and 1 drop down list that contains timeZone information (HandoffTimeZoneID)
User select a Date and Time and also a TimeZone and then I want to convert this date & time to UTC
here is the code that I use
public void TempRequestDate_attr_Changed(object sender, XmlEventArgs e)
{
XPathNavigator xdoc = this.MainDataSource.CreateNavigator();
if (xdoc.SelectSingleNode("/my:Job/my:Definition/@my:TempRequestDate", this.NamespaceManager).Value != "")
{
//get the timeZoneInfo
TimeZoneInfo SelectedTimeZoneId = GetTimeZoneInfoFromID(xdoc.SelectSingleNode("/my:Job/my:Definition/@my:HandoffTimeZoneID", this.NamespaceManager).Value);
//get selected date
DateTime TempRequestDate = Iso8601ToDate(xdoc.SelectSingleNode("/my:Job/my:Definition/@my:TempRequestDate", this.NamespaceManager).Value.ToString());
//get Converted to UTC Date
DateTime RequestDate = TimeZoneInfo.ConvertTimeToUtc(TempRequestDate, SelectedTimeZoneId);
//set final Date
xdoc.SelectSingleNode("/my:Job/my:Definition/@my:RequestDate", this.NamespaceManager).SetValue(DateToIso8601(RequestDate));
}
}
this code works for the first repeating section entry but how to access current value when there are several repeating section entries ?
Thanks in advance for your help