コード例 #1
0
        public static Collateral HandleCreate(Asset asset, PartyRole customerPartyRole)
        {
            //throw new NotImplementedException();
            var machine = new MachineCollateral();
            Machine ma = asset.Machine;
            machine.MachineName = ma.MachineName;
            machine.Brand = ma.Brand;
            machine.Model = ma.Model;
            machine.Capacity = ma.Capacity;
            machine.AcquisitionCost = asset.AcquisitionCost ?? 0;

            return machine;
        }
コード例 #2
0
        public void Fill(MachineCollateral collateral)
        {
            this.txtCollateralDesc.Text = collateral.Description;

            this.chkIsMortgaged.Checked = collateral.IsPropertyMortgage;
            this.hiddenMortgageeId.Value = collateral.MortgageeId;
            this.txtMortgageeName.Text = collateral.Mortgagee;
            this.txtMortgageeName.AllowBlank = !this.chkIsMortgaged.Checked;
            this.nfAcquisitionCost.Number = (double)collateral.AcquisitionCost;
            this.txtMachineName.Text = collateral.MachineName;
            this.txtBrandName.Text = collateral.Brand;
            this.txtModel.Text = collateral.Model;
            this.txtCapacity.Text = collateral.Capacity;

            StorePropertyOwner.DataSource = collateral.AvailablePropertyOwners;
            StorePropertyOwner.DataBind();
        }