From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- Gestor.Model/Model.Domain.Seguros/Seguradora.cs | 1804 ----------------------- 1 file changed, 1804 deletions(-) delete mode 100644 Gestor.Model/Model.Domain.Seguros/Seguradora.cs (limited to 'Gestor.Model/Model.Domain.Seguros/Seguradora.cs') diff --git a/Gestor.Model/Model.Domain.Seguros/Seguradora.cs b/Gestor.Model/Model.Domain.Seguros/Seguradora.cs deleted file mode 100644 index d036a66..0000000 --- a/Gestor.Model/Model.Domain.Seguros/Seguradora.cs +++ /dev/null @@ -1,1804 +0,0 @@ -using Gestor.Model.Attributes; -using Gestor.Model.Common; -using Gestor.Model.Domain.Generic; -using Gestor.Model.Helper; -using Gestor.Model.Resources; -using Gestor.Model.Validation; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace Gestor.Model.Domain.Seguros -{ - public class Seguradora : DomainBase, IDomain, INotifyPropertyChanged - { - private bool _selecionado; - - private string _nome; - - private string _susep; - - private string _assistencia; - - private string _documento; - - private string _observacao; - - private string _codigo; - - private string _codigoSusep; - - private string _codigoSeguradora; - - private string _nomeSocial; - - private string _nomeSocialBanco; - - [Log(true)] - public string Assistencia - { - get - { - string str = this._assistencia; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._assistencia = value; - } - } - - [Log(true)] - public bool Ativo - { - get; - set; - } - - public string Codigo - { - get - { - string str = this._codigo; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._codigo = value; - } - } - - public string CodigoSeguradora - { - get - { - string str = this._codigoSeguradora; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._codigoSeguradora = value; - } - } - - public string CodigoSusep - { - get - { - string str = this._codigoSusep; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._codigoSusep = value; - } - } - - public List Contatos - { - get; - set; - } - - public string CustomId - { - get; - set; - } - - [Log(true)] - public string Documento - { - get - { - string str = this._documento; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._documento = value; - } - } - - public List Enderecos - { - get; - set; - } - - public long? IdAggilizador - { - get; - set; - } - - [Description("LINK APP ANDROID")] - [Log(true)] - public string LinkAppAndroid - { - get; - set; - } - - [Description("LINK APP IOS")] - [Log(true)] - public string LinkAppIos - { - get; - set; - } - - [Description("SEGURADORA")] - [Log(true)] - [Name(true)] - public string Nome - { - get - { - string str = this._nome; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._nome = value; - } - } - - public string NomeSocial - { - get - { - string str = this._nomeSocial; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - string str; - string nome; - this._nomeSocial = value; - if (!string.IsNullOrWhiteSpace(value)) - { - this.NomeSocialBanco = (this.NomeSocialBanco == " " ? "" : value); - return; - } - long id = base.Id; - if (id <= (long)694) - { - if (id <= (long)678) - { - long num = id - (long)1; - if (num <= (long)606) - { - switch ((uint)num) - { - case 0: - { - this.NomeSocial = "ABSOLUTA"; - return; - } - case 1: - case 2: - case 3: - case 4: - { - this.NomeSocial = "ACE"; - return; - } - case 5: - case 6: - case 7: - case 19: - case 20: - case 21: - case 22: - case 23: - case 28: - case 29: - case 30: - case 31: - case 35: - case 36: - case 37: - case 38: - case 42: - case 43: - case 44: - case 45: - case 46: - case 47: - case 49: - case 50: - case 51: - case 57: - case 58: - case 61: - case 62: - case 66: - case 67: - case 68: - case 70: - case 71: - case 72: - case 73: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - case 85: - case 86: - case 87: - case 97: - case 101: - case 102: - case 103: - case 104: - case 109: - case 110: - case 113: - case 114: - case 118: - case 121: - case 122: - case 123: - case 124: - case 127: - case 131: - case 132: - case 133: - case 134: - case 135: - case 136: - case 137: - case 138: - case 139: - case 140: - case 141: - case 142: - case 143: - case 146: - case 147: - case 148: - case 149: - case 150: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 175: - case 179: - case 182: - case 183: - case 186: - case 187: - case 189: - case 190: - case 191: - case 192: - case 193: - case 194: - case 195: - case 198: - case 199: - case 202: - case 203: - case 204: - case 207: - case 208: - case 209: - case 210: - case 211: - case 214: - case 219: - case 220: - case 223: - case 224: - case 227: - case 228: - case 229: - case 233: - case 234: - case 237: - case 238: - case 239: - case 240: - case 244: - case 245: - case 246: - case 247: - case 250: - case 252: - case 253: - case 256: - case 261: - case 262: - case 263: - case 270: - case 276: - case 277: - case 278: - case 279: - case 280: - case 281: - case 282: - case 286: - case 287: - case 288: - case 300: - case 301: - case 302: - case 303: - case 304: - case 305: - case 306: - case 312: - case 313: - case 314: - case 315: - case 316: - case 329: - case 331: - case 332: - case 333: - case 334: - case 335: - case 338: - case 339: - case 341: - case 342: - case 343: - case 344: - case 350: - case 357: - case 358: - case 359: - case 360: - case 361: - case 362: - case 363: - case 366: - case 367: - case 368: - case 369: - case 370: - case 371: - case 373: - case 376: - case 377: - case 381: - case 382: - case 383: - case 388: - case 389: - case 390: - case 391: - case 392: - case 393: - case 396: - case 397: - case 402: - case 403: - case 404: - case 405: - case 406: - case 407: - case 408: - case 409: - case 410: - case 413: - case 414: - case 415: - case 419: - case 420: - case 421: - case 422: - case 425: - case 433: - case 434: - case 442: - case 443: - case 444: - case 451: - case 452: - case 453: - case 454: - case 457: - case 460: - case 461: - case 462: - case 463: - case 464: - case 467: - case 468: - case 469: - case 470: - case 472: - case 473: - case 488: - case 495: - case 496: - case 502: - case 504: - case 505: - case 506: - case 510: - case 511: - case 512: - case 519: - case 524: - case 525: - case 526: - case 529: - case 530: - case 531: - case 532: - case 533: - case 534: - case 535: - case 536: - case 552: - case 555: - case 562: - case 563: - case 564: - case 565: - case 566: - case 567: - case 568: - case 575: - case 576: - case 577: - case 578: - case 580: - case 585: - case 586: - case 587: - case 588: - case 589: - case 592: - case 596: - case 598: - case 599: - case 600: - case 601: - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - case 8: - case 9: - case 517: - case 518: - { - this.NomeSocial = "AIG"; - return; - } - case 10: - { - this.NomeSocial = "AJAX"; - return; - } - case 11: - case 12: - case 13: - { - this.NomeSocial = "ALFA"; - return; - } - case 14: - case 15: - case 16: - case 176: - case 177: - { - this.NomeSocial = "ALIANÇA"; - return; - } - case 17: - case 18: - { - this.NomeSocial = "ALLIANZ"; - return; - } - case 24: - case 25: - case 26: - case 180: - { - this.NomeSocial = "ALLSEG"; - return; - } - case 27: - case 590: - case 591: - case 593: - { - this.NomeSocial = "AMIL"; - return; - } - case 32: - case 33: - case 34: - { - this.NomeSocial = "APLUB"; - return; - } - case 39: - case 40: - { - this.NomeSocial = "ARCH"; - return; - } - case 41: - { - this.NomeSocial = "ARGO"; - return; - } - case 48: - case 243: - { - this.NomeSocial = "GENERALI"; - return; - } - case 52: - case 53: - case 54: - case 55: - case 56: - { - this.NomeSocial = "ATLANTICA"; - return; - } - case 59: - case 60: - { - this.NomeSocial = "AUSTRAL"; - return; - } - case 63: - case 64: - case 65: - case 602: - { - this.NomeSocial = "AXA"; - return; - } - case 69: - { - this.NomeSocial = "AZUL"; - return; - } - case 88: - case 89: - case 90: - case 91: - case 92: - case 583: - { - this.NomeSocial = "BRADESCO"; - return; - } - case 93: - { - this.NomeSocial = "BRASIL LIBANO"; - return; - } - case 94: - { - this.NomeSocial = "BRASILCAP"; - return; - } - case 95: - case 96: - { - this.NomeSocial = "BRASILPREV"; - return; - } - case 98: - case 100: - { - this.NomeSocial = "BRASILUSITANA"; - return; - } - case 99: - { - this.NomeSocial = "BRASIL VEÍCULOS"; - return; - } - case 105: - case 106: - case 107: - case 108: - case 372: - { - this.NomeSocial = "CAIXA"; - return; - } - case 111: - case 112: - { - this.NomeSocial = "CAPEMISA"; - return; - } - case 115: - case 116: - case 117: - { - this.NomeSocial = "CARDIF"; - return; - } - case 119: - case 120: - { - this.NomeSocial = "CASTELLO"; - return; - } - case 125: - case 126: - { - this.NomeSocial = "CESCEBRASIL"; - return; - } - case 128: - case 129: - { - this.NomeSocial = "CHARTIS"; - return; - } - case 130: - { - this.NomeSocial = "CHUBB"; - return; - } - case 144: - case 184: - case 185: - { - this.NomeSocial = "INTERNACIONAL"; - return; - } - case 145: - case 289: - case 292: - case 293: - case 294: - { - this.NomeSocial = "ITAÉ"; - return; - } - case 151: - case 152: - case 188: - case 416: - case 417: - case 418: - { - this.NomeSocial = "REAL"; - return; - } - case 160: - case 161: - { - this.NomeSocial = "URBANIA"; - return; - } - case 178: - case 251: - { - this.NomeSocial = "GRALHA AZUL"; - return; - } - case 181: - { - this.NomeSocial = "EXCELSIOR"; - return; - } - case 196: - case 197: - { - this.NomeSocial = "CREDITO Y CAUCIAN"; - return; - } - case 200: - case 201: - { - this.NomeSocial = "CRUZEIRO DO SUL"; - return; - } - case 205: - case 206: - { - this.NomeSocial = "ECC"; - return; - } - case 212: - case 213: - { - this.NomeSocial = "EQUITATIVA"; - return; - } - case 215: - { - this.NomeSocial = "ESSOR"; - return; - } - case 216: - case 217: - case 218: - { - this.NomeSocial = "EULER HERMES"; - return; - } - case 221: - case 222: - { - this.NomeSocial = "EVEREST"; - return; - } - case 225: - case 226: - { - this.NomeSocial = "FACTORY"; - return; - } - case 230: - case 231: - case 232: - { - this.NomeSocial = "FEDERAL"; - return; - } - case 235: - case 236: - { - this.NomeSocial = "FINANCIAL"; - return; - } - case 241: - case 242: - { - this.NomeSocial = "GENERAL"; - return; - } - case 248: - case 249: - { - this.NomeSocial = "GNPP"; - return; - } - case 254: - case 255: - { - this.NomeSocial = "HANNOVER"; - return; - } - case 257: - case 258: - case 259: - case 260: - case 569: - case 597: - { - this.NomeSocial = "HDI"; - return; - } - case 264: - case 265: - case 266: - case 267: - case 268: - case 269: - { - this.NomeSocial = "HSBC"; - return; - } - case 271: - case 272: - { - this.NomeSocial = "ICATU"; - return; - } - case 273: - case 274: - { - this.NomeSocial = "IF P&C INSURANCE"; - return; - } - case 275: - { - this.NomeSocial = "INDIANA"; - return; - } - case 283: - case 284: - case 285: - case 603: - { - this.NomeSocial = "KOVR"; - return; - } - case 290: - case 291: - case 295: - case 296: - { - this.NomeSocial = "ITAÚ"; - return; - } - case 297: - case 298: - case 299: - { - this.NomeSocial = "J. MALUCELLI"; - return; - } - case 307: - case 308: - case 309: - { - this.NomeSocial = "YELUM"; - return; - } - case 310: - case 311: - { - this.NomeSocial = "LIDERANÇA"; - return; - } - case 317: - case 318: - case 319: - case 320: - case 321: - case 322: - case 323: - case 324: - case 325: - case 326: - case 327: - case 328: - { - this.NomeSocial = "MAPFRE"; - return; - } - case 330: - case 542: - case 561: - { - this.NomeSocial = "YASUDA MARITIMA"; - return; - } - case 336: - case 337: - { - this.NomeSocial = "MBM"; - return; - } - case 340: - { - this.NomeSocial = "METLIFE"; - return; - } - case 345: - case 346: - case 347: - { - this.NomeSocial = "MITSUI"; - return; - } - case 348: - case 349: - { - this.NomeSocial = "MONGERAL"; - return; - } - case 351: - case 352: - case 353: - case 354: - case 355: - case 356: - { - this.NomeSocial = "MONTEPIO"; - return; - } - case 364: - case 365: - case 380: - { - this.NomeSocial = "NATIONAL"; - return; - } - case 374: - case 375: - { - this.NomeSocial = "NOVA YORK"; - return; - } - case 378: - case 379: - { - this.NomeSocial = "ODYSSEY"; - return; - } - case 384: - case 385: - { - this.NomeSocial = "PARANÁ"; - return; - } - case 386: - case 387: - { - this.NomeSocial = "PARIS"; - return; - } - case 394: - case 395: - { - this.NomeSocial = "PLANALTO"; - return; - } - case 398: - case 399: - case 400: - case 401: - case 553: - case 554: - case 573: - { - this.NomeSocial = "PORTO SEGURO"; - return; - } - case 411: - case 412: - { - this.NomeSocial = "PRUDENTIAL"; - return; - } - case 423: - case 424: - { - this.NomeSocial = "ROYAL & SUN ALLIANCE"; - return; - } - case 426: - case 427: - case 428: - { - this.NomeSocial = "SABEMI"; - return; - } - case 429: - case 430: - case 431: - case 432: - { - this.NomeSocial = "SAFRA"; - return; - } - case 435: - case 436: - case 437: - { - this.NomeSocial = "SANTANDER"; - return; - } - case 438: - case 439: - { - this.NomeSocial = "SANTOS"; - return; - } - case 440: - case 441: - { - this.NomeSocial = "SANTOS"; - return; - } - case 445: - case 446: - case 447: - case 448: - { - this.NomeSocial = "SCOR"; - return; - } - case 449: - case 450: - { - this.NomeSocial = "SDB"; - return; - } - case 455: - case 456: - { - this.NomeSocial = "MINEIRA"; - return; - } - case 458: - case 459: - { - this.NomeSocial = "PONTUAL"; - return; - } - case 465: - case 466: - { - this.NomeSocial = "SIRIUS"; - return; - } - case 471: - case 594: - { - this.NomeSocial = "SOMPO"; - return; - } - case 474: - case 475: - case 476: - case 477: - case 478: - case 479: - case 480: - case 481: - case 482: - case 483: - case 484: - case 485: - case 486: - case 487: - case 557: - case 579: - { - this.NomeSocial = "SULAMERICA"; - return; - } - case 489: - case 490: - case 491: - case 492: - case 493: - case 494: - { - this.NomeSocial = "SWISS"; - return; - } - case 497: - case 498: - case 499: - case 500: - case 501: - { - this.NomeSocial = "TOKIO"; - return; - } - case 503: - { - this.NomeSocial = "TOTAL"; - return; - } - case 507: - case 508: - case 509: - { - this.NomeSocial = "TREVO"; - return; - } - case 513: - case 514: - case 515: - case 516: - { - this.NomeSocial = "UNIÃO"; - return; - } - case 520: - case 521: - case 584: - case 595: - { - this.NomeSocial = "UNIMED"; - return; - } - case 522: - case 523: - { - this.NomeSocial = "UNIVERSAL"; - return; - } - case 527: - case 528: - { - this.NomeSocial = "VALOR CAPITALIZAÇÃO"; - return; - } - case 537: - case 538: - case 539: - case 540: - case 541: - { - this.NomeSocial = "XL"; - return; - } - case 543: - case 544: - case 545: - case 546: - case 547: - case 548: - case 549: - case 550: - case 551: - { - this.NomeSocial = "ZURICH"; - return; - } - case 556: - { - this.NomeSocial = "SUHAI"; - return; - } - case 558: - { - this.NomeSocial = "SANCOR"; - return; - } - case 559: - { - this.NomeSocial = "AGROBRASIL"; - return; - } - case 560: - case 570: - { - this.NomeSocial = "SURA"; - return; - } - case 571: - case 572: - case 574: - case 605: - case 606: - { - this.NomeSocial = "SÃO FRANCISCO"; - return; - } - case 581: - { - this.NomeSocial = "SANTA CASA"; - return; - } - case 582: - { - this.NomeSocial = "AMEX"; - return; - } - case 604: - { - this.NomeSocial = "BANCO DO BRASIL"; - return; - } - } - } - else - { - } - long num1 = id - (long)621; - if (num1 <= (long)57) - { - switch ((uint)num1) - { - case 0: - case 3: - case 24: - case 32: - case 33: - case 34: - case 35: - case 36: - case 37: - case 41: - case 42: - { - this.NomeSocial = "UNIMED"; - return; - } - case 1: - case 2: - case 4: - case 5: - case 6: - case 7: - case 8: - case 12: - case 13: - case 16: - case 17: - case 19: - case 23: - case 25: - case 26: - case 27: - case 30: - case 31: - case 38: - case 39: - case 40: - case 44: - case 47: - case 48: - case 49: - case 50: - case 51: - case 54: - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - case 9: - case 18: - { - this.NomeSocial = "ALIRO"; - return; - } - case 10: - { - break; - } - case 11: - { - this.NomeSocial = "VR"; - return; - } - case 14: - { - this.NomeSocial = "ALLIANZ"; - return; - } - case 15: - { - this.NomeSocial = "HS"; - return; - } - case 20: - case 22: - case 53: - { - this.NomeSocial = "PORTO SEGURO"; - return; - } - case 21: - { - this.NomeSocial = "SURA"; - return; - } - case 28: - { - this.NomeSocial = "AMIL"; - return; - } - case 29: - { - this.NomeSocial = "YELUM"; - return; - } - case 43: - { - this.NomeSocial = "SULAMERICA"; - return; - } - case 45: - { - this.NomeSocial = "AFFINITY"; - return; - } - case 46: - { - this.NomeSocial = "BR"; - return; - } - case 52: - { - this.NomeSocial = "YAMAHA"; - return; - } - case 55: - { - this.NomeSocial = "SÃO FRANCISCO"; - return; - } - case 56: - { - this.NomeSocial = "EMBRACON"; - return; - } - case 57: - { - this.NomeSocial = "MAPFRE"; - return; - } - default: - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - } - } - else - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - this.NomeSocial = "METLIFE"; - return; - } - else if (id != (long)683) - { - long num2 = id - (long)687; - if (num2 <= (long)3) - { - switch ((uint)num2) - { - case 0: - { - this.NomeSocial = "ITAÚ"; - return; - } - case 1: - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - case 2: - { - this.NomeSocial = "SÃO LUCAS"; - return; - } - case 3: - { - this.NomeSocial = "UNIMED"; - return; - } - } - } - else - { - } - if (id == (long)694) - { - this.NomeSocial = "PORTO SEGURO"; - return; - } - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - else - { - this.NomeSocial = "UNIMED"; - return; - } - this.NomeSocial = "PORTO SEGURO"; - return; - } - else if (id > (long)716) - { - if (id == (long)717) - { - this.NomeSocial = "CHUBB"; - return; - } - if (id == (long)734) - { - this.NomeSocial = "RC"; - return; - } - if (id == (long)741) - { - this.NomeSocial = "SOMPO"; - return; - } - } - else - { - long num3 = id - (long)703; - if (num3 <= (long)8) - { - switch ((uint)num3) - { - case 0: - case 6: - { - this.NomeSocial = "UNIMED"; - return; - } - case 1: - case 4: - case 8: - { - this.NomeSocial = "MAPFRE"; - return; - } - case 2: - case 3: - case 5: - case 7: - { - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - return; - } - } - } - else - { - } - if (id == (long)716) - { - this.NomeSocial = "UNIMED"; - return; - } - } - str = (base.Id == 0 ? " " : this.NomeSocial); - this.NomeSocialBanco = str; - nome = this.Nome ?? ""; - this.NomeSocial = nome; - } - } - - [Description("APELIDO")] - [Log(true)] - public string NomeSocialBanco - { - get - { - string str = this._nomeSocialBanco; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._nomeSocialBanco = value; - } - } - - [Log(true)] - public string Observacao - { - get - { - return this._observacao; - } - set - { - this._observacao = value; - } - } - - public bool Selecionado - { - get - { - return this._selecionado; - } - set - { - if (value == this._selecionado) - { - return; - } - this._selecionado = value; - this.OnPropertyChanged("Selecionado"); - } - } - - public string Senha - { - get; - set; - } - - [Log(true)] - public string Susep - { - get - { - string str = this._susep; - if (str != null) - { - return str.ToUpper(); - } - return null; - } - set - { - this._susep = value; - } - } - - [Log(true)] - public decimal? Tolerancia - { - get; - set; - } - - [Log(true)] - public decimal? ToleranciaPremio - { - get; - set; - } - - public string Usuario - { - get; - set; - } - - [JsonIgnore] - public Func>> ValidationEvent - { - get - { - Seguradora seguradora = this; - return new Func>>(seguradora.Validate); - } - } - - public Seguradora() - { - } - - public List Log() - { - string str; - string str1; - string description; - List tupleLists = new List(); - TupleList tupleList = new TupleList(); - ObservableCollection> observableCollection = new ObservableCollection>() - { - new Tuple("SEGURADORA", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""), - new Tuple("CNPJ", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""), - new Tuple("ASSISTÊNCIA 24 HORAS", (string.IsNullOrWhiteSpace(this.Assistencia) ? "" : this.Assistencia), ""), - new Tuple("SUSEP", (string.IsNullOrWhiteSpace(this.Susep) ? "" : this.Susep), ""), - new Tuple("CÓDIGO COMPANHIA", (string.IsNullOrWhiteSpace(this.Codigo) ? "" : this.Codigo), "") - }; - decimal? tolerancia = this.Tolerancia; - if (!tolerancia.HasValue) - { - str = ""; - } - else - { - tolerancia = this.Tolerancia; - if (tolerancia.HasValue) - { - str = tolerancia.GetValueOrDefault().ToString(); - } - else - { - str = null; - } - } - observableCollection.Add(new Tuple("TOLERÂNCIA DE COMISSÃO", str, "")); - tolerancia = this.ToleranciaPremio; - if (!tolerancia.HasValue) - { - str1 = ""; - } - else - { - tolerancia = this.ToleranciaPremio; - if (tolerancia.HasValue) - { - str1 = tolerancia.GetValueOrDefault().ToString(); - } - else - { - str1 = null; - } - } - observableCollection.Add(new Tuple("TOLERÂNCIA DE PRÊMIO", str1, "")); - observableCollection.Add(new Tuple("SEGURADORA ATIVA", (this.Ativo ? "SIM" : "NÃO"), "")); - observableCollection.Add(new Tuple("OBSERVAÇÃO", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), "")); - tupleList.Tuples = observableCollection; - tupleLists.Add(tupleList); - List tupleLists1 = tupleLists; - if (this.Contatos != null) - { - ObservableCollection> observableCollection1 = new ObservableCollection>() - { - new Tuple("CONTATOS$", "", "") - }; - foreach (SeguradoraContato contato in this.Contatos) - { - observableCollection1.Add(new Tuple(string.Format(" CONTATO {0}$", this.Contatos.IndexOf(contato) + 1), "", "")); - observableCollection1.Add(new Tuple(" NOME", (string.IsNullOrWhiteSpace(contato.NomeContato) ? "" : contato.NomeContato.ToUpper()), "")); - ObservableCollection> observableCollection2 = observableCollection1; - TipoTelefone? tipo = contato.Tipo; - if (!tipo.HasValue) - { - description = ""; - } - else - { - tipo = contato.Tipo; - if (tipo.HasValue) - { - description = tipo.GetValueOrDefault().GetDescription(); - } - else - { - description = null; - } - } - observableCollection2.Add(new Tuple(" TIPO TELEFONE", description, "")); - observableCollection1.Add(new Tuple(" PREFIXO", (string.IsNullOrWhiteSpace(contato.Prefixo) ? "" : contato.Prefixo), "")); - observableCollection1.Add(new Tuple(" TELEFONE", (string.IsNullOrWhiteSpace(contato.Numero) ? "" : contato.Numero), "")); - } - tupleLists1.Add(new TupleList() - { - Tuples = observableCollection1 - }); - } - if (this.Enderecos != null) - { - ObservableCollection> observableCollection3 = new ObservableCollection>() - { - new Tuple("ENDEREÇOS$", "", "") - }; - foreach (SeguradoraEndereco endereco in this.Enderecos) - { - observableCollection3.Add(new Tuple(string.Format(" ENDEREÇO {0}$", this.Enderecos.IndexOf(endereco) + 1), "", "")); - observableCollection3.Add(new Tuple(" TIPO DO ENDEREÇO", endereco.Tipo.GetDescription(), "")); - observableCollection3.Add(new Tuple(" CEP", (string.IsNullOrWhiteSpace(endereco.Cep) ? "" : endereco.Cep), "")); - observableCollection3.Add(new Tuple(" ENDEREÇO", (string.IsNullOrWhiteSpace(endereco.Endereco) ? "" : endereco.Endereco), "")); - observableCollection3.Add(new Tuple(" NÚMERO", (string.IsNullOrWhiteSpace(endereco.Numero) ? "" : endereco.Numero), "")); - observableCollection3.Add(new Tuple(" COMPLEMENTO", (string.IsNullOrWhiteSpace(endereco.Complemento) ? "" : endereco.Complemento), "")); - observableCollection3.Add(new Tuple(" BAIRRO", (string.IsNullOrWhiteSpace(endereco.Bairro) ? "" : endereco.Bairro), "")); - observableCollection3.Add(new Tuple(" CIDADE", (string.IsNullOrWhiteSpace(endereco.Cidade) ? "" : endereco.Cidade), "")); - observableCollection3.Add(new Tuple(" ESTADO", (string.IsNullOrWhiteSpace(endereco.Estado) ? "" : endereco.Estado), "")); - } - tupleLists1.Add(new TupleList() - { - Tuples = observableCollection3 - }); - } - return tupleLists1; - } - - protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) - { - PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged; - if (propertyChangedEventHandler == null) - { - return; - } - propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName)); - } - - public List> Validate() - { - List> keyValuePairs = ValidationHelper.AddValue(); - if (!string.IsNullOrWhiteSpace(this.Documento) && !this.Documento.ValidacaoDocumento()) - { - keyValuePairs.AddValue("Documento", Messages.Invalido, true); - } - decimal? tolerancia = this.Tolerancia; - decimal num = 999; - if ((tolerancia.GetValueOrDefault() > num) & tolerancia.HasValue) - { - keyValuePairs.AddValue("Tolerancia", Messages.Invalido, true); - } - tolerancia = this.ToleranciaPremio; - num = 999999; - if ((tolerancia.GetValueOrDefault() > num) & tolerancia.HasValue) - { - keyValuePairs.AddValue("ToleranciaPremio", Messages.Invalido, true); - } - return keyValuePairs; - } - - public event PropertyChangedEventHandler PropertyChanged; - } -} \ No newline at end of file -- cgit v1.2.3