public static void StoreLink(WebLink link)
        {
            bool newRow = false;
            EMMADataSet.WebLinksDataTable table = new EMMADataSet.WebLinksDataTable();
            EMMADataSet.WebLinksRow row;

            tableAdapter.FillByID(table, link.ID);
            if (table.Count > 0)
            {
                row = table[0];
            }
            else
            {
                row = table.NewWebLinksRow();
                newRow = true;
            }

            row.CorpID = link.CorpID;
            row.Description = link.Description;
            row.Link = link.Link;

            if (newRow)
            {
                table.AddWebLinksRow(row);
            }

            tableAdapter.Update(table);
        }
 private void webLinkGrid_RowEnter(object sender, DataGridViewCellEventArgs e)
 {
     if(webLinkGrid.Rows[e.RowIndex] != null)
     {
         _selectedLink = (WebLink)webLinkGrid.Rows[e.RowIndex].DataBoundItem;
     }
 }
 public MaintWebLink(WebLink link)
 {
     InitializeComponent();
     _link = link;
 }
 public MaintWebLink(PublicCorp corp)
 {
     InitializeComponent();
     _startCorp = corp;
     _link = new WebLink(corp.ID);
 }