예제 #1
0
 /// <summary>
 /// 修改弹窗赋值
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     try
     {
         //获取button 控件
         LinkButton lb = (LinkButton)sender;
         //获取传过来的commwntid
         int            id = Convert.ToInt32(lb.CommandArgument);
         Model.Position po = zw.GetModel(id);
         Label1.Text   = po.id.ToString();
         TextBox4.Text = po.name;
         TextBox5.Text = po.beizhu;
         ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>javascript:showDiv2();</script>");
     }
     catch (Exception ee)
     {
         //Response.Write("<script>alert('确定异常 " + ee.Message + "')</script>");
         ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('修改弹窗异常 " + ee.Message + "');</script>");
     }
 }
예제 #2
0
 private void ShowInfo(int id)
 {
     Maticsoft.BLL.Position   bll   = new Maticsoft.BLL.Position();
     Maticsoft.Model.Position model = bll.GetModel(id);
     this.lblid.Text     = model.id.ToString();
     this.txtname.Text   = model.name;
     this.txtbeizhu.Text = model.beizhu;
     this.txtBy1.Text    = model.By1.ToString();
     this.txtBy2.Text    = model.By2.ToString();
     this.txtBy3.Text    = model.By3.ToString();
     this.txtBy4.Text    = model.By4;
     this.txtBy5.Text    = model.By5;
     this.txtBy6.Text    = model.By6;
     this.txtBy7.Text    = model.By7;
 }