Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (AdditionalContactInfo == null ? 0 : AdditionalContactInfo.GetHashCode());
         hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode());
         hash = hash * 23 + (Demographics == null ? 0 : Demographics.GetHashCode());
         hash = hash * 23 + (EmailPromotion == default(int) ? 0 : EmailPromotion.GetHashCode());
         hash = hash * 23 + (FirstName == null ? 0 : FirstName.GetHashCode());
         hash = hash * 23 + (LastName == null ? 0 : LastName.GetHashCode());
         hash = hash * 23 + (MiddleName == null ? 0 : MiddleName.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (NameStyle == default(bool) ? 0 : NameStyle.GetHashCode());
         hash = hash * 23 + (PersonType == null ? 0 : PersonType.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (Suffix == null ? 0 : Suffix.GetHashCode());
         hash = hash * 23 + (Title == null ? 0 : Title.GetHashCode());
         return(hash);
     }
 }
Exemplo n.º 2
0
        private void btnPreviewNSave_Click(object sender, EventArgs e)
        {
            Person oPerson = null;

            if (validateControls())
            {
                oPerson                  = new Person();
                oPerson.PersonID         = 0;
                oPerson.PersonCode       = "";
                oPerson.PersonFirstName  = txtPersonFName.Text.Trim();
                oPerson.PersonMiddleName = txtPersonMName.Text.Trim();
                oPerson.PersonLastName   = txtPersonLName.Text.Trim();
                oPerson.OrganizationName = "";
                oPerson.PersonDOB        = Convert.ToDateTime(mskPersonDOB.Text.Trim());
                int nGender = -1;
                if (rdPersonMale.Checked)
                {
                    nGender = 1;
                }
                else if (rdPersonFemale.Checked)
                {
                    nGender = 2;
                }
                else if (rdPersonOthers.Checked)
                {
                    nGender = 0;
                }
                oPerson.PersonEntityTypeCode = eGlobal.EntityType.Individual.GetHashCode();
                oPerson.PersonEntityTypeDesc = eGlobal.EntityType.Individual.ToString();

                oPerson.PersonGender   = nGender;
                oPerson.PersonTypeCode = PersonType.GetHashCode();
                oPerson.personTypeDesc = PersonType.ToString();

                AddressDetails oAddress = new AddressDetails();
                oAddress.AddressID    = 0;
                oAddress.PersonID     = 0;
                oAddress.AddressType  = 1;
                oAddress.AddressLine1 = txtAddressLine1.Text.Trim();
                oAddress.AddressLine2 = txtAddressLine2.Text.Trim();
                oAddress.City         = txtArea.Text.Trim();
                oAddress.Taluka       = txtTaluka.Text.Trim();
                oAddress.District     = txtDistrict.Text.Trim();
                oAddress.State        = txtState.Text.Trim();
                oAddress.ZipCode      = txtPincode.Text.Trim();

                //oPerson.AddressDetails = oAddress;

                List <ContactDetails> lstContactDetails = new List <ContactDetails>();
                ContactDetails        oContact          = new ContactDetails();
                oContact.ContactID       = 0;
                oContact.PersonID        = 0;
                oContact.ContactNo       = txtMobileNo.Text.Trim();
                oContact.ContactTypeCode = eGlobal.ContactType.MobileNo.GetHashCode().ToString();
                oContact.ContactTypeDesc = eGlobal.ContactType.MobileNo.ToString();// "MobileNo";
                //oPerson.ContactDetails.Add(oContact);
                lstContactDetails.Add(oContact);
                oContact = null;

                oContact                 = new ContactDetails();
                oContact.ContactID       = 0;
                oContact.PersonID        = 0;
                oContact.ContactNo       = txtFaxNo.Text.Trim();
                oContact.ContactTypeCode = eGlobal.ContactType.FaxNo.GetHashCode().ToString();
                oContact.ContactTypeDesc = eGlobal.ContactType.FaxNo.ToString();// "FaxNo";
                //oPerson.ContactDetails.Add(oContact);
                lstContactDetails.Add(oContact);
                oContact = null;

                oContact                 = new ContactDetails();
                oContact.ContactID       = 0;
                oContact.PersonID        = 0;
                oContact.ContactNo       = txtEmail.Text.Trim();
                oContact.ContactTypeCode = eGlobal.ContactType.EmailID.GetHashCode().ToString();
                oContact.ContactTypeDesc = eGlobal.ContactType.EmailID.ToString();// "EmailID";
                //oPerson.ContactDetails.Add(oContact);
                lstContactDetails.Add(oContact);

                //oPerson.ContactDetails = lstContactDetails;

                VerificationDetails oVerification = new VerificationDetails();
                oVerification.PersonID                = 0;
                oVerification.AadhaarCardNo           = txtAadhaarNo.Text.Trim();
                oVerification.DrivingLicenceNo        = txtDrivingLicenceNo.Text.Trim();
                oVerification.PANCardNo               = txtPANNo.Text.Trim();
                oVerification.OtherIdCardDocumentNo   = txtOtherDocumentID.Text.Trim();
                oVerification.OtherIdCardDocumentName = txtOtherDocumentName.Text.Trim();
                oVerification.AadhaarCardID           = 0;
                oVerification.DrivingLicenceID        = 0;
                oVerification.PANID = 0;
                oVerification.OtherIdCardDocumentID = 0;

                //oPerson.VerificationDetails = oVerification;

                PhotoDetails oPhotoDetails = new PhotoDetails();
                if (PersonPhotoExtention != null)
                {
                    oPhotoDetails.PhotoID       = 0;
                    oPhotoDetails.PersonID      = 0;
                    oPhotoDetails.iPhoto        = File.ReadAllBytes(PersonPhotoLocation);
                    oPhotoDetails.FileExtension = PersonPhotoExtention;
                    oPhotoDetails.MIMEType      = "";
                    oPhotoDetails.FileSize      = PersonPhotoSize;
                    oPhotoDetails.Width         = PersonPhotoWidth;
                    oPhotoDetails.Height        = PersonPhotoHeight;
                    oPhotoDetails.Thumbnail     = File.ReadAllBytes(PersonThumbImagePath);
                }

                //oPerson.PhotoDetails = oPhotoDetails;

                DataTable dtContactDetails = eGlobal.CreateDataTable <ContactDetails>(lstContactDetails);
                //oPerson.ContactDetails = dtContactDetails;


                List <CardDetails> lstCardDetails = new List <CardDetails>();
                CardDetails        oCardDetails   = new CardDetails();

                oCardDetails                   = new CardDetails();
                oCardDetails.CardID            = 0;
                oCardDetails.PersonID          = 0;
                oCardDetails.ReferenceID       = oVerification.AadhaarCardID;
                oCardDetails.IDTypeCode        = eGlobal.CardType.AadhaarCard.GetHashCode();
                oCardDetails.IDTypeDescription = eGlobal.CardType.AadhaarCard.ToString();
                oCardDetails.iPhoto            = null;
                lstCardDetails.Add(oCardDetails);
                oCardDetails = null;

                oCardDetails                   = new CardDetails();
                oCardDetails.CardID            = 0;
                oCardDetails.PersonID          = 0;
                oCardDetails.ReferenceID       = oVerification.PANID;
                oCardDetails.IDTypeCode        = eGlobal.CardType.PanCard.GetHashCode();
                oCardDetails.IDTypeDescription = eGlobal.CardType.PanCard.ToString();
                oCardDetails.iPhoto            = null;
                lstCardDetails.Add(oCardDetails);
                oCardDetails = null;

                oCardDetails                   = new CardDetails();
                oCardDetails.CardID            = 0;
                oCardDetails.PersonID          = 0;
                oCardDetails.ReferenceID       = oVerification.DrivingLicenceID;
                oCardDetails.IDTypeCode        = eGlobal.CardType.DrivingLicenceID.GetHashCode();
                oCardDetails.IDTypeDescription = eGlobal.CardType.DrivingLicenceID.ToString();
                oCardDetails.iPhoto            = null;
                lstCardDetails.Add(oCardDetails);
                oCardDetails = null;

                oCardDetails                   = new CardDetails();
                oCardDetails.CardID            = 0;
                oCardDetails.PersonID          = 0;
                oCardDetails.ReferenceID       = oVerification.OtherIdCardDocumentID;
                oCardDetails.IDTypeCode        = eGlobal.CardType.OtherIDCard.GetHashCode();
                oCardDetails.IDTypeDescription = eGlobal.CardType.OtherIDCard.ToString();
                oCardDetails.iPhoto            = null;
                lstCardDetails.Add(oCardDetails);
                oCardDetails = null;

                DataTable dtCardDetails = eGlobal.CreateDataTable <CardDetails>(lstCardDetails);
                //oPerson.CardDetails = dtCardDetails;
                //oPerson.iPhoto=
                if (oPerson != null)
                {
                    frmViewPersonDetails_Confirm ofrmViewPersonDetails = new frmViewPersonDetails_Confirm();
                    ofrmViewPersonDetails.PersonType    = PersonType;
                    ofrmViewPersonDetails.PersonDetails = oPerson;
                    ofrmViewPersonDetails.oAddress      = oAddress;
                    ofrmViewPersonDetails.lstCard       = lstCardDetails;
                    ofrmViewPersonDetails.lstContact    = lstContactDetails;
                    ofrmViewPersonDetails.oPhoto        = oPhotoDetails;
                    ofrmViewPersonDetails.oVerification = oVerification;
                    ofrmViewPersonDetails.ShowDialog(this);
                    ofrmViewPersonDetails.Dispose();
                    ofrmViewPersonDetails = null;
                }
            }
        }
 public override int GetHashCode()
 {
     return(VerbRoot.GetHashCode() + ZamirPeyvasteh.GetHashCode() + Person.GetHashCode() +
            TenseForm.GetHashCode() + Positivity.GetHashCode());
 }