Exemple #1
0
 protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         Label lb = (Label)e.Item.FindControl("fb_dateid");
         feedback.deletefeed(lb.Text);
         ListView1.DataBind();
     }
     else if (e.CommandName == "deny")
     {
         Label lb = (Label)e.Item.FindControl("fb_dateid");
         feedback.changeview(int.Parse(lb.Text), true);
         ImageButton ub = (ImageButton)e.Item.FindControl("ibtAllow");
         ImageButton cb = (ImageButton)e.Item.FindControl("ibtDeny");
         ub.Visible = false;
         cb.Visible = true;
     }
     else if (e.CommandName == "allow")
     {
         Label lb = (Label)e.Item.FindControl("fb_dateid");
         feedback.changeview(int.Parse(lb.Text), false);
         ImageButton ub = (ImageButton)e.Item.FindControl("ibtAllow");
         ImageButton cb = (ImageButton)e.Item.FindControl("ibtDeny");
         ub.Visible = true;
         cb.Visible = false;
     }
 }