本文整理汇总了C#中OpenCBS.CoreDomain.Contracts.Savings.SavingBookContract.GenerateSavingCode方法的典型用法代码示例。如果您正苦于以下问题:C# SavingBookContract.GenerateSavingCode方法的具体用法?C# SavingBookContract.GenerateSavingCode怎么用?C# SavingBookContract.GenerateSavingCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenCBS.CoreDomain.Contracts.Savings.SavingBookContract
的用法示例。
在下文中一共展示了SavingBookContract.GenerateSavingCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeTabPageSavingDetails
private void InitializeTabPageSavingDetails(ISavingProduct product)
{
try
{
Text = _title;
_savingsBookProduct = (SavingsBookProduct)product;
DisplaySavingProduct(product);
tabControlSavingsDetails.TabPages.Clear();
tabControlSavingsDetails.TabPages.Add(tabPageSavingsAmountsAndFees);
tabControlSavingsDetails.TabPages.Add(tabPageSavingsEvents);
tabControlSavingsDetails.TabPages.Add(tabPageLoans); ;
_saving =
new SavingBookContract(ServicesProvider.GetInstance().GetGeneralSettings(),
User.CurrentUser,
(SavingsBookProduct)product);
if (((SavingsBookProduct)product).UseTermDeposit) tabControlSavingsDetails.TabPages.Add(tpTermDeposit);
groupBoxSaving.Text = string.Format("{0}",
MultiLanguageStrings.GetString(Ressource.ClientForm, "SavingsBook.Text"));
groupBoxSaving.ForeColor = Color.FromArgb(0, 88, 56);
tabControlPerson.TabPages.Remove(tabPageSavingDetails);
tabControlPerson.TabPages.Add(tabPageSavingDetails);
tabControlPerson.SelectedTab = tabPageSavingDetails;
InitializeSavingsGeneralControls();
InitializeTabPageTermDeposit();
InitializeSavingsFees();
btSavingsUpdate.Visible = false;
groupBoxSaving.Enabled = true;
pnlSavingsButtons.Enabled = false;
groupBoxSaving.Name += string.Format(" {0}", product.Name);
int numbersOfSavings = SavingServices.GetSavingCount(_client);
_saving.GenerateSavingCode(_client, numbersOfSavings, ServicesProvider.GetInstance().GetGeneralSettings().SavingsCodeTemplate,
ServicesProvider.GetInstance().GetGeneralSettings().ImfCode, _client.Branch.Code);
int nextSavingsId = SavingServices.GetLastSavingsId() + 1;
tBSavingCode.Text = _saving.Code + '/' + nextSavingsId.ToString();
InitializeSavingsOfficersComboBox();
DisplaySavingEvent(_saving);
DisplaySavingLoans(_saving);
//InitializeCustomizableFields(OCustomizableFieldEntities.Savings, null, false);
LoadSavingsExtensions();
}
catch (Exception ex)
{
new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog();
}
}
示例2: Get_Set_Code_ForPerson
public void Get_Set_Code_ForPerson()
{
SavingBookContract saving = new SavingBookContract(ApplicationSettings.GetInstance(""),
new User(),
new DateTime(2007, 08, 11), null)
{Code = "", Product = new SavingsBookProduct() {Id = 2, Code = "SavingProduct"}};
saving.FirstDeposit(12m, new DateTime(2007, 08, 11), 0, new User(), Teller.CurrentTeller);
saving.GenerateSavingCode(new Person { Id = 2, FirstName="Vincent", LastName = "Guigui" }, 3, "BC/YY/PC-PS/CN-ID", "BC");
Assert.AreEqual("S/BC/2007/SAVIN-4/GUIG-2", saving.Code);
saving.GenerateSavingCode(new Person { Id = 2, FirstName = "Vincent", LastName = "Guigui" }, 4, "IC/BC/CS/ID", "BC");
Assert.AreEqual("BC/05/00002", saving.Code);
}