private void btnCrawl_Click(object sender, EventArgs e) { try { FrmControlAutoPush frm = new FrmControlAutoPush(); frm.MdiParent = this; DataTable tbl = new DataTable(); tbl.Columns.Add("id", typeof(long)); tbl.Columns.Add("Website", typeof(string)); foreach (int iRow in this.gridView1.GetSelectedRows()) { DataRowView row = gridView1.GetRow(iRow) as DataRowView; if (row != null) { DataRow row1 = tbl.NewRow(); row1["id"] = Convert.ToInt64(row["id"]); row1["Website"] = Convert.ToString(row["RootLink"].ToString().Split(';')[0]); tbl.Rows.Add(row1); } } frm.LoadOutData(tbl); frm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAutoPush_Click(object sender, EventArgs e) { FrmControlAutoPush frm = new FrmControlAutoPush(); frm.Show(); }