Exemplo n.º 1
0
        private void DeleteCampaign_Click(object sender, System.EventArgs e)
        {
            clsDBQueryManager obj_clsDBQueryManager = new clsDBQueryManager();
            string campname = string.Empty;
            foreach (DataGridViewRow Dr in dgv_CampaignScraper.Rows)
            {
                try
                {
                    if (Convert.ToBoolean(Dr.Cells[0].Value) == true)
                    {
                        campname = Dr.Cells[1].Value.ToString();
                        string query = "Delete from tb_CampaignScraper where CampaignName='" + campname + "';";
                        obj_clsDBQueryManager.DeleteCampaignScraperData(query);
                    }
                }
                catch
                { }
            }

            DataSet DS = new DataSet();
            DataTable DT = new DataTable();
            try
            {
                DS = new clsDBQueryManager().getAllCampaignScraperData();

                DT = DS.Tables[0];

                dgv_CampaignScraper.DataSource = DT.DefaultView;
            }
            catch
            { }
        }