/// <summary> /// The SaleRegistry Console Client Demonstrating the overall /// Workflow or Process of obtaining the ownership of the property. /// </summary> /// <param name="args"></param> static void Main(string[] args) { try { string assetId = UniqueIdHelper.GenerateId(); Payee payee = new Payee(); Supervisor supervisor = new Supervisor(assetId); PropertyBuyer propertyBuyer = new PropertyBuyer(); PropertySeller propertySeller = new PropertySeller(); System.Console.WriteLine("Initiating the " + "Sale Deed Application Process"); supervisor.InitApplication().Wait(); supervisor.StartTheReviewProcess().Wait(); supervisor.CompleteTheReviewProcess().Wait(); propertyBuyer.PayTransferFee(payee.GetPayee(), assetId).Wait(); supervisor.TransferOwnership(propertySeller.GetOwnerAddress(), propertyBuyer.GetBuyerAddress()).Wait(); System.Console.WriteLine("Completed executing the " + "Sale Deed Application Process"); } catch (Exception ex) { System.Console.WriteLine(ex.ToString()); } System.Console.ReadLine(); }
private async void btnTransferOwnership_Click(object sender, System.EventArgs e) { if (string.IsNullOrEmpty(txtSellerAddress.Text)) { MessageBox.Show("Please specify the Seller Address", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); txtSellerAddress.Focus(); return; } lblState.Text = "Please wait...."; propertySeller = new PropertySeller(txtSellerAddress.Text.Trim()); receiptResponse = await supervisor.TransferOwnership(propertySeller.GetOwnerAddress(), propertyBuyer.GetBuyerAddress()); if (receiptResponse != null && receiptResponse.success) { OutputResponseInformation(receiptResponse); btnTransferOwnership.Enabled = false; lblState.Text = TransferOwnershipComplete; } }