コード例 #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.Department po = dep.GetModel(id);
         Label1.Text   = po.id.ToString();
         TextBox4.Text = po.departmentname;
         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
ファイル: Show.aspx.cs プロジェクト: sufeng136540/sufeng
 private void ShowInfo(int id)
 {
     Maticsoft.BLL.Department   bll   = new Maticsoft.BLL.Department();
     Maticsoft.Model.Department model = bll.GetModel(id);
     this.lblid.Text             = model.id.ToString();
     this.lbldepartmentname.Text = model.departmentname;
     this.lblBeizhu.Text         = model.Beizhu;
     this.lblBY1.Text            = model.BY1.ToString();
     this.lblBY2.Text            = model.BY2.ToString();
     this.lblBY3.Text            = model.BY3.ToString();
     this.lblBY4.Text            = model.BY4;
     this.lblBY5.Text            = model.BY5;
     this.lblBY6.Text            = model.BY6;
     this.lblBY7.Text            = model.BY7;
 }