當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。