Esempio n. 1
0
    public DataSet SelectImageGalleryByEvent(BALImageGallery obj)
    {
        DataSet ds = new DataSet();
        query = "select * from imagegallery i inner join event e on i.eventid=e.eventid where i.eventid=" + obj.EventId;

        SqlDataAdapter adp = new SqlDataAdapter(query, con);
        adp.Fill(ds);

        return ds;
    }
Esempio n. 2
0
    public void DeleteImageGallery(BALImageGallery obj)
    {
        query = "Delete from ImageGallery where imageid=" + obj.ImageId;
        SqlCommand cmd = new SqlCommand(query, con);

        con.Open();
        cmd.ExecuteNonQuery();
        con.Close();

    }
Esempio n. 3
0
    public void UpdateImageGalleryWithoutImage(BALImageGallery obj)
    {
        query = "update imagegallery set eventid=" + obj.EventId + ",postdate='" + obj.PostDate + "' where imageid=" + obj.ImageId;
        SqlCommand cmd = new SqlCommand(query, con);

        con.Open();
        cmd.ExecuteNonQuery();
        con.Close();

    }
Esempio n. 4
0
    public void InsertImageGallery(BALImageGallery obj)
    {
        query = "insert into imagegallery(eventid,imagefile,postdate) values (" + obj.EventId + ",'" + obj.ImageFile + "','" + obj.PostDate + "')";

        SqlCommand cmd = new SqlCommand(query, con);

        con.Open();
        cmd.ExecuteNonQuery();
        con.Close();

    }
Esempio n. 5
0
    public void insertImage(BALImageGallery obj)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.Connection  = con;
        cmd.CommandText = "spInsertImage";
        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Parameters.AddWithValue("@imagefilename", obj.ImageFileName);
        cmd.Parameters.AddWithValue("@serviceproviderid", obj.ServiceProviderID);

        con.Open();
        cmd.ExecuteNonQuery();
        con.Close();
    }