예제 #1
0
 private void CashRecord()
 {
     using (var dbContext = new UnitOfWork())
     {
         var person = dbContext.PeopleRepository.GetById(PersonId);
         txtFirstName.Text            = person.FirstName;
         txtFamily.Text               = person.LastName;
         txtFname.Text                = person.FatherName;
         txtBDate.Text                = person.BirthDate.ToString(CultureInfo.InvariantCulture);
         txtAccountNumber.Text        = person.AccountNumber;
         txtShabaNumber.Text          = person.ShabaNumber;
         txtPassportNumber.Text       = person.PassportCode;
         txtEmail.Text                = person.Email;
         txtTell.Text                 = person.Tell;
         txtMobile.Text               = person.Mobile;
         txtAddress.Text              = person.Address;
         txtNationalCode.Text         = person.NationalCode;
         cmbBank.SelectedValue        = person.BankId;
         cmbNationality.SelectedValue = person.Nationality;
         cmbCountry.SelectedValue     = person.CountryId;
         txtCartNumber.Text           = person.CartNumber;
         txtCertificat.Text           = person.CertificatNumber;
         txtCity.Text                 = person.City;
         txtComment.Text              = person.Comment;
         personPhoto.Image            = UtilityClass.ByteArrayToImage(person.Photo);
     }
 }
예제 #2
0
 private void CashRecord()
 {
     using (var dbContext = new UnitOfWork())
     {
         var person = dbContext.EmployeeRepository.GetById(EmployeeId);
         txtFirstName.Text    = person.FirstName;
         txtFamily.Text       = person.LastName;
         txtFname.Text        = person.FatherName;
         txtBDate.Text        = person.BirthDate.ToString(CultureInfo.InvariantCulture);
         txtEmail.Text        = person.Email;
         txtTell.Text         = person.Tell;
         txtMobile.Text       = person.Mobile;
         txtAddress.Text      = person.Address;
         txtNationalCode.Text = person.NationalCode;
         txtComment.Text      = person.Comment;
         personPhoto.Image    = UtilityClass.ByteArrayToImage(person.Photo);
     }
 }