public static void fillDropDownTimeZone(System.Web.UI.WebControls.DropDownList ddl, RptTimeZone _timeZone) { try { RptTimeZone _TZ = new RptTimeZone(); _TZ = _timeZone; new TimeZoneSelect(_TZ).TimeZoneDropDownList(_TZ._dropDownList); ddl.DataSource = _TZ._dropDownList; ddl.DataTextField = "Name"; ddl.DataValueField = "Value"; ddl.DataBind(); } catch (Exception ex) { throw ex; } finally { ddl = null; } }
public TimeZoneSelect(RptTimeZone _tz) { this._tz = _tz; Command = @"SELECT tzID,rptLocation || '(UTC' || to_char(tzValue, '9') || ')'" + @" AS timezone FROM tblRptTimeZone;"; }