Ejemplo n.º 1
0
        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;
     }
 }
Ejemplo n.º 3
0
 public MaintWebLink(WebLink link)
 {
     InitializeComponent();
     _link = link;
 }
Ejemplo n.º 4
0
 public MaintWebLink(PublicCorp corp)
 {
     InitializeComponent();
     _startCorp = corp;
     _link = new WebLink(corp.ID);
 }