protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById("China Standard Time"); serverTime = TimeZoneInfo.ConvertTime(DateTime.Now, timezone); BLL.CompanyAsiaBLL companyBLL = new BLL.CompanyAsiaBLL(); DataSet ds = companyBLL.GetList("isasia=1"); JArray array = new JArray(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dr = ds.Tables[0].Rows[i]; initCompanyJS += "company[" + dr["id"].ToString() + "] = \""+dr["name"].ToString()+"\";"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TimeZoneInfo timezone = TimeZoneInfo.FindSystemTimeZoneById("China Standard Time"); serverTime = TimeZoneInfo.ConvertTime(DateTime.Now, timezone); BLL.CompanyAsiaBLL companyBLL = new BLL.CompanyAsiaBLL(); DataSet ds = companyBLL.GetList("isasia=1"); JArray array = new JArray(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dr = ds.Tables[0].Rows[i]; initCompanyJS += "company[" + dr["id"].ToString() + "] = \"" + dr["name"].ToString() + "\";"; } } }