public static bool DeletePublicationTask(int publicationTaskID) { DAL.Utilities.Helper helper = new DAL.Utilities.Helper(_connectionString); string sql = string.Empty; sql += @"DELETE FROM PublicationTask "; sql += @"WHERE PublicationTaskID = @PublicationTaskID "; SqlCommand command = new SqlCommand(sql); command.Parameters.Add("@PublicationTaskID", System.Data.SqlDbType.Int).Value = publicationTaskID; bool result = helper.ExecuteCommand(command); command.Dispose(); return(result); }
public static bool SavePublicationItem(Entities.PublicationEntities.PublicationItem publicationItem) { bool result = false; SqlCommand command = new SqlCommand(); command.CommandTimeout = 10; command.CommandType = CommandType.StoredProcedure; command.CommandText = "SavePublicationItem"; command.Parameters.Add("@PublicationItemID", System.Data.SqlDbType.Int).Value = publicationItem.PublicationItemID; command.Parameters.Add("@PublicationTaskID", System.Data.SqlDbType.Int).Value = publicationItem.PublicationTaskID; command.Parameters.Add("@Name", System.Data.SqlDbType.NVarChar).Value = publicationItem.Name; command.Parameters.Add("@Status", System.Data.SqlDbType.Int).Value = publicationItem.Status; DAL.Utilities.Helper helper = new DAL.Utilities.Helper(_connectionString); result = helper.ExecuteCommand(command); command.Dispose(); return(result); }