protected void gvResult_ItemDataBound(object sender, DataGridItemEventArgs e) { List <PubEntAdmin.BLL.Announcement> dt = ((List <PubEntAdmin.BLL.Announcement>) this.gvResult.DataSource); if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { PubEntAdmin.BLL.Announcement l_conf = dt[e.Item.ItemIndex]; ((TableCell)e.Item.Cells[0]).Text = l_conf.AnnouncementID.ToString(); ((Label)e.Item.Cells[1].Controls[1]).Text = Server.HtmlEncode(l_conf.AnnouncementName); ((HyperLink)e.Item.Cells[2].Controls[1]).Text = ((HyperLink)e.Item.Cells[2].Controls[1]).NavigateUrl = Server.HtmlEncode(l_conf.AnnouncementURL); ((Label)e.Item.Cells[3].Controls[1]).Text = l_conf.StartDate.ToShortDateString(); ((Label)e.Item.Cells[4].Controls[1]).Text = l_conf.EndDate.ToShortDateString(); ////delete btn col Panel l_pnl = e.Item.Cells[6].Controls[1] as Panel; ((Label)l_pnl.Controls[1]).Text = "Are you sure you want to delete this Announcement [" + l_conf.AnnouncementName + "]?"; } else if (e.Item.ItemType == ListItemType.EditItem) { PubEntAdmin.BLL.Announcement l_conf = dt[e.Item.ItemIndex]; if (this.gvResult.EditItemIndex != -1) { ((MaskedEditValidator)e.Item.Cells[3].Controls[7]).Enabled = true; ((MaskedEditValidator)e.Item.Cells[4].Controls[7]).Enabled = true; } else { ((MaskedEditValidator)e.Item.Cells[3].Controls[7]).Enabled = false; ((MaskedEditValidator)e.Item.Cells[4].Controls[7]).Enabled = false; } ////delete btn col Panel l_pnl = e.Item.Cells[6].Controls[1] as Panel; ((Label)l_pnl.Controls[1]).Text = "Are you sure you want to delete this Announcement [" + l_conf.AnnouncementName + "]?"; } }
public bool Contains(Announcement value) { return(List.Contains(value)); }
public void Remove(Announcement value) { List.Remove(value); }
public void Insert(int index, Announcement value) { List.Insert(index, value); }
public int IndexOf(Announcement value) { return(List.IndexOf(value)); }
public int Add(Announcement value) { return(List.Add(value)); }