public void DeleteOnePublication(int personid, long subjectID, string pubid, XmlDocument PropertyListXML)
{
ActivityLog(PropertyListXML, subjectID, "PubID", pubid);
string skey = string.Empty;
string sparam = string.Empty;
try
{
SessionManagement sm = new SessionManagement();
string connstr = ConfigurationManager.ConnectionStrings["ProfilesDB"].ConnectionString;
SqlConnection dbconnection = new SqlConnection(connstr);
SqlCommand comm = new SqlCommand();
comm.Parameters.Add(new SqlParameter("PersonID", personid));
comm.Parameters.Add(new SqlParameter("PubID", pubid));
comm.Connection = dbconnection;
comm.Connection.Open();
comm.CommandType = CommandType.StoredProcedure;
comm.CommandText = "[Profile.Data].[Publication.DeleteOnePublication]";
comm.ExecuteScalar();
comm.Connection.Close();
if (dbconnection.State != ConnectionState.Closed)
dbconnection.Close();
this.UpdateEntityOnePerson(personid);
}
catch (Exception e)
{
Framework.Utilities.DebugLogging.Log(e.Message + e.StackTrace);
throw new Exception(e.Message);
}
}