本文整理汇总了C#中PaymentType类的典型用法代码示例。如果您正苦于以下问题:C# PaymentType类的具体用法?C# PaymentType怎么用?C# PaymentType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PaymentType类属于命名空间,在下文中一共展示了PaymentType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Create
public OperationResult Create(PaymentType paymentType, long referenceUserId, decimal amount, string description)
{
try
{
using (YomContainer container = GetYomContainer())
{
Item item = container.Items.Add(new Item
{
Type = (short)paymentType,
UserId = UserService.UserGetCurrent().Id,
PayItem = new PayItem
{
Amount = amount,
ReferenceUser = referenceUserId,
Description = description,
}
});
container.SaveChanges();
}
return OperationResult.Success;
}
catch (Exception e)
{
return OperationResult.Error(e.Message);
}
}
开发者ID:mpodonyi,项目名称:Yom,代码行数:28,代码来源:PaymentService.cs
示例2: GetPaymentIcon
public static string GetPaymentIcon(PaymentType type, string iconName, string name)
{
string folderPath = FoldersHelper.GetPath(FolderType.PaymentLogo, string.Empty, false);
if (!string.IsNullOrWhiteSpace(iconName) && File.Exists(FoldersHelper.GetPathAbsolut(FolderType.PaymentLogo, iconName)))
{
return FoldersHelper.GetPath(FolderType.PaymentLogo, iconName, false);
}
if (name.Contains(Resources.Resource.Install_UserContols_PaymentView_CreditCard))
{
return folderPath + "plasticcard.gif";
}
if (name.Contains(Resources.Resource.Install_UserContols_PaymentView_ElectronMoney))
{
return folderPath + "emoney.gif";
}
if (name.Contains(Resources.Resource.Install_UserContols_PaymentView_Qiwi))
{
return folderPath + "qiwi.gif";
}
if (name.Contains(Resources.Resource.Install_UserContols_PaymentView_Euroset))
{
return folderPath + "euroset.gif";
}
return string.Format("{0}{1}_default.gif", folderPath, (int)type);
}
开发者ID:AzarinSergey,项目名称:learn,代码行数:27,代码来源:PaymentIcons.cs
示例3: GetPaymentTypeByPymnentTypeID
public static PaymentType GetPaymentTypeByPymnentTypeID(int PymnentTypeID)
{
PaymentType paymentType = new PaymentType();
SqlPaymentTypeProvider sqlPaymentTypeProvider = new SqlPaymentTypeProvider();
paymentType = sqlPaymentTypeProvider.GetPaymentTypeByPymnentTypeID(PymnentTypeID);
return paymentType;
}
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:PaymentTypeManager.cs
示例4: Init_IncomeNotEditing_PropertiesSetupCorrectly
public void Init_IncomeNotEditing_PropertiesSetupCorrectly(PaymentType type)
{
var accountRepoMock = new Mock<IAccountRepository>();
accountRepoMock.Setup(x => x.GetList(null)).Returns(new List<AccountViewModel>());
var paymentManager = new PaymentManager(new Mock<IPaymentRepository>().Object,
accountRepoMock.Object,
new Mock<IRecurringPaymentRepository>().Object,
new Mock<IDialogService>().Object);
var settingsManagerMock = new Mock<ISettingsManager>();
settingsManagerMock.SetupAllProperties();
var viewmodel = new ModifyPaymentViewModel(new Mock<IPaymentRepository>().Object,
accountRepoMock.Object,
new Mock<IDialogService>().Object,
paymentManager,
settingsManagerMock.Object,
new Mock<IMvxMessenger>().Object,
new Mock<IBackupManager>().Object);
viewmodel.Init(type);
//Execute and Assert
viewmodel.SelectedPayment.ShouldNotBeNull();
viewmodel.SelectedPayment.Type.ShouldBe(type);
viewmodel.SelectedPayment.IsTransfer.ShouldBeFalse();
viewmodel.SelectedPayment.IsRecurring.ShouldBeFalse();
}
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:29,代码来源:ModifyPaymentViewModelTest.cs
示例5: SagePayController
public SagePayController(IDomain domainService,
IECommerce ecommerceService,
IUser userService,
IWebContent webContentService)
: base(domainService, ecommerceService, userService, webContentService)
{
this.DomainService = domainService;
this.ECommerceService = ecommerceService;
this.UserService = userService;
switch (this.DomainService.GetSettingsValue(BL.SettingsKey.sagePayMode, this.DomainID).ToLowerInvariant())
{
case "test":
ServerMode = VspServerMode.Test;
break;
case "live":
ServerMode = VspServerMode.Live;
break;
default:
ServerMode = VspServerMode.Simulator;
break;
}
switch (this.DomainService.GetSettingsValue(BL.SettingsKey.sagePayMethod, this.DomainID).ToLowerInvariant())
{
case "direct":
PaymentType = PaymentType.Direct;
break;
default:
PaymentType = PaymentType.Server;
break;
}
}
开发者ID:nhtera,项目名称:CrowdCMS,代码行数:33,代码来源:SagePayController.cs
示例6: PayForTicket
public Payment PayForTicket(Guid orderID, Guid payingCustomerID, double amount, PaymentType methodOfPayment, Currencies? currency, string creditCard)
{
ITicketingServiceOneWay prox = null;
Guid callId = Guid.NewGuid();
try
{
// Find a proxy to the ticketing service (one way)
prox = TicketingServiceOneWayProxyFactory.GetProxy(false);
AutoResetEvent arrived = new AutoResetEvent(false);
// Create a ResultPackage with a wait handle to wait on until a response arrives (on another channel)
ResultPackage pack = new ResultPackage() { ResultArrived = arrived };
ResultsCache.Current.SetPackage(callId, pack);
// Call the ticketing service via MSMQ channel on another thread.
Action<ITicketingServiceOneWay> del = (p => p.PayForTicket(orderID, payingCustomerID, amount, methodOfPayment, currency, callId, creditCard));
del.BeginInvoke(prox, null, null);
//Wait until result arrives
arrived.WaitOne(timeout);
Payment result = (Payment)ResultsCache.Current.GetResult(callId);
ResultsCache.Current.ClearResult(callId);
return result;
}
catch (Exception ex)
{
LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.FailedToContactTicketing + " " + ex.Message);
throw new TicketingException(StringsResource.TicketingFailed + " " + ex.Message, ex);
}
finally
{
if ((prox != null) && ((prox as ICommunicationObject).State == CommunicationState.Opened))
(prox as ICommunicationObject).Close();
}
}
开发者ID:jonteho,项目名称:ticketing-office,代码行数:34,代码来源:TicketingBridgeService.svc.cs
示例7: PayForTicket
public void PayForTicket(Guid orderID, Guid payingCustomerID, double amount, PaymentType methodOfPayment, Currencies? currency, Guid callID, string creditCard)
{
try
{
callback_prox = CallBackChannelFactory.GetProxy(false);
Payment payment = null;
// Do the job and call back the ticketing bridge
payment = generalTicketing.PayForTicket(orderID, payingCustomerID, amount, methodOfPayment, currency, creditCard);
callback_prox.PaymentArrived(payment, callID);
}
catch (TicketingException tex)
{
LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.TicketingFailed + " " + tex.Message);
throw new TicketingException(StringsResource.TicketingFailed + " " + tex.Message, tex);
}
catch (Exception ex)
{
LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.FailedToContactTicketingBridge + " " + ex.Message);
throw new TicketingException(StringsResource.TicketingFailed + " " + ex.Message, ex);
}
finally
{
if ((callback_prox != null) && ((callback_prox as ICommunicationObject).State == CommunicationState.Opened))
(callback_prox as ICommunicationObject).Close();
}
}
开发者ID:jonteho,项目名称:ticketing-office,代码行数:29,代码来源:QueuedTicketingService.svc.cs
示例8: CreatePayment
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer,
IParty payee, PaymentType type, string sale, int booking)
{
//Calls the paymentCollection class for create
return paymentCollection.Create(dueDate, dueAmount, payer, payee, type,
sale, booking);
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:7,代码来源:paymentController.cs
示例9: PaymentInfo
// constructor
public PaymentInfo(string paymentId, PaymentType paymentType, DateTime startDate, DateTime endDate)
{
this.paymentId = paymentId;
this.paymentType = paymentType;
this.startDate = startDate;
this.endDate = endDate;
}
开发者ID:itayB,项目名称:FinancePlus,代码行数:8,代码来源:PaymentInfo.cs
示例10: GetRecurringFromPayment_Endless
public void GetRecurringFromPayment_Endless(PaymentRecurrence recurrence, PaymentType type)
{
var startDate = new DateTime(2015, 03, 12);
var enddate = Convert.ToDateTime("7.8.2016");
var payment = new PaymentViewModel
{
ChargedAccount = new AccountViewModel {Id = 3},
TargetAccount = new AccountViewModel {Id = 8},
Category = new CategoryViewModel {Id = 16},
Date = startDate,
Amount = 2135,
IsCleared = false,
Type = type,
IsRecurring = true
};
var recurring = RecurringPaymentHelper.GetRecurringFromPayment(payment, true,
recurrence, enddate);
recurring.ChargedAccount.Id.ShouldBe(3);
recurring.TargetAccount.Id.ShouldBe(8);
recurring.StartDate.ShouldBe(startDate);
recurring.EndDate.ShouldBe(enddate);
recurring.IsEndless.ShouldBe(true);
recurring.Amount.ShouldBe(payment.Amount);
recurring.Category.Id.ShouldBe(payment.Category.Id);
recurring.Type.ShouldBe(type);
recurring.Recurrence.ShouldBe(recurrence);
recurring.Note.ShouldBe(payment.Note);
}
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:31,代码来源:RecurringPaymentHelperTests.cs
示例11: GetPaymentId
private int GetPaymentId(PaymentType paymentType)
{
if (paymentType == PaymentType.GiftAid)
return TestContext.KnownGiftAidPaymentId;
return TestContext.KnownDonationPaymentId;
}
开发者ID:RJacksonm1,项目名称:JustGiving.Api.Sdk,代码行数:7,代码来源:PaymentsApiClientTests.cs
示例12: CreatePayment
public IPayment CreatePayment(DateTime dueDate, decimal dueAmount, IParty payer, IParty payee,
PaymentType type, string sale, int booking)
{
PaymentEntity entity = new PaymentEntity(dueDate, dueAmount, payer, payee, type, sale, booking);
payments.Add(entity);
return entity;
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:8,代码来源:DataAccessFacadeStub.cs
示例13: GetPaymentTypeString
/// <summary>
/// Gets the payment type string.
/// </summary>
/// <param name="paymentTypeID">The payment type ID.</param>
/// <returns></returns>
public static string GetPaymentTypeString(int paymentTypeID)
{
PaymentType pType = new PaymentType();
pType.LoadByPrimaryKey(paymentTypeID);
if (pType.RowCount > 0)
return pType.Name;
return null;
}
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:13,代码来源:PaymentType.cs
示例14: Payment
public Payment(Purchase parameter, PaymentType type)
{
this.purchase = parameter;
this.paymentDate = DateTime.Now;
this.amount = parameter.totalAmount;
this.status = PaymentStatus.Waiting;
this.type = type;
}
开发者ID:reisrf,项目名称:JuntosRepository,代码行数:8,代码来源:Payment.cs
示例15: PurchaseItemRequest
public PurchaseItemRequest(int itemId, int buyAmount, PaymentType paymentOption, int saveLocation, List<int> accessLocation, ConsumeUponPurchase consume = null)
{
ItemId = itemId;
BuyAmount = buyAmount;
PaymentOption = paymentOption;
SaveLocation = saveLocation;
Consume = consume;
}
开发者ID:SocialPlay,项目名称:KongregateAddon,代码行数:8,代码来源:PurchaseItemRequest.cs
示例16: AddPaymentRule
public void AddPaymentRule(ISupplier supplier, ICustomer customer, BookingType bookingType, decimal percentage,
int daysOffset, BaseDate baseDate, PaymentType paymentType)
{
Supplier supp = (Supplier)supplier;
Customer cust = (Customer)customer;
supp.AddPaymentRule(cust, bookingType, percentage, daysOffset, baseDate, paymentType);
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:8,代码来源:SupplierController.cs
示例17: CalcPoint
void CalcPoint(System.Data.DataRow rowData, decimal dSum, PaymentType pType)
{
//decimal dPointSum = 0,dInPointSum = 0,dOutPointSum=0,dPointSum_Set = 0;
//decimal dInPointSum_In = 0,dOutPointSum_In= 0;
//decimal dInPointSUm_Out = 0, dOutPointSum_Out = 0;
// <asp:ListItem Text="消费赠送" Value="1"></asp:ListItem>
//<asp:ListItem Text="充值赠送" Value="3"></asp:ListItem>
//<asp:ListItem Text="抵扣" Value="2"></asp:ListItem>
//<asp:ListItem Text="结算" Value="5"></asp:ListItem>
int isOwner = Utilities.ToInt(rowData[CompanyBLL.IS_OWNER]);
dPointSum += dSum;
if (pType == PaymentType.CompanyItem)
{
dItemSum += Math.Abs(dSum);
if (isOwner == 1)
dItemSum_Owner += Math.Abs(dSum);
else
dItemSum_Outer += Math.Abs(dSum);
}
if (pType == PaymentType.AdvsGive)
{
dAdsSum += Math.Abs(dSum);
if (isOwner == 1)
dAdsSum_Owner += Math.Abs(dSum);
else
dAdsSum_Outer += Math.Abs(dSum);
}
if (pType == PaymentType.ConsumeGive)
dOutPointSum_1 += Math.Abs(dSum);
else if (pType == PaymentType.PrepaidGive || pType == PaymentType.AdvsGive || pType == PaymentType.Reward)
dOutPointSum_3 += Math.Abs(dSum);
else if (pType == PaymentType.Mortgage || pType == PaymentType.CompanyItem)
dInPointSum += Math.Abs(dSum);
else if (pType == PaymentType.SetMethod)
dPointSum_Set += dSum;
if (isOwner == 1)
{
if (pType == PaymentType.ConsumeGive ||
pType == PaymentType.PrepaidGive ||
pType == PaymentType.AdvsGive || pType == PaymentType.Reward)
dOutPointSum_Owner += Math.Abs(dSum);
else if (pType == PaymentType.Mortgage || pType == PaymentType.CompanyItem)
dInPointSum_Owner += Math.Abs(dSum);
}
else
{
if (pType == PaymentType.ConsumeGive ||
pType == PaymentType.PrepaidGive ||
pType == PaymentType.AdvsGive || pType == PaymentType.Reward)
dOutPointSum_Outer += Math.Abs(dSum);
else if (pType == PaymentType.Mortgage || pType == PaymentType.CompanyItem)
dInPointSum_Outer += Math.Abs(dSum);
}
}
开发者ID:eleooo,项目名称:App,代码行数:56,代码来源:FinanceListPoint.aspx.cs
示例18: CreatePaymentRule
public IPaymentRule CreatePaymentRule(ISupplier supplierEntity, ICustomer customerEntity,
BookingType bookingType, decimal percentage, int daysOffset, BaseDate baseDate, PaymentType paymentType)
{
PaymentRuleEntity paymentRule = new PaymentRuleEntity(supplierEntity, customerEntity, bookingType,
percentage, daysOffset, baseDate, paymentType);
SupplierEntity supplier = (SupplierEntity)supplierEntity;
supplier.AddPaymentRule(paymentRule);
return paymentRule;
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:11,代码来源:DataAccessFacadeStub.cs
示例19: SetValidData
public void SetValidData()
{
dataAccessFacadeStub = new DataAccessFacadeStub();
validDueDate = new DateTime(2010, 10, 10);
validDueAmount = 1m;
validPayer = new Customer(CustomerType.Bureau, "", "Lonely Tree", dataAccessFacadeStub);
validPayee = new Supplier("Galasam", "", SupplierType.Cruise, dataAccessFacadeStub);
validType = PaymentType.Balance;
validSale = "VF Jan";
validBooking = 2;
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:11,代码来源:PaymentTest.cs
示例20: PaymentRuleEntity
internal PaymentRuleEntity(ISupplier supplierEntity, ICustomer customerEntity, BookingType bookingType,
decimal percentage, int daysOffset, BaseDate baseDate, PaymentType paymentType)
{
Supplier = supplierEntity;
Customer = customerEntity;
BookingType = bookingType;
Percentage = percentage;
DaysOffset = daysOffset;
BaseDate = baseDate;
PaymentType = paymentType;
}
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:11,代码来源:PaymentRuleEntity.cs
注:本文中的PaymentType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论