Ejemplo n.º 1
0
 protected void Matches_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "New")
     {
         PackageMatchList matches = GetMatches();
         PackageMatch     match   = new PackageMatch();
         matches.Insert(e.Item.ItemIndex + 1, match);
         DataSource = matches;
         DataBindChildren();
     }
     else if (e.CommandName == "Delete")
     {
         PackageMatchList matches = GetMatches();
         matches.RemoveAt(e.Item.ItemIndex);
         DataSource = matches;
         DataBindChildren();
     }
 }