public int EditEp(Guid epId, string epName, int totalTrack) { EPQueriesCommands EpCQ = new EPQueriesCommands(); ExtendedPlay ep = EpCQ.GetEpById(epId); if (ep != null) { if (EpCQ.EPEmptiness(ep) != 1) { //Can't edit Ep as one song alredy registered under the album return(2); } ep.Ep_Name = epName; ep.Total_Track = totalTrack; var result = EpCQ.EditEpDetails(ep); if (result != 1) { //Internal Error occured while changing data for the Ep return(3); } else { //Ep details changed Successfully return(1); } } else { //No Ep found with the Id provided return(0); } }
public bool IsEpFull(Guid epId) { EPQueriesCommands EpCQ = new EPQueriesCommands(); if (EpCQ.EPEmptiness(EpCQ.GetEpById(epId)) == 3) { return(true); } else { return(false); } }