当前位置: 首页>>代码示例>>C#>>正文


C# SavingBookContract.GenerateSavingCode方法代码示例

本文整理汇总了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();
            }
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:54,代码来源:ClientForm.cs

示例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);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:14,代码来源:TestSaving.cs


注:本文中的OpenCBS.CoreDomain.Contracts.Savings.SavingBookContract.GenerateSavingCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。