コード例 #1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            Cursor oldCrs = this.Cursor;

            this.Cursor = Cursors.WaitCursor;

            try
            {
                SAL.Factory.IWrapperAccountSettings accSettingsFactory = SAL.Factory.AbstractFactory.Instance.GetWrapperAccountSettings();

                SAL.DataContainers.AccountId id = new SAL.DataContainers.AccountId();

                accSettingsFactory.SetAccountBuyingPower(id, Convert.ToDecimal(textBoxBuyingPower.Text));
            }
            finally
            {
                this.Cursor = oldCrs;
            }
        }
コード例 #2
0
        private void buttonRetrieve_Click(object sender, EventArgs e)
        {
            Cursor oldCrs = this.Cursor;

            this.Cursor = Cursors.WaitCursor;

            try
            {
                SAL.Factory.IWrapperAccountSettings accSettingsFactory = SAL.Factory.AbstractFactory.Instance.GetWrapperAccountSettings();

                SAL.DataContainers.AccountId id = new SAL.DataContainers.AccountId();

                SAL.DataContainers.AccountSettings accSettings = accSettingsFactory.GetAccountSettings(id);

                textBoxName.Text        = accSettings.Name;
                textBoxAddress.Text     = accSettings.Address;
                textBoxBuyingPower.Text = accSettings.BuyingPower.ToString("#,##0.00");
            }
            finally
            {
                this.Cursor = oldCrs;
            }
        }