public void DeleteBusiness(BALBusiness obj)
 {
     query = "delete from Business where BusinessId=" + obj.BusinessId;
     SqlCommand cmd = new SqlCommand(query, con);
     con.Open();
     cmd.ExecuteNonQuery();
     con.Close();
 }
 public DataSet getBusinessProfile(BALBusiness obj)
 {
     query = "select * from Business b inner join Area a on a.AreaId=b.AreaId inner join Login l on b.LoginId=l.LoginId inner join City c on a.CityId=c.CityId inner join Category ca on b.CategoryId=ca.CategoryId where b.LoginId="+obj.LoginId;
     DataSet ds = new DataSet();
     SqlDataAdapter adp = new SqlDataAdapter(query, con);
     adp.Fill(ds);
     return ds;
 }
    public void InsertBusiness(BALBusiness obj)
    {
        query = "insert into Business(BusinessName,Address,AreaId,Pincode,Telephone1,Telephone2,BusinessEmail,WebsiteUrl,ContactPerson,WHour,BusinessInfo,CategoryId,LoginId) values ('" + obj.BusinessName + "','" + obj.Address + "'," + obj.AreaId + ",'" + obj.Pincode + "','" + obj.Telephone1 + "','" + obj.Telephone2 + "','" + obj.BusinessEmail + "','" + obj.WebsiteUrl + "','" + obj.ContactPerson + "','" + obj.WHour + "','" + obj.BusinessInfo + "'," + obj.CategoryId+","+obj.LoginId+")";

        SqlCommand cmd=new SqlCommand(query,con);
        con.Open();
        cmd.ExecuteNonQuery();
        con.Close();
        //
        // TODO: Add constructor logic here
        //
    }
 public void UpdateBusinessByLoginID(BALBusiness obj)
 {
     query = "update Business set BusinessName='" + obj.BusinessName + "',Address='" + obj.Address + "',AreadId=" + obj.AreaId + ",Pincode=" + obj.Pincode + ",Telephone1='" + obj.Telephone1 + "',Telephone2='" + obj.Telephone2 + "',BusinessEmail='" + obj.BusinessEmail + "',WebsiteUrl='" + obj.WebsiteUrl + "',ContactPerson='" + obj.ContactPerson + "',Whour='" + obj.WHour + "',BusinessInfo='" + obj.BusinessInfo + "',CategoryId=" + obj.CategoryId + ",LoginId=" + obj.LoginId + "where LoginId=" + obj.LoginId;
     SqlCommand cmd = new SqlCommand(query, con);
     con.Open();
     cmd.ExecuteNonQuery();
     con.Close();
 }