Exemple #1
0
        private void btnDeleteAddress_Click(object sender, RoutedEventArgs e)
        {
            if (dgCustomerAddress.SelectedItem == null)
            {
                MessageBox.Show("Lütfen Gridden silinecek adresi seçiniz."); return;
            }

            Types.Banking.CustomerAddressContract customerAddress = new Types.Banking.CustomerAddressContract();
            customerAddress = dgCustomerAddress.SelectedItem as Types.Banking.CustomerAddressContract;

            var connect = new Connector.Banking.GenericConnect <CustomerAddressResponse>();
            var request = new Types.Banking.CustomerAddressRequest();

            request.customerAddress = customerAddress;
            request.MethodName      = "DelCustomerAddress";

            var response = connect.Execute(request);

            if (response.IsSuccess == true)
            {
                MessageBox.Show("Adres silme işlemi başarı ile gerçekleştirildi.");
                this.Close();
                return;
            }
            else
            {
                MessageBox.Show("Adres ekleme işlemi başarısız oldu.");
                return;
            }
        }
Exemple #2
0
        //------------------------------------------------------------------------------------------------------------



        //Adres CRUD butonları
        private void btnAddAddress_Click(object sender, RoutedEventArgs e)
        {
            Types.Banking.CustomerAddressContract customerAddress = new Types.Banking.CustomerAddressContract();
            customerAddress.CustomerId = customerDetail.Id;
            CustomerAddressWindow.MainWindow addAddressWindow = new CustomerAddressWindow.MainWindow(customerAddress);
            addAddressWindow.Show();
        }
Exemple #3
0
        private void GetCustomerAddress(Types.Banking.CustomerAddressContract customerAddress)
        {
            customerAddresses = new List <Types.Banking.CustomerAddressContract>();
            var connect = new Connector.Banking.GenericConnect <CustomerAddressResponse>();
            var request = new Types.Banking.CustomerAddressRequest();

            request.customerAddress = customerAddress;
            request.MethodName      = "GetCustomerAddress";

            var response = connect.Execute(request);

            if (response.IsSuccess == true)
            {
                foreach (var item in response.customerAddresses)
                {
                    customerAddresses.Add(item);
                }
                dgCustomerAddress.ItemsSource = response.customerAddresses;
                dgCustomerAddress.Items.Refresh();
                return;
            }
            else
            {
                return;
            }
        }
 public MainWindow(Types.Banking.CustomerAddressContract customerAddress)
 {
     _customerAddress = customerAddress;
     InitializeComponent();
     if (_customerAddress.Id > 0)
     {
         txtAddressId.Text    = _customerAddress.Id.ToString();
         txtAddress.Text      = _customerAddress.Address;
         txtAddressTitle.Text = _customerAddress.Title;
     }
 }
Exemple #5
0
 private void btnUpdateAddress_Click(object sender, RoutedEventArgs e)
 {
     Types.Banking.CustomerAddressContract customerAddress = new Types.Banking.CustomerAddressContract();
     customerAddress.CustomerId = customerDetail.Id;
     if (dgCustomerAddress.SelectedItem == null)
     {
         MessageBox.Show("Lütfen Gridden güncellenecek adresi seçiniz."); return;
     }
     customerAddress = dgCustomerAddress.SelectedItem as Types.Banking.CustomerAddressContract;
     CustomerAddressWindow.MainWindow addAddressWindow = new CustomerAddressWindow.MainWindow(customerAddress);
     addAddressWindow.Show();
 }