本文整理汇总了C#中Interface.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Interface.Save方法的具体用法?C# Interface.Save怎么用?C# Interface.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interface
的用法示例。
在下文中一共展示了Interface.Save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetBilling
/// <summary>
/// Save the billing plan for the current line item to records. TicketDetail Process
/// </summary>
/// <param name="lineItemPic">Current line item associated with interface</param>
/// <param name="currentInterface">Interface being updated.</param>
public static void SetBilling(LineItem lineItemPic, Interface currentInterface)
{
if (lineItemPic.ActionID == 3) // Deactivate
{
currentInterface.BillingPlanID = null;
currentInterface.AccountFund = null;
currentInterface.AccountCost = null;
currentInterface.AccountOrder = null;
currentInterface.AccountWBS = null;
currentInterface.AccountSIO = null;
currentInterface.AccountFundCenter = null;
currentInterface.AccountBusinessPartner = null;
currentInterface.InterfaceSpeedID = null;
}
else // Run switch case. Repair Line Items have no account changes
switch (lineItemPic.AccountTypeID) // Handle each account differently (based on business rules).
{
case 1: // Cost Center
{
currentInterface.AccountOrder = null;
currentInterface.AccountWBS = null;
currentInterface.AccountBusinessPartner = null;
currentInterface.AccountFundCenter = null;
//-- UPDATE --//
currentInterface.BillingPlanID = lineItemPic.BillingPlanID;
currentInterface.AccountFund = lineItemPic.AccountNumber1;
currentInterface.AccountCost = lineItemPic.AccountNumber2;
currentInterface.AccountSIO = lineItemPic.AccountNumber3;
break;
}
case 2: // Real Order
{
currentInterface.AccountCost = null;
currentInterface.AccountWBS = null;
currentInterface.AccountSIO = null;
currentInterface.AccountBusinessPartner = null;
//-- UPDATE --//
currentInterface.BillingPlanID = lineItemPic.BillingPlanID;
currentInterface.AccountFund = lineItemPic.AccountNumber1;
currentInterface.AccountOrder = lineItemPic.AccountNumber2;
break;
}
case 3: // WBS Element
{
currentInterface.AccountFund = null;
currentInterface.AccountCost = null;
currentInterface.AccountOrder = null;
currentInterface.AccountBusinessPartner = null;
currentInterface.AccountFund = null;
//-- UPDATE --//
currentInterface.BillingPlanID = lineItemPic.BillingPlanID;
currentInterface.AccountWBS = lineItemPic.AccountNumber1;
currentInterface.AccountSIO = lineItemPic.AccountNumber2;
break;
}
case 4: // Business Part Number
{
currentInterface.AccountFund = null;
currentInterface.AccountCost = null;
currentInterface.AccountOrder = null;
currentInterface.AccountWBS = null;
currentInterface.AccountSIO = null;
// -- UPDATE -- //
currentInterface.BillingPlanID = lineItemPic.BillingPlanID;
currentInterface.AccountBusinessPartner = lineItemPic.AccountNumber1;
break;
}
}
currentInterface.Save();
}
示例2: ManageAccounts
//-- Manage Account Information
protected void ManageAccounts(LineItem pic, Interface intrface)
{
//Each Account is Handeled Differently
switch (pic.AccountTypeID)
{
case 1: // Cost Center
{
intrface.AccountOrder = null;
intrface.AccountWBS = null;
intrface.AccountBusinessPartner = null;
intrface.AccountFundCenter = null;
//-- UPDATE --//
intrface.BillingPlanID = pic.BillingPlanID;
intrface.AccountFund = pic.AccountNumber1;
intrface.AccountCost = pic.AccountNumber2;
intrface.AccountSIO = pic.AccountNumber3;
break;
}
case 2: // Real Order
{
intrface.AccountCost = null;
intrface.AccountWBS = null;
intrface.AccountSIO = null;
intrface.AccountBusinessPartner = null;
//-- UPDATE --//
intrface.BillingPlanID = pic.BillingPlanID;
intrface.AccountFund = pic.AccountNumber1;
intrface.AccountOrder = pic.AccountNumber2;
break;
}
case 3: // WBS Element
{
intrface.AccountFund = null;
intrface.AccountCost = null;
intrface.AccountOrder = null;
intrface.AccountBusinessPartner = null;
intrface.AccountFund = null;
//-- UPDATE --//
intrface.BillingPlanID = pic.BillingPlanID;
intrface.AccountWBS = pic.AccountNumber1;
intrface.AccountSIO = pic.AccountNumber2;
break;
}
case 4: // Business Part Number
{
intrface.AccountFund = null;
intrface.AccountCost = null;
intrface.AccountOrder = null;
intrface.AccountWBS = null;
intrface.AccountSIO = null;
// -- UPDATE -- //
intrface.BillingPlanID = pic.BillingPlanID;
intrface.AccountBusinessPartner = pic.AccountNumber1;
break;
}
}
intrface.Save();
}