public bool IdentityNumberVerification(ACompany model) { try { KPSPublicSoapClient client = new KPSPublicSoapClient(new KPSPublicSoapClient.EndpointConfiguration()); TCKimlikNoDogrulaRequest requestData = new TCKimlikNoDogrulaRequest(); requestData.Body = new TCKimlikNoDogrulaRequestBody() { Ad = model.Name, Soyad = model.Surname, DogumYili = model.BirthYear, TCKimlikNo = model.IdentityNumber }; var response = client.TCKimlikNoDogrulaAsync(requestData)?.Result.Body; if (!response.TCKimlikNoDogrulaResult) { return(false); } return(true); } catch (Exception ex) { return(false); } }
public bool ACommpanyInfoAddScreen() { Console.WriteLine("Kimlik Bilgilerinizi Doğrulamak için İlgili Verileri Lütfen Giriniz."); Console.Write("Ad : "); string name = Console.ReadLine(); Console.Write("Soyad : "); string surName = Console.ReadLine(); Console.Write("Doğum Yılı : "); int birthYear = Convert.ToInt32(Console.ReadLine()); Console.Write("TC Kimlik No : "); long identityNumber = long.Parse(Console.ReadLine()); ACompany model = new ACompany() { Name = name, Surname = surName, IdentityNumber = identityNumber, BirthYear = birthYear }; bool identityNumberVerificationResult = _identityNumberVerificationService.IdentityNumberVerification(model); if (identityNumberVerificationResult) { Console.WriteLine("Doğrulama Sonucu : Başarılı"); model.IsVerification = identityNumberVerificationResult; Add(model); return(true); } else { Console.WriteLine("Doğrulama Sonucu : Başarısız"); return(false); } }
public void Update(ACompany model) { _aCompanyDal.Update(model); }
public void Delete(ACompany model) { _aCompanyDal.Delete(model); }
public void Add(ACompany model) { _aCompanyDal.Add(model); }