本文整理汇总了C#中IAccount.Save方法的典型用法代码示例。如果您正苦于以下问题:C# IAccount.Save方法的具体用法?C# IAccount.Save怎么用?C# IAccount.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAccount
的用法示例。
在下文中一共展示了IAccount.Save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TAC_PostSaveContactAccountStep
public static void TAC_PostSaveContactAccountStep(IContact contact, IAccount account, ref String result)
{
// TODO: Complete business rule implementation
// Get Current User
Sage.SalesLogix.Security.SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();
Sage.Entity.Interfaces.IUser user = usersvc.GetUser();
contact.AccountManager = user;
//usrContactManager.LookupResultValue = user;
// Set the Default Admin User
Sage.Entity.Interfaces.IUser AdminUser = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IUser>("ADMIN");
contact.Account.AccountManager = AdminUser;
//usrAccountManager.LookupResultValue = AdminUser;
account.Save();
contact.Save();
result = contact.Id.ToString();
}
示例2: CFXConvertLeadToAccount
// Example of target method signature
public static void CFXConvertLeadToAccount(ILead lead, IAccount account)
{
try
{
account.CfxClientBusra = lead.CfxClientBusra;
account.Cfxindustryra = lead.Cfxindustryra;
account.CfxProductra = lead.CfxProductra;
account.CfxPaymentra = lead.CfxPaymentra;
account.CfxLocationra = lead.CfxLocationra;
account.Cfxotherra = lead.Cfxotherra;
account.CfxPoliticallyExposedra = lead.CfxPoliticallyExposedra;
account.CfxPoliticalExp = lead.CfxPoliticalExp;
// account.CfxAuthTrader = lead.CfxAuthTrader; // Moved to Contact
// account.CfxBenOwner = lead.CfxBenOwner; // Moved to Contact
// account.CfxPercentOwned = lead.CfxPercentOwned; //Moved to Contact
//account.CfxIDType = lead.CfxIDType; // Moved to Contact
//account.CfxIDNumber = lead.CfxIDNumber; // Moved to Contact
account.CfxFINTRACAddress1 = lead.CfxFINTRACAddress1;
account.CfxFINTRACAddress2 = lead.CfxFINTRACAddress2;
account.CfxFINTRACAddress3 = lead.CfxFINTRACAddress3;
account.CfxFINTRACCity = lead.CfxFINTRACCity;
account.CfxFINTRACState = lead.CfxFINTRACState;
account.CfxFINTRACPostalCode = lead.CfxFINTRACPostalCode;
account.CfxFINTRACCountry = lead.CfxFINTRACCountry;
account.Type = "Prospect";
//Get Current user
Sage.SalesLogix.Security.SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();
Sage.Entity.Interfaces.IUser currentuser = usersvc.GetUser();
account.AccountManager = currentuser;
account.BDManager = lead.BDAccountManager;
account.MarketerManager = lead.AccountManager;
account.Cfxvolume = lead.CfxVolumne;
account.Cfxfrequency = lead.CfxFrequency;
account.CfxBuy = lead.CFXBuy;
account.CfxSell = lead.CfxSell;
account.CFXLeadSource = "Marketing";
//========================================
// CFX Details
//========================================
account.Cfxcompetitor = lead.CfxCompetitor;
account.Cfxrevenuegrowth = lead.CfxRevenueGrowth;
account.Cfxreceivesmarketwatch = lead.CfxReceivesMarketWatch;
account.Cfxclientpayscalforex = lead.CfxClientpaysCalforex;
account.Cfxcalforexpaysclient = lead.CfxCalforexpaysClient;
account.Cfxincomegrowth = lead.CfxIncomeGrowth;
account.Cfxfiscalyearend = lead.CfxFiscalYearEnd;
account.Cfxlineofbusiness = lead.CfxLineOfBusiness;
account.Cfxpackagesent = lead.CfxPackageSent;
account.CfxbookingreqNotes = lead.CfxBookingReqNotes;
account.CfxLeadscore = lead.CfxLeadScore;
account.CfxLeadqualitycode = lead.CfxLeadQualityCode;
account.Cfxmarketvaluemillion = lead.CfxMarketValueMillion;
account.Cfxprimaryindustry = lead.CfxPrimaryIndustry;
account.Cfxrevenuemillion = lead.CfxRevenuemillion;
account.CfxedgedemologinId = lead.CfxEDGEDemoLoginId;
account.Cfxedgedemo = lead.CfxEDGEDemo;
account.CfxedgedemoexpiryDate = lead.CfxEdgeDemoExpiryDate;
account.CfxtransactioncurrencyIdname = lead.CfxTransactionCurrencyIdName;
account.Cfxnetincomemillion = lead.CfxNetIncomemillion;
account.CfxPreferedRate = lead.CfxPreferedRate;
account.Cfxhooverslinkedtohoovers = lead.Cfxhooverslinkedtohoovers;
account.CfxhooverscompanyId = lead.Cfxhooverscompanyid;
account.CfxhoovershooversupDatesche = lead.Cfxhoovershooversupdatesche;
//===================================
// forecast
//===================================
account.CfxForecastEstimatedClose = lead.Cfxforecastestimatedclose;
account.CfxForecastVolume = lead.Cfxforecastvolume;
account.CfxForecastNoDate = lead.CfxforecastnoDate;
account.Save();
}
catch (Exception)
{
}
//==================================================
// Add All Required Documents
//==================================================
String CFXREQUIREDDOCUMENTID = String.Empty;
// get the DataService to get a connection string to the database
Sage.Platform.Data.IDataService datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>();
using (System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(datasvc.GetConnectionString()))
{
conn.Open();
using (System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("Select * from CFXREQUIREDDOCUMENT", conn))
{
OleDbDataReader reader = cmd.ExecuteReader();
//loop through the reader
while (reader.Read())
{
CFXREQUIREDDOCUMENTID = reader["CFXREQUIREDDOCUMENTID"].ToString();
// Create History Record
//.........这里部分代码省略.........