public static DateTime GetRequiredDateTimeViewState(StateBag viewState, string fieldName) { DateTime?returnValue = WebFormsHelper.GetDateTimeViewState(viewState, fieldName); if (!returnValue.HasValue) { throw new Exception(string.Format("Missing required ViewState DateTime value \"{0}\"", fieldName)); } return(returnValue.Value); }
public static DateTime GetDateTimeViewState(StateBag viewState, string fieldName, DateTime defaultValue) { DateTime?returnValue = WebFormsHelper.GetDateTimeViewState(viewState, fieldName); return(returnValue.GetValueOrDefault(defaultValue)); }
protected DateTime GetDateTimeViewState(string fieldName, DateTime defaultValue) { return(WebFormsHelper.GetDateTimeViewState(this.ViewState, fieldName, defaultValue)); }
protected DateTime?GetDateTimeViewState(string fieldName) { return(WebFormsHelper.GetDateTimeViewState(this.ViewState, fieldName)); }