public bool Equals(TSCSongs a) { if ((object)a == null) { return(false); } return(FieldsEqual(this, a)); }
public bool KeyEquals(TSCSongs a) { if ((object)a == null) { return(false); } return( a.Title.Trim().ToLower() == Title.Trim().ToLower() && a.Artist.Trim().ToLower() == Artist.Trim().ToLower() && a.Disk.Trim().ToLower() == Disk.Trim().ToLower() ); }
public TSCSongs(TSCSongs tscsongs) : this() { Title = new string(tscsongs.Title.ToArray()); Artist = new string(tscsongs.Artist.ToArray()); Disk = new string(tscsongs.Disk.ToArray()); DuetArtist = new string(tscsongs.DuetArtist.ToArray()); IsHelper = new string(tscsongs.IsHelper.ToArray()); IsDuet = new string(tscsongs.IsDuet.ToArray()); OneDrive = new string(tscsongs.OneDrive.ToArray()); FilePath = new string(tscsongs.FilePath.ToArray()); }
public static bool FieldsEqual(TSCSongs a, TSCSongs b) { return( (a.Title == b.Title) && (a.Artist == b.Artist) && (a.Disk == b.Disk) && (a.DuetArtist == b.DuetArtist) && (a.IsHelper == b.IsHelper) && (a.IsDuet == b.IsDuet) && (a.OneDrive == b.OneDrive) && (a.FilePath == b.FilePath) && (true) ); }
public override bool Equals(object obj) { if (obj == null) { return(false); } TSCSongs a = obj as TSCSongs; if (a == null) { return(false); } return(FieldsEqual(this, a)); }
public string GetXMLData(string table, string action, string pageoffset, string pagereturn, string pageorderby, string pagewhereclause) { int offset = 0; int nreturn = 0; int.TryParse(pageoffset, out offset); int.TryParse(pagereturn, out nreturn); TSCSongs tscsongs = new TSCSongs(); tscsongs.PageOffset = offset; tscsongs.PageOrder = pageorderby; tscsongs.PageReturn = nreturn; if (pagewhereclause != null && pagewhereclause.Trim().Length > 0 && (pageorderby != null && pageorderby.Trim().Length > 0)) { pagewhereclause = pagewhereclause.Trim(); string chk = pagewhereclause.Trim().ToLower(); if (chk.StartsWith("begins")) { int i = chk.IndexOf(' '); if (i > 0) { pagewhereclause = string.Format("{0} like '{1}%'", pageorderby, pagewhereclause.Substring(i).Trim()); } } else if (chk.StartsWith("contains")) { int i = chk.IndexOf(' '); if (i > 0) { pagewhereclause = string.Format("{0} like '%{1}%'", pageorderby, pagewhereclause.Substring(i).Trim()); } } else { pagewhereclause = ""; } } else { pagewhereclause = ""; } tscsongs.WhereClause = pagewhereclause; string xmls = tscsongs.GetDataXml(); xmls = RunStore(table, action, xmls); return(xmls); }