예제 #1
0
 public string RegisterCustomer(ClientCustomerModel customermodel)
 {
     object[] results = this.Invoke("RegisterCustomer", new object[] {
         customermodel
     });
     return((string)(results[0]));
 }
예제 #2
0
 /// <remarks/>
 public void RegisterCustomerAsync(ClientCustomerModel customermodel, object userState)
 {
     if ((this.RegisterCustomerOperationCompleted == null))
     {
         this.RegisterCustomerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRegisterCustomerOperationCompleted);
     }
     this.InvokeAsync("RegisterCustomer", new object[] {
         customermodel
     }, this.RegisterCustomerOperationCompleted, userState);
 }
        private void btnRegister_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtAccountNumber.Text))
                {
                    MessageBox.Show("Kindly enter account number.", "EMV Instant Card Issuance", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    var accountnumber = txtAccountNumber.Text;
                    var userid        = Properties.Settings.Default.UserID;
                    var userbranch    = Properties.Settings.Default.UserBranch;
                    var cardprofileid = Convert.ToInt64(comboCardProfile.SelectedValue.ToString());

                    var client = new ClientAPI.ClientAPI();

                    var customerModel = new ClientAPI.ClientCustomerModel();
                    customerModel.AccountNumber  = accountnumber;
                    customerModel.CustomerBranch = userbranch;
                    customerModel.CardProfileID  = cardprofileid;
                    customerModel.Downloaded     = true;

                    var persoData = client.RegisterCustomer(customerModel);
                    if (!string.IsNullOrEmpty(persoData))
                    {
                        FileWriter.Write(persoData);
                        MessageBox.Show("Customer registration was successful.", "EMV Instant Card Issuance", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        txtAccountNumber.Text = "";
                    }
                    else
                    {
                        MessageBox.Show("Customer registration failed.", "EMV Instant Card Issuance", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "EMV Instant Card Issuance", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ErrorHandler.WriteError(ex);
            }
        }
예제 #4
0
 /// <remarks/>
 public void RegisterCustomerAsync(ClientCustomerModel customermodel)
 {
     this.RegisterCustomerAsync(customermodel, null);
 }