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


C# Clients.Group类代码示例

本文整理汇总了C#中OpenCBS.CoreDomain.Clients.Group的典型用法代码示例。如果您正苦于以下问题:C# Group类的具体用法?C# Group怎么用?C# Group使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Group类属于OpenCBS.CoreDomain.Clients命名空间,在下文中一共展示了Group类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoanSharesForm

 public LoanSharesForm(Loan pLoan, Group pGroup)
 {
     InitializeComponent();
     _loan = pLoan;
     _group = pGroup;
     _total = _loan.LoanShares.Sum(x => x.Amount.Value);
     
     InitializeControls();
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:9,代码来源:LoanSharesForm.cs

示例2: TestGetTotalLoanAmount

        public void TestGetTotalLoanAmount()
        {
            Group group = new Group();
            Person pers1 = new Person {Id = 1};
            Person pers2 = new Person {Id = 2};
            group.AddMember(new Member { Tiers = pers1, LoanShareAmount = 100, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = pers2, LoanShareAmount = 76.78m, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });

            Assert.AreEqual(176.78m,group.GetTotalLoanAmount.Value);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:10,代码来源:TestGroup.cs

示例3: Copy_MembersAreCopied

        public void Copy_MembersAreCopied()
        {
            Person person = new Person {Id = 1, Active = true, BadClient = true};
            Member member = new Member {Tiers = person, IsLeader = true, CurrentlyIn = true};
            Group group = new Group {Id = 3,BadClient = false, Active = true, Members = new List<Member> {member}};

            Group clonedGroup = (Group)group.Copy();
            Assert.AreEqual(3, clonedGroup.Id);

            clonedGroup.Id = 7;
            Assert.AreEqual(3,group.Id);

            Assert.AreEqual(true, clonedGroup.Members[0].Tiers.BadClient);
            clonedGroup.Members[0].Tiers.BadClient = false;
            Assert.AreEqual(true, group.Members[0].Tiers.BadClient);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:16,代码来源:TestGroup.cs

示例4: ResetAllComponents

 public void ResetAllComponents()
 {
     group = new Group();
     textBoxName.Text = string.Empty;
     dateTimePickerDateOfEstablishment.Value = TimeProvider.Today;
     listViewOtherMembres.Items.Clear();
     listViewHistoryMembers.Items.Clear();
     addressUserControlFirst.ResetAllComponents();
     addressUserControlSecondaryAddress.ResetAllComponents();
 }
开发者ID:evgeniyabdukarimov,项目名称:opencbs,代码行数:10,代码来源:GroupUserControl.cs

示例5: InitializeClient

        private void InitializeClient(IClient pClient, int pContractId)
        {
            if (pClient is Person)
            {
                _person = (Person)pClient;
                _client = _person;
                _oClientType = OClientTypes.Person;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(string.Format("{0} {1}", _person.FirstName, _person.LastName));
            }
            if (pClient is Group)
            {
                _group = (Group)pClient;
                _client = _group;
                _oClientType = OClientTypes.Group;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(_group.Name);
            }
            if (pClient is Corporate)
            {
                _corporate = (Corporate)pClient;
                _client = _corporate;
                _oClientType = OClientTypes.Corporate;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(_corporate.Name);
            }

            _project = pClient.SelectProject(pContractId);
            _credit = _project.SelectCredit(pContractId);
            _credit.LoanEntryFeesList = ServicesProvider.GetInstance().GetContractServices().GetInstalledLoanEntryFees(_credit);
            _product = _credit.Product;

            if (_product.CycleId != null && _credit.Disbursed == false)
            {
                ServicesProvider.GetInstance().GetProductServices().SetCyclesParamsForContract(_product, _credit, _client, false);
            }
            else
            {
                if (_credit.Product.Amount.HasValue == false)
                {
                    _amountValueRange = new DecimalValueRange(_credit.Product.AmountMin.Value, _credit.Product.AmountMax.Value);
                    nudLoanAmount.Minimum = _credit.Product.AmountMin.Value;
                    nudLoanAmount.Maximum = _credit.Product.AmountMax.Value;
                }
                else
                {
                    nudLoanAmount.Minimum = nudLoanAmount.Maximum = _credit.Product.Amount.Value;
                }
                if (_credit.Product.NbOfInstallments.HasValue == false)
                {
                    nudLoanNbOfInstallments.Minimum = _credit.Product.NbOfInstallmentsMin.Value;
                    nudLoanNbOfInstallments.Maximum = _credit.Product.NbOfInstallmentsMax.Value;
                }
                else
                {
                    nudLoanNbOfInstallments.Minimum = nudLoanNbOfInstallments.Maximum = _credit.Product.NbOfInstallments.Value;
                }
            }

            if (ServicesProvider.GetInstance().GetGeneralSettings().UseProjects)
            {
                tabControlPerson.TabPages.Add(tabPageProject);
                DisplaySelectedProject(_project);
            }
            else
            {
                AddProject(_project);
            }

            tabControlPerson.TabPages.Add(tabPageLoansDetails);
            tabControlPerson.TabPages.Add(tabPageAdvancedSettings);
            tabControlPerson.TabPages.Add(tabPageLoanGuarantees);

            _credit.LoanInitialOfficer = _credit.LoanOfficer;

            InitializeTabPageLoansDetails(_credit);

            tabControlPerson.TabPages.Add(tabPageCreditCommitee);
            if (_credit.Disbursed)
            {
                tabControlPerson.TabPages.Add(tabPageLoanRepayment);
                //tabControlPerson.TabPages.Add(tabPageLAC);
                tabControlPerson.SelectedTab = tabPageLoanRepayment;
                InitializeTabPageLoanRepayment(_credit);
            }
            else if (_credit.ContractStatus == OContractStatus.Validated && !_credit.Disbursed)
            {
                tabControlPerson.SelectedTab = tabPageLoansDetails;
            }
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:90,代码来源:ClientForm.cs

示例6: GroupUserControl_ButtonCancelClick

 private void GroupUserControl_ButtonCancelClick(object sender, EventArgs e)
 {
     _group = null;
     Close();
 }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:5,代码来源:ClientForm.cs

示例7: DisplayClient

        public void DisplayClient(IClient pClient, Project project)
        {
            if (pClient is Person)
            {
                _person = (Person)pClient;
                _oClientType = OClientTypes.Person;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(string.Format("{0} {1}", _person.FirstName, _person.LastName));
            }
            if (pClient is Group)
            {
                _group = (Group)pClient;
                _oClientType = OClientTypes.Group;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(_group.Name);
            }
            if (pClient is Corporate)
            {
                _corporate = (Corporate)pClient;
                _oClientType = OClientTypes.Corporate;
                InitializeUserControl(_oClientType, _mdiParent);
                InitializeTitle(_corporate.Name);
            }

            tabControlPerson.TabPages.Add(tabPageProject);
            DisplaySelectedProject(_project);
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:27,代码来源:ClientForm.cs

示例8: ClientForm

        public ClientForm(OClientTypes pClientType, Form pMdiParent, bool pCloseFormAfterSave)
            : this()
        {
            _listGuarantors = new List<Guarantor>();
            _collaterals = new List<ContractCollateral>();
            _loanShares = new List<LoanShare>();
            _closeFormAfterSave = pCloseFormAfterSave;
            _mdiParent = pMdiParent;
            InitializeComponent();
            InitControls();
            _oClientType = pClientType;

            if (pClientType == OClientTypes.Person) _person = new Person();
            else if (pClientType == OClientTypes.Group) _group = new Group();
            else _corporate = new Corporate();
            InitializeUserControl(pClientType, pMdiParent);
            InitializeTitle(null);
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:18,代码来源:ClientForm.cs

示例9: TestUpdateGroup

        public void TestUpdateGroup()
        {
            AddDataForTestingTransaction addDataForTesting = new AddDataForTestingTransaction();
            clientManagement = new ClientManager(DataUtil.TESTDB);
            clientServices = new ClientServices(clientManagement);

            DeleteAllData();

            Person leader = addDataForTesting.AddPerson();
            Person members = addDataForTesting.AddPersonBis();
            Person membersTer = addDataForTesting.AddPersonTer();
            Person membersQuater = addDataForTesting.AddPersonQuater();
            Group group = new Group
                              {
                                  Active = true,
                                  City = "Dushambe",
                                  District = leader.District,
                                  LoanCycle = 2,
                                  Name = "SCG",
                                  Leader =new Member{Tiers = leader,LoanShareAmount = 1000,CurrentlyIn = true,IsLeader = true,JoinedDate = TimeProvider.Today},
                                  Branch = _branch
                              };

            group.AddMember(new Member { Tiers = members, LoanShareAmount = 200, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersTer, LoanShareAmount = 400, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersQuater, LoanShareAmount = 700, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });

            Assert.AreEqual(String.Empty, clientServices.SaveSolidarityGroup(ref group));

            group.Name = "SCG2";
            Assert.AreEqual(String.Empty, clientServices.SaveSolidarityGroup(ref group));
        }
开发者ID:won21kr,项目名称:opencbs,代码行数:32,代码来源:TestClientServices.cs

示例10: TestSelectGroup

        public void TestSelectGroup()
        {
            Person leader = new Person
            {
                FirstName = "Nicolas",
                LastName = "MANGIN",
                Sex = 'M',
                IdentificationData = "12345",
                LoanCycle = 1,
                BadClient = false,
                Address = "NotSet",
                City = "NotSet",
                DateOfBirth = TimeProvider.Today,
                District = _district,
                Activity = _agriculture,
                Branch = _branch
            };
            leader.Id = _cltManagement.AddPerson(leader);

            Person member1 = new Person
            {
                FirstName = "Mariam",
                LastName = "MANGIN",
                Sex = 'M',
                IdentificationData = "123456",
                LoanCycle = 1,
                BadClient = false,
                Address = "NotSet",
                City = "NotSet",
                DateOfBirth = TimeProvider.Today,
                District = _district,
                Activity = _agriculture,
                Branch = _branch
            };
            member1.Id = _cltManagement.AddPerson(member1);

            Person member2 = new Person
            {
                FirstName = "Vincent",
                LastName = "MANGIN",
                Sex = 'M',
                IdentificationData = "1234567",
                LoanCycle = 1,
                BadClient = false,
                Address = "NotSet",
                City = "NotSet",
                DateOfBirth = TimeProvider.Today,
                District = _district,
                Activity = _agriculture,
                Branch = _branch
            };
            member2.Id = _cltManagement.AddPerson(member2);

            Person member3 = new Person
            {
                FirstName = "Rudy",
                LastName = "MANGIN",
                Sex = 'M',
                IdentificationData = "12345678",
                LoanCycle = 1,
                BadClient = false,
                Address = "NotSet",
                City = "NotSet",
                DateOfBirth = TimeProvider.Today,
                District = _district,
                Activity = _agriculture,
                Branch = _branch
            };
            member3.Id = _cltManagement.AddPerson(member3);

            Group grp = new Group
            {
                Leader = new Member { Tiers = leader, LoanShareAmount = 0, CurrentlyIn = true, IsLeader = true, JoinedDate = TimeProvider.Today },
                EstablishmentDate = TimeProvider.Today,
                Name = "GroupTest",
                Branch = _branch
            };

            grp.AddMember(new Member { Tiers = member1, LoanShareAmount = 100, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            grp.AddMember(new Member { Tiers = member2, LoanShareAmount = 100, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            grp.AddMember(new Member { Tiers = member3, LoanShareAmount = 100, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            grp.District = _district;
            grp.Address = "NotSet";
            grp.City = "NotSet";
            grp.Id = _cltManagement.AddNewGroup(grp);

            Group newGroup = _cltManagement.SelectGroupById(grp.Id);

            Assert.AreEqual("Nicolas MANGIN", newGroup.Leader.Tiers.Name);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:90,代码来源:TestClientManager.cs

示例11: TestSearchGroupsInDatabaseWithDistrictParameterSet

        public void TestSearchGroupsInDatabaseWithDistrictParameterSet()
        {
            Group group1 = new Group {Active = true, City = "Dushambe", District = _district, Name = "SCG1",Branch = _branch};
            _cltManagement.AddNewGroup(group1);

            Group group2 = new Group {Active = true, City = "Dushambe", District = _district, Name = "SCG2",Branch = _branch};
            _cltManagement.AddNewGroup(group2);

            List<ClientSearchResult> result = _cltManagement.SearchGroups(1, "Distr");
            Assert.AreEqual(2, result.Count);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:11,代码来源:TestClientManager.cs

示例12: TestSearchGroupsInDatabaseWithCityParameterSet

        public void TestSearchGroupsInDatabaseWithCityParameterSet()
        {
            Group group1 = new Group{Active = true,City = "Dushambe",District = _district,Name = "SCG1",LoanCycle = 1};
            _cltManagement.AddNewGroup(group1,null);

            Group group2 = new Group{Active = true,City = "Dushambe",District = _district,Name = "SCG2",LoanCycle = 2};
            _cltManagement.AddNewGroup(group2,null);

            List<ClientSearchResult> result = _cltManagement.SearchGroups(1, "Dushambe");
            Assert.AreEqual(2, result.Count);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:11,代码来源:TestClientManager.cs

示例13: TestGetNumberOfRecordsFoundForSearchGroupsWhenRecordsExist

        public void TestGetNumberOfRecordsFoundForSearchGroupsWhenRecordsExist()
        {
            _cltManagement.AddNewGroup(_group);

            Group group1 = new Group {Active = true, City = "Dushambe", District = _district, Name = "SCG1",Branch = _branch};
            _cltManagement.AddNewGroup(group1);

            Group group2 = new Group {Active = true, City = "Dushambe", District = _district, Name = "SCG2",Branch = _branch};
            _cltManagement.AddNewGroup(group2);
            List<ClientSearchResult> result = _cltManagement.SearchGroups(1, "SCG");
            Assert.AreEqual(3, result.Count);
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:12,代码来源:TestClientManager.cs

示例14: SetUp

        public void SetUp()
        {
            _DeleteDatas();
            _cltManagement = new ClientManager(DataUtil.TESTDB);
            _agriculture = _addDataForTesting.AddDomainOfApplicationAgriculture();
            _district = _addDataForTesting.AddDistrictIntoDatabase();
            _addDataForTesting.AddBranchIntoDatabase();

            _branch = new Branch {Id = 1, Name = "Default"};
            _person = new Person();
            _person.Active = true;
            _person.BadClient = false;
            _person.LoanCycle = 1;
            _person.City = "Dushambe";
            _person.District = _district;

            _person.FirstName = "Nicolas";
            _person.LastName = "BARON";
            _person.Sex = 'M';
            _person.IdentificationData = "123ARK3VC";
            _person.HouseHoldHead = true;
            _person.StudyLevel = "1";
            _person.SSNumber = "3333";
            _person.CAFNumber = "2424";
            _person.HousingSituation = "test";
            _person.UnemploymentMonths = 1;
            _person.Nationality = "France";
            _person.BirthPlace = "Nancy";
            _person.Email = "[email protected]";
            _person.SecondaryEmail = "[email protected]";
            _person.HomeType = "Maison";
            _person.ZipCode = "12345";
            _person.SecondaryZipCode = "123458";
            _person.SecondaryHomeType = "Maison";
            _person.Handicapped = true;
            _person.Status = OClientStatus.Inactive;
            _person.FollowUpComment = "Comment follow Up";
            _person.FirstContact = new DateTime(2009, 12, 25);
            _person.FirstAppointment = new DateTime(2010, 04, 01);
            _person.Sponsor1 = "coucou";
            _person.Sponsor1Comment = "coucou2";
            _person.Branch = _branch;

            _group = new Group();
            _group.Active = true;
            _group.BadClient = false;
            _group.City = "Dushambe";
            _group.LoanCycle = 2;
            _group.District = _district;
            _group.Name = "SCG";
            _group.ZipCode = "12345";
            _group.SecondaryZipCode = "123458";
            _group.Email = "[email protected]";
            _group.SecondaryEmail = "[email protected]";
            _group.HomeType = "Maison";
            _group.SecondaryHomeType = "Maison";
            _group.Status = OClientStatus.Active;
            _group.FollowUpComment = "Follow Up Comment Group";
            _group.Sponsor2 = "coucou";
            _group.Sponsor2Comment = "coucou2";
            _group.Branch = _branch;
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:62,代码来源:TestClientManager.cs

示例15: ShowPictureForm

 public ShowPictureForm(Group group, GroupUserControl groupUserControl, int photoSubId)
 {
     InitializeComponent();
     CaptionText = MultiLanguageStrings.GetString(Ressource.ClientForm, "Group.Text") + ": " + group.Name;
     this.groupUserControl = groupUserControl;
     this.group = group;
     this.photoSubId = photoSubId;
     addPhotoButton.Text = MultiLanguageStrings.GetString(Ressource.ShowPictureForm, "captionAdd.Text");
     changePhotoButton.Text = MultiLanguageStrings.GetString(Ressource.ShowPictureForm, "captionChange.Text");
     ShowPicture();
     InitializeButtons();
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:12,代码来源:ShowPictureForm.cs


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