コード例 #1
0
ファイル: Contactos.cs プロジェクト: jrtease/Migracion
        public Entity GetEntityFromContacto()
        {
            Entity ent = new Entity("contact");

            ent[NombreCamposContacto.Aen_ClaveIntegracionCRM]       = Aen_ClaveIntegracion;
            ent[NombreCamposContacto.Aen_CargoprincipalIdCRM]       = Aen_CargoprincipalId.Equals(Guid.Empty) ? null : new EntityReference("aen_tiposdecargo", Aen_CargoprincipalId);
            ent[NombreCamposContacto.Aen_NumerodocumentoCRM]        = Aen_Numerodocumento.Equals(string.Empty) ? string.Empty : Aen_Numerodocumento;
            ent[NombreCamposContacto.Aen_TipodocumentoCRM]          = Aen_Tipodocumento.Equals(string.Empty) ? null : new OptionSetValue(Convert.ToInt32(Aen_Tipodocumento));
            ent[NombreCamposContacto.Aen_TratamientoCRM]            = Aen_Tratamiento.Equals(string.Empty) ? null : Aen_Tratamiento;
            ent[NombreCamposContacto.Aen_ObservacionesCRM]          = Aen_Observaciones.Equals(string.Empty) ? string.Empty : Aen_Observaciones;
            ent[NombreCamposContacto.Aen_ObservacionesmigracionCRM] = Aen_Observacionesmigracion.Equals(string.Empty) ? string.Empty : Aen_Observacionesmigracion;
            if (!Donotsendmm.Equals(string.Empty))
            {
                if (Donotsendmm == "1")
                {
                    ent[NombreCamposContacto.DonotsendmmCRM] = true;
                }
                else if (Donotsendmm == "0")
                {
                    ent[NombreCamposContacto.DonotsendmmCRM] = false;
                }
            }
            else
            {
                ent[NombreCamposContacto.DonotsendmmCRM] = false;
            }
            ent[NombreCamposContacto.Emailaddress1CRM]             = Emailaddress1.Equals(string.Empty) ? string.Empty: Emailaddress1;
            ent[NombreCamposContacto.FirstnameCRM]                 = Firstname.Equals(string.Empty) ? string.Empty : Firstname;
            ent[NombreCamposContacto.LastnameCRM]                  = Lastname.Equals(string.Empty) ? string.Empty : Lastname;
            ent[NombreCamposContacto.GendercodeCRM]                = Gendercode.Equals(string.Empty) ? null : new OptionSetValue(Convert.ToInt32(Gendercode));
            ent[NombreCamposContacto.MobilephoneCRM]               = Mobilephone.Equals(string.Empty) ? string.Empty : Mobilephone;
            ent[NombreCamposContacto.Telephone1CRM]                = Telephone1.Equals(string.Empty) ? string.Empty : Telephone1;
            ent[NombreCamposContacto.Aen_OrigenCRM]                = Aen_Origen.Equals(string.Empty) ? null : new OptionSetValue(Convert.ToInt32(Aen_Origen));
            ent[NombreCamposContacto.Aen_IdentificadorcontactoCRM] = Aen_Identificadorcontacto.Equals(string.Empty) ? null : Aen_Identificadorcontacto;

            if (Contactid != Guid.Empty)
            {
                ent["contactid"] = Contactid;
                ent.Id           = Contactid;
            }

            if (Statecode.Equals("Activo"))
            {
                ent[NombreCamposContacto.StatecodeCRM]  = new OptionSetValue(0);
                ent[NombreCamposContacto.StatuscodeCRM] = new OptionSetValue(1);
            }
            else if (Statecode.Equals("Inactivo") && Contactid != Guid.Empty && Contactid != null)
            {
                ent[NombreCamposContacto.StatecodeCRM]  = new OptionSetValue(1);
                ent[NombreCamposContacto.StatuscodeCRM] = new OptionSetValue(2);
            }

            //Para saltar plugins de envío de datos a NEXO
            //ent["aen_vienedeintegracion"] = true;

            return(ent);
        }
コード例 #2
0
ファイル: Retailers.cs プロジェクト: limweld/Retailers
        private bool input_Validity()
        {
            if (Firstname.Equals("") || Lastname.Equals("") || maskedTextBox_Wallet_Id.Equals("") ||
                Province.Equals("") || City.Equals("") || Barangay.Equals("") || BlockStr.Equals(""))
            {
                MessageBox.Show("Incomplete Fields");
                return(false);
            }

            return(true);
        }
コード例 #3
0
 public bool Equals(ContactData other)
 {
     if (other is null)
     {
         return(false);
     }
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Firstname.Equals(other.Firstname) && Lastname.Equals(other.Lastname) && Id.Equals(other.Id));
 }
コード例 #4
0
        /// <summary>
        /// Returns true if InlineResponseDefault5Value instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponseDefault5Value to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponseDefault5Value other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     OdataEtag == other.OdataEtag ||
                     OdataEtag != null &&
                     OdataEtag.Equals(other.OdataEtag)
                     ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     Fullname == other.Fullname ||
                     Fullname != null &&
                     Fullname.Equals(other.Fullname)
                 ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Azureactivedirectoryobjectid == other.Azureactivedirectoryobjectid ||
                     Azureactivedirectoryobjectid != null &&
                     Azureactivedirectoryobjectid.Equals(other.Azureactivedirectoryobjectid)
                 ) &&
                 (
                     Systemuserid == other.Systemuserid ||
                     Systemuserid != null &&
                     Systemuserid.Equals(other.Systemuserid)
                 ) &&
                 (
                     Ownerid == other.Ownerid ||
                     Ownerid != null &&
                     Ownerid.Equals(other.Ownerid)
                 ));
        }
コード例 #5
0
ファイル: AddressData.cs プロジェクト: healer95/pftcsharp-35
 public bool Equals(AddressData other)
 {
     if (Object.ReferenceEquals(other, null))
     {
         return(false);
     }
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Firstname.Equals(other.Firstname) && Lastname.Equals(other.Lastname));
     //return (Firstname == other.Firstname && Lastname == other.Lastname);
 }
コード例 #6
0
        public bool Equals(CustomerName other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }
            if (ReferenceEquals(other, this))
            {
                return(true);
            }

            return(Firstname.Equals(other.Firstname) && Lastname.Equals(other.Lastname) && Location.Equals(other.Location));
        }
コード例 #7
0
ファイル: Employee.cs プロジェクト: iworksrc/poverka
        /// <summary>
        /// Returns true if Employee instances are equal
        /// </summary>
        /// <param name="other">Instance of Employee to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Employee other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Tenantid == other.Tenantid ||
                     Tenantid != null &&
                     Tenantid.Equals(other.Tenantid)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Thirdname == other.Thirdname ||
                     Thirdname != null &&
                     Thirdname.Equals(other.Thirdname)
                 ) &&
                 (
                     Login == other.Login ||
                     Login != null &&
                     Login.Equals(other.Login)
                 ) &&
                 (
                     Passord == other.Passord ||
                     Passord != null &&
                     Passord.Equals(other.Passord)
                 ));
        }
コード例 #8
0
 public bool Equals(ContactData other)
 {
     if (Object.ReferenceEquals(other, null))
     {
         return(false);
     }
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     if (Lastname.Equals(other.Lastname) && (Name.Equals(other.Name)))
     {
         return(true);
     }
     return(false);
 }
コード例 #9
0
        /// <summary>
        /// Returns true if InlineResponseDefaultCreatedby instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponseDefaultCreatedby to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponseDefaultCreatedby other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Fullname == other.Fullname ||
                     Fullname != null &&
                     Fullname.Equals(other.Fullname)
                     ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     Systemuserid == other.Systemuserid ||
                     Systemuserid != null &&
                     Systemuserid.Equals(other.Systemuserid)
                 ) &&
                 (
                     Ownerid == other.Ownerid ||
                     Ownerid != null &&
                     Ownerid.Equals(other.Ownerid)
                 ));
        }
コード例 #10
0
ファイル: Customer.cs プロジェクト: evoltafreak/CarRent.Api
        /// <summary>
        /// Returns true if Customer instances are equal
        /// </summary>
        /// <param name="other">Instance of Customer to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Customer other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IdCustomer == other.IdCustomer ||

                     IdCustomer.Equals(other.IdCustomer)
                     ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                 ) &&
                 (
                     AddressNr == other.AddressNr ||
                     AddressNr != null &&
                     AddressNr.Equals(other.AddressNr)
                 ) &&
                 (
                     Place == other.Place ||
                     Place != null &&
                     Place.Equals(other.Place)
                 ));
        }
コード例 #11
0
ファイル: Contactos.cs プロジェクト: jrtease/Migracion
        public bool ContactosIguales(Contactos contCRM, ref Entity contSalida)
        {
            bool retorna = false;

            if (!Aen_ClaveIntegracionParent.Equals(contCRM.Aen_ClaveIntegracionParent))
            {
                retorna = true;
            }
            if (!Aen_CargoprincipalId.Equals(contCRM.Aen_CargoprincipalId))
            {
                retorna = true;
            }
            if (!Aen_Numerodocumento.Equals(contCRM.Aen_Numerodocumento))
            {
                retorna = true;
            }
            if (!Aen_Tipodocumento.Equals(contCRM.Aen_Tipodocumento))
            {
                retorna = true;
            }
            if (!Aen_Tratamiento.Equals(contCRM.Aen_Tratamiento))
            {
                retorna = true;
            }
            if (!Aen_Observaciones.Equals(contCRM.Aen_Observaciones))
            {
                retorna = true;
            }
            if (!Aen_Observacionesmigracion.Equals(contCRM.Aen_Observacionesmigracion))
            {
                retorna = true;
            }
            if (!Donotsendmm.Equals(contCRM.Donotsendmm) && Donotsendmm != "2")
            {
                retorna = true;
            }
            if (!Emailaddress1.Equals(contCRM.Emailaddress1))
            {
                retorna = true;
            }
            if (!Firstname.Equals(contCRM.Firstname))
            {
                retorna = true;
            }
            if (!Gendercode.Equals(contCRM.Gendercode))
            {
                retorna = true;
            }
            if (!Lastname.Equals(contCRM.Lastname))
            {
                retorna = true;
            }
            if (!Mobilephone.Equals(contCRM.Mobilephone))
            {
                retorna = true;
            }
            if (!Statecode.Equals(contCRM.Statecode))
            {
                retorna = true;
            }
            if (!Telephone1.Equals(contCRM.Telephone1))
            {
                retorna = true;
            }
            if (!Aen_Origen.Equals(contCRM.Aen_Origen))
            {
                retorna = true;
            }
            if (!Aen_Identificadorcontacto.Equals(contCRM.Aen_Identificadorcontacto))
            {
                retorna = true;
            }
            //var decimalString = auxTerCRM.Revenue_Base.ToString("#,####");

            if (retorna)
            {
                Contactid  = contCRM.Contactid;
                contSalida = GetEntityFromContacto();
            }

            return(retorna);
        }
コード例 #12
0
        /// <summary>
        /// Returns true if SummaryAthlete instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryAthlete to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryAthlete other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ResourceState == other.ResourceState ||
                     ResourceState != null &&
                     ResourceState.Equals(other.ResourceState)
                     ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     ProfileMedium == other.ProfileMedium ||
                     ProfileMedium != null &&
                     ProfileMedium.Equals(other.ProfileMedium)
                 ) &&
                 (
                     Profile == other.Profile ||
                     Profile != null &&
                     Profile.Equals(other.Profile)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     Sex == other.Sex ||
                     Sex != null &&
                     Sex.Equals(other.Sex)
                 ) &&
                 (
                     Premium == other.Premium ||
                     Premium != null &&
                     Premium.Equals(other.Premium)
                 ) &&
                 (
                     Summit == other.Summit ||
                     Summit != null &&
                     Summit.Equals(other.Summit)
                 ) &&
                 (
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                 ) &&
                 (
                     UpdatedAt == other.UpdatedAt ||
                     UpdatedAt != null &&
                     UpdatedAt.Equals(other.UpdatedAt)
                 ));
        }