Example #1
0
        private void CreatePatientMethod()
        {
            if (Firstname == null || Firstname.Equals("") || Name == null || Name.Equals(""))
            {
                MaterialMessageBox.ShowError("Le patient doit avoir un nom/prénom !");
                return;
            }
            Model.Patient patient = new Model.Patient()
            {
                birthday  = Birthdate,
                firstname = Firstname,
                name      = Name
            };

            if (Patients.CreatePatient(patient))
            {
                lastWindow.UpdatePatientList();
                CloseCurrentWindow();
                var msg = Utils.Utils.createMessageBox("Patient crée avec succés");
                msg.Show();
            }
            else
            {
                MaterialMessageBox.ShowError("Impossible de créer un nouveau patient !");
            }
        }
Example #2
0
        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);
        }
        public override bool Equals(object obj)
        {
            var otherEmployee = obj as EmployeeId;

            if (otherEmployee == null)
            {
                return(false);
            }

            return(Firstname.Equals(otherEmployee.Firstname) && Lastname.Equals(otherEmployee.Lastname));
        }
Example #4
0
        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);
        }
        public IEnumerable <ValidationResult> Validate(ValidationContext validationContext)
        {
            if (Firstname.Equals(Lastname))
            {
                yield return(new ValidationResult("Firstname and Lastname can not be equal!"));
            }

            if (IsAdmin && string.IsNullOrEmpty(Password))
            {
                yield return(new ValidationResult("If user is an admin she must have a password!"));
            }
        }
Example #6
0
 public bool NotEquals(AddressData other)
 {
     if (Object.ReferenceEquals(other, null))
     {
         return(true);
     }
     if (Object.ReferenceEquals(this, other))
     {
         return(false);
     }
     return(!Firstname.Equals(other.Firstname) || Lastname != other.Lastname);
 }
Example #7
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));
 }
Example #8
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)
                 ));
        }
Example #9
0
 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);
 }
Example #10
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));
        }
Example #11
0
 public int CompareTo(ContactData other)
 {
     if (Object.ReferenceEquals(other, null))
     {
         return(1);
     }
     if (!(Firstname.Equals(other.Firstname)))
     {
         return(Firstname.CompareTo(other.Firstname));
     }
     else
     {
         return(Lastname.CompareTo(other.Lastname));
     }
 }
        /// <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)
                 ));
        }
Example #13
0
        /// <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)
                 ));
        }
Example #14
0
        public override bool Equals(object obj)
        {
            if (!(obj is UserDto entity))
            {
                return(false);
            }

            if (Id == entity.Id &&
                UserName.Equals(entity.UserName, StringComparison.Ordinal) &&
                PasswordHash.Equals(entity.PasswordHash, StringComparison.Ordinal) &&
                Salt.Equals(entity.Salt, StringComparison.Ordinal) &&
                Email.Equals(entity.Email, StringComparison.Ordinal) &&
                Firstname.Equals(entity.Firstname, StringComparison.OrdinalIgnoreCase) &&
                Surname.Equals(entity.Surname, StringComparison.OrdinalIgnoreCase) &&
                Culture.Equals(entity.Culture, StringComparison.OrdinalIgnoreCase) &&
                Timezone.Equals(entity.Timezone, StringComparison.OrdinalIgnoreCase) &&
                Amount == entity.Amount)
            {
                return(true);
            }

            return(false);
        }
Example #15
0
        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);
        }
Example #16
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)
                 ));
        }