
Partial code for Business Logic Layer
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
///
/// Summary description for blayer
///
public class blayer
{
public blayer()
{
//
// TODO: Add constructor logic here
//
}
///
/// insert records into database
///
public int insert(string title, string description)
{
person p1 = new person();
try
{
return p1.insert(title, description);
}
catch (Exception ex)
{
throw;
}
finally
{
p1 = null;
}
}
///
/// update records into database
///
public int update(int id, string title, string description)
{
person p1 = new person();
try
{
return p1.update(id, title, description);
}
catch
{
throw;
}
finally
{
p1 = null;
}
}
///
/// Shows records from database
///
public DataTable show()
{
person p1 = new person();
try
{
return p1.show();
}
catch
{
throw;
}
finally
{
p1 = null;
}
}
public DataTable show1(int id)
{
person p1 = new person();
try
{
return p1.show1(id);
}
catch
{
throw;
}
finally
{
p1 = null;
}
}
///
/// Delete record from database
///
public int delete(int id)
{
person p1 = new person();
try
{
return p1.delete(id);
}
catch
{
throw;
}
finally
{
p1 = null;
}
}
}

