public void ShowZhaoPinInfo() { if (Request["ZhaoPinID"] + "" == "") { Response.Redirect("ErrorPage.aspx"); } else { try { int ZhaoPinID = Convert.ToInt32(Request.QueryString["ZhaoPinID"].ToString()); WebProject.BLL.BaseData.ZT_COM_ZhaoPin bll_ZhaoPin = new WebProject.BLL.BaseData.ZT_COM_ZhaoPin(); DataSet ds = bll_ZhaoPin.GetList(" 1=1 "); if (ds.Tables[0].Rows.Count > 0) { this.lblPosition.Text = ds.Tables[0].Rows[0]["Position"].ToString(); this.lblNumber.Text = ds.Tables[0].Rows[0]["Number"].ToString(); this.lblSalary.Text = ds.Tables[0].Rows[0]["Salary"].ToString(); this.lblAddress.Text = ds.Tables[0].Rows[0]["Address"].ToString(); this.lblEndDate.Text = ds.Tables[0].Rows[0]["EndDate"].ToString(); this.lblBody.Text = ds.Tables[0].Rows[0]["Body"].ToString(); } } catch { Response.Redirect("ErrorPage.aspx"); } } }
public void ShowZhaoPinInfo() { WebProject.BLL.BaseData.ZT_COM_ZhaoPin bll_ZhaoPin = new WebProject.BLL.BaseData.ZT_COM_ZhaoPin(); DataSet ds = bll_ZhaoPin.GetList(" 1=1 "); this.Repeater1.DataSource = ds; this.Repeater1.DataBind(); }
public void ShowData() { WebProject.BLL.BaseData.ZT_COM_ZhaoPin bll_ZhaoPin = new WebProject.BLL.BaseData.ZT_COM_ZhaoPin(); DataSet ds = bll_ZhaoPin.GetList(""); if (ds.Tables[0].Rows.Count > 0) { this.lblMessage.Visible = false; this.btnDeleteSelect.Visible = true; this.GridView1.Visible = true; this.GridView1.DataSource = ds; this.GridView1.DataBind(); } else { this.lblMessage.Visible = true; this.btnDeleteSelect.Visible = false; this.GridView1.Visible = false; } }