public frmCustomer(Customer Customer) { InitializeComponent(); customer = Customer; if (customer != null) izmjena = true; GetCustomerInfo(); }
private void GetCustomerByGuid(Guid id) { using (var context = new CustomerRepository()) { var user = context.Context.Customer.Find(id); customer = user; } }
private void FillCustomerObject() { customer = new Customer(); customer.Name = cboName.Text; customer.Age = DateTime.Now.Year - dtpBirthdayDate.Value.Year; customer.BirthdayDate = DateTime.Parse(dtpBirthdayDate.Text); customer.ContactPerson = txtContactPerson.Text; customer.PhoneNumber = txtPhone.Text; customer.Note = txtNote.Text; }