protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CommonFunction.isLoginCheck("timeout.aspx"); int TS_ID = Convert.ToInt32(Request.QueryString["tsid"]); TollStation station = TollStationService.Get_TollStationEntity(TS_ID); Image1.ImageUrl = "../Logo/" + station.TS_Logo; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CommonFunction.isLoginCheck("timeout.aspx"); bindcitydata(); bindcompanydata(); bindhighwaydata(); bindstardata(); if (Request.QueryString["tsid"] == null) { ViewState["tsid"] = ((UserInfo)Session["StationUser"]).U_TollStation.TS_ID; } else { ViewState["tsid"] = Request.QueryString["tsid"].ToString(); } TollStation station = TollStationService.Get_TollStationEntity(Convert.ToInt32(ViewState["tsid"])); txtName.Text = station.TS_Name; txtPinYin.Text = station.TS_PinYin; txtStake.Text = station.TS_Stake; txtStakeNum.Text = station.TS_StakeNum.ToString(); txtRen.Text = station.TS_Manager; txtPhone.Text = station.TS_Phone; txtHonour.Text = station.TS_Honour; txtWelcome.Text = station.TS_Welcome; ddlHighway.SelectedValue = station.TS_Highway.H_ID.ToString(); ddlUnit.SelectedValue = station.TS_Company.C_ID.ToString(); ddlCity.SelectedValue = station.TS_City.CI_ID.ToString(); ddlStar.SelectedValue = station.TS_Star; txtLaneNum.Text = station.TS_LaneNum; txtExitToRoad.Text = station.TS_ExitToRoad; txtRemark.Text = station.TS_Remark; Image1.ImageUrl = "../StationPhoto/" + station.TS_MainPhoto; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["stationid"] != null) { int StationId = Convert.ToInt32(Request.QueryString["stationid"]); TollStation station = TollStationService.Get_TollStationEntity(StationId); if (station != null) { Session["stationinfo"] = station; Response.Redirect("index.aspx"); } else { Response.Redirect("StationList.aspx"); } } else { Response.Redirect("StationList.aspx"); } } }