コード例 #1
0
ファイル: Edit.ascx.cs プロジェクト: wncoder/core
        public override void LoadData()
        {
            var settings = new MyTestGatewaySettings();

            settings.Merge(HccApp.CurrentStore.Settings.GiftCardSettingsGet(GatewayId));

            txtUserName.Text = settings.UserName;
            txtPassword.Text = settings.Password;
        }
コード例 #2
0
ファイル: Edit.ascx.cs プロジェクト: wncoder/core
        public override void SaveData()
        {
            var settings = new MyTestGatewaySettings();

            settings.Merge(HccApp.CurrentStore.Settings.GiftCardSettingsGet(GatewayId));

            settings.UserName = txtUserName.Text.Trim();
            settings.Password = txtPassword.Text.Trim();

            HccApp.CurrentStore.Settings.GiftCardSettingsSet(GatewayId, settings);
            HccApp.AccountServices.Stores.Update(HccApp.CurrentStore);
        }
コード例 #3
0
        public MyTestGateway()
        {
            Settings  = new MyTestGatewaySettings();
            GiftCards = new List <GiftCardData>();

            var giftCard = new GiftCardData
            {
                Amount     = 100,
                CardNumber = "GIFTCARD-0001"
            };

            GiftCards.Add(giftCard);
        }