Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashCode = 1784892452;

            if (BannerEnabled != null)
            {
                hashCode += BannerEnabled.GetHashCode();
            }

            if (BannerText != null)
            {
                hashCode += BannerText.GetHashCode();
            }

            if (BannerCtaText != null)
            {
                hashCode += BannerCtaText.GetHashCode();
            }

            if (BannerCtaUrl != null)
            {
                hashCode += BannerCtaUrl.GetHashCode();
            }

            if (Errors != null)
            {
                hashCode += Errors.GetHashCode();
            }

            return(hashCode);
        }
Exemplo n.º 2
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"BannerEnabled = {(BannerEnabled == null ? "null" : BannerEnabled.ToString())}");
     toStringOutput.Add($"BannerText = {(BannerText == null ? "null" : BannerText == string.Empty ? "" : BannerText)}");
     toStringOutput.Add($"BannerCtaText = {(BannerCtaText == null ? "null" : BannerCtaText == string.Empty ? "" : BannerCtaText)}");
     toStringOutput.Add($"BannerCtaUrl = {(BannerCtaUrl == null ? "null" : BannerCtaUrl == string.Empty ? "" : BannerCtaUrl)}");
     toStringOutput.Add($"Errors = {(Errors == null ? "null" : $"[{ string.Join(", ", Errors)} ]")}");
 }
Exemplo n.º 3
0
        public ActionResult Delete(BannerEnabled model)
        {
            if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || User.IsInRole("System")))
            {
                if (_basedb.Banner.Any(o => o.ID == model.id))
                {
                    var Banner = _basedb.Banner.Find(model.id);
                    Banner.Enabled = model.enabled;
                    _basedb.SaveChanges();
                }

                return(Json(new { success = true }));
            }


            return(Json(new { success = false }));
        }
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is RetrieveObsMigrationProfileResponse other &&
                   ((BannerEnabled == null && other.BannerEnabled == null) || (BannerEnabled?.Equals(other.BannerEnabled) == true)) &&
                   ((BannerText == null && other.BannerText == null) || (BannerText?.Equals(other.BannerText) == true)) &&
                   ((BannerCtaText == null && other.BannerCtaText == null) || (BannerCtaText?.Equals(other.BannerCtaText) == true)) &&
                   ((BannerCtaUrl == null && other.BannerCtaUrl == null) || (BannerCtaUrl?.Equals(other.BannerCtaUrl) == true)) &&
                   ((Errors == null && other.Errors == null) || (Errors?.Equals(other.Errors) == true)));
        }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Category != 0)
            {
                hash ^= Category.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Hidden != false)
            {
                hash ^= Hidden.GetHashCode();
            }
            if (SortOrder != 0)
            {
                hash ^= SortOrder.GetHashCode();
            }
            if (BannerEnabled != false)
            {
                hash ^= BannerEnabled.GetHashCode();
            }
            if (BannerTitle.Length != 0)
            {
                hash ^= BannerTitle.GetHashCode();
            }
            if (ImageUrl.Length != 0)
            {
                hash ^= ImageUrl.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }