public void InitializePersonForm(Person person, Project project)
 {
     ClientForm personForm = new ClientForm(person, this)
     {
         MdiParent = this,
         Text = string.Format(
                "{0} [{1}]",
                MultiLanguageStrings.GetString(Ressource.ClientForm, "Person.Text"),
                person.Name)
     };
     if (project != null)
         personForm.DisplayUserControl_ViewProject(project, null);
     personForm.Show();
 }
 public void InitializeSavingContractForm(IClient client, int savingId)
 {
     switch (client.Type)
     {
         case OClientTypes.Person:
             {
                 var personForm = new ClientForm((Person)client, this)
                 {
                     MdiParent = this,
                     Text = string.Format("{0} [{1}]", MultiLanguageStrings.GetString(
                     Ressource.ClientForm, "Person.Text"),
                     ((Person)client).Name)
                 };
                 personForm.DisplaySaving(savingId, client);
                 personForm.Show();
                 break;
             }
         case OClientTypes.Group:
             {
                 var personForm = new ClientForm((Group)client, this)
                 {
                     MdiParent = this,
                     Text = string.Format("{0} [{1}]", MultiLanguageStrings.GetString(Ressource.ClientForm, "Group.Text"), ((Group)client).Name)
                 };
                 personForm.DisplaySaving(savingId, client);
                 personForm.Show();
                 break;
             }
         case OClientTypes.Village:
             {
                 var frm = new NonSolidaryGroupForm((Village)client) { MdiParent = this };
                 frm.Show();
                 break;
             }
         case OClientTypes.Corporate:
             {
                 var corporateForm = new ClientForm((Corporate)client, this) { MdiParent = this };
                 corporateForm.DisplaySaving(savingId, client);
                 corporateForm.Show();
                 break;
             }
     }
 }
        public void InitializeCreditContractForm(IClient pClient, int pContractId)
        {
            /*
             * This code is for loading compulsory savings. Compulsory savings are being
             * loaded here because in LoanManager class SavingsManager trigers problems.
             * Ruslan Kazakov
             */

            if (pClient.Projects != null)
                foreach (Project project in pClient.Projects)
                    if (project.Credits != null)
                        foreach (Loan loan in project.Credits)
                            loan.CompulsorySavings = ServicesProvider.GetInstance().GetSavingServices().GetSavingForLoan(loan.Id, true);
            ClientForm personForm = new ClientForm(pClient, pContractId, this) { MdiParent = this };
            personForm.Show();
        }
 public void InitializePersonForm()
 {
     ClientForm personForm = new ClientForm(OClientTypes.Person, this, false) { MdiParent = this };
     personForm.Show();
 }
 public void InitializeCorporateForm()
 {
     ClientForm corporateForm = new ClientForm(OClientTypes.Corporate, this, false) { MdiParent = this };
     corporateForm.Show();
 }
        public void InitializeCorporateForm(Corporate corporate, Project project)
        {
            ClientForm corporateForm = new ClientForm(corporate, this) { MdiParent = this };
            if (project != null)
                corporateForm.DisplayUserControl_ViewProject(project, null);

            corporateForm.Show();
        }
Example #7
0
 private void OpenClientForm(OClientTypes clientType)
 {
     var parent = Application.OpenForms[0];
     var form = new ClientForm(clientType, parent, false) { MdiParent = parent };
     form.Show();
 }
Example #8
0
 public void InitializePersonForm()
 {
     ClientForm personForm = new ClientForm(OClientTypes.Person, this, false, _applicationController) { MdiParent = this };
     personForm.Show();
 }
Example #9
0
 public void InitializeGroupForm(Group group, Project project)
 {
     ClientForm personForm = new ClientForm(group, this, _applicationController)
     {
         MdiParent = this,
         Text =
             string.Format("{0} [{1}]", MultiLanguageStrings.GetString(Ressource.ClientForm, "Group.Text"),
                           group.Name)
     };
     if (project != null)
         personForm.DisplayUserControl_ViewProject(project, null);
     personForm.Show();
 }
Example #10
0
 public void InitializeCorporateForm()
 {
     ClientForm corporateForm = new ClientForm(OClientTypes.Corporate, this, false, _applicationController) { MdiParent = this };
     corporateForm.Show();
 }
 public void InitializePersonForm()
 {
     ClientForm personForm = new ClientForm(OClientTypes.Person, this, false, _extensionActivator) { MdiParent = this };
     personForm.Show();
 }