public void GelExcelDosyaBilgiler() { DataTable dt = E.Listeler_Excel(); if (dt.Rows.Count != 0) { EPostaListesi_Grid.DataSource = dt; EPostaListesi_Grid.DataBind(); GridKayitYokDiv.Visible = false; ToplamAdetLbl.Text = dt.Rows.Count.ToString(); } else { EPostaListesi_Grid.DataBind(); GridKayitYokDiv.Visible = true; } }
protected void AramaBaslatBtn_Click(object sender, EventArgs e) { try { DataTable dt = E.Listeler_Excel_Ara(Eposta_Arabox.Text.Trim()); if (dt.Rows.Count != 0) { EPostaListesi_Grid.DataSource = dt; EPostaListesi_Grid.DataBind(); GridKayitYokDiv.Visible = false; } else { GridKayitYokDiv.Visible = true; EPostaListesi_Grid.DataBind(); } } catch (Exception) { // BilgilerDiv.Visible = false; KayitTamam.Visible = false; HataVar.Visible = true; } }
protected void EPostaListesi_Grid_PageIndexChanging(object sender, GridViewPageEventArgs e) { EPostaListesi_Grid.PageIndex = e.NewPageIndex; GelExcelDosyaBilgiler(); EPostaListesi_Grid.DataBind(); }