示例#1
0
 protected void Repeater6_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.Item.FindControl("zccz") != null)
     {
         string id = ((Label)e.Item.FindControl("zccz")).Text;
         //删除资产处置方式
         if (e.CommandName == "delete")
         {
             U_ZCBU zc3 = new U_ZCBU();
             zc3.DelZCBFS(id);
             this.BindZCCZDetail(zc3);
             zc3.Close();
         }
         else if (e.CommandName == "update")
         {
             Context.Items["id"] = id;
             if (Request["id"] != null)
             {
                 Context.Items["zcid"] = Request["id"].ToString();
             }
             Context.Items["czid"] = this.zcczid.Text;
             Server.Transfer("EditZcCzfs1.aspx", false);
         }
         else
         {
             U_ZCBSPBU sp1   = new U_ZCBSPBU();
             bool      first = sp1.CopyZcBCzczfstoZc(this.BID.Text, id);
             sp1.Close();
             if (first)
             {
                 Util.alert(this.Page, "恭喜您,复制成功!");
             }
             else
             {
                 Util.alert(this.Page, "很遗憾,复制失败!");
             }
         }
     }
 }