Fonksiyon.cs
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
///
/// Summary description for Fonksiyon
///
public class Fonksiyon
public SqlConnection baglan()
public int cmd(String sqlcumle)
catch (SqlException ex)
sorgu.Dispose();
baglan.Close();
baglan.Dispose();
return (sonuc);
}
public DataTable GetDataTable(string sql)
catch (SqlException ex)
adapter.Dispose();
baglanti.Close();
baglanti.Dispose();
return dt;
}
public DataSet GetDataSet(string sql)
catch (SqlException ex)
adapter.Dispose();
baglanti.Close();
baglanti.Dispose();
return ds;
}
public DataRow GetDataRow(String sql)
public string GetDataCell(String sql)
}
Haber.aspx.cs
using System;
using System.IO;
using System.Drawing;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Haber : System.Web.UI.Page
}
catch
system.cmd("Delete from Haber where HaberId=" + HaberId);
}
KategoriAdi = system.GetDataCell("Select KategoriAdi from Kategori where KategoriId=" + KategoriId);
Label lbl1 = (Label)Master.FindControl("lblSayfaBaslik");
lbl1.Text = KategoriAdi + "Haber";
HaberleriCek();
}
void HaberleriCek()
protected void rpHaber_ItemCommand(object source, RepeaterCommandEventArgs e)
protected void btnSecilenleriSil_Click(object sender, EventArgs e)
}
catch
system.cmd("Delete from Haber where HaberId=" + silinecekId);
}
Response.Redirect("Haber.aspx?KategoriId=" + KategoriId);
}
}