protected void EditForm_DataBound(object sender, EventArgs e) { string timeZoneId = null; string timeFormat = null; string dateFormat = null; if (EditForm.DataItem != null) { ClientDataSet.UserRow row = (ClientDataSet.UserRow)EditForm.DataItem; if (!row.IsTimeZoneIdNull()) { timeZoneId = row.TimeZoneId; } if (!row.IsTimeFormatNull()) { timeFormat = row.TimeFormat.ToString(CultureInfo.InvariantCulture); } if (!row.IsDateFormatNull()) { dateFormat = row.DateFormat.ToString(CultureInfo.InvariantCulture); } } BaseControl.TimeZoneListDataBind(TimeZoneList, timeZoneId, false); BaseControl.TimeFormatListDataBind(TimeFormatList, timeFormat, false); BaseControl.DateFormatListDataBind(DateFormatList, dateFormat, false); TokenControl token = (TokenControl)EditForm.FindControl("Token"); token.LoginId = UserContext.Current.UserId; }
protected void EditForm_DataBound(object sender, EventArgs e) { if (EditForm.CurrentMode == DetailsViewMode.Insert) { if (!UserChecked) { EditForm.Rows[14].Visible = false; } } string timeZoneId = null; string timeFormat = null; string dateFormat = null; if (EditForm.DataItem != null) { ClientDataSet.UserRow row = (ClientDataSet.UserRow)EditForm.DataItem; if (!row.IsTimeZoneIdNull()) { timeZoneId = row.TimeZoneId; } if (!row.IsTimeFormatNull()) { timeFormat = row.TimeFormat.ToString(CultureInfo.InvariantCulture); } if (!row.IsDateFormatNull()) { dateFormat = row.DateFormat.ToString(CultureInfo.InvariantCulture); } TokenControl token = (TokenControl)EditForm.FindControl("Token"); token.LoginId = row.UserId; } BaseControl.TimeZoneListDataBind(TimeZoneList, timeZoneId, false); BaseControl.TimeFormatListDataBind(TimeFormatList, timeFormat, false); BaseControl.DateFormatListDataBind(DateFormatList, dateFormat, false); }