Example #1
0
 public JsonResult FindInvestorDetail(int id)
 {
     EditModel model = null;
     if (id > 0) {
         model = InvestorRepository.FindInvestorDetail(id);
     }
     else {
         model = new EditModel();
         model.AddressInformations = new List<AddressInformation>();
         model.AccountInformations = new List<AccountInformation>();
         model.ContactInformations = new List<ContactInformation>();
         List<AddressInformation> addresses = (List<AddressInformation>)model.AddressInformations;
         addresses.Add(new AddressInformation { });
         List<AccountInformation> accounts = (List<AccountInformation>)model.AccountInformations;
         accounts.Add(new AccountInformation { });
         List<ContactInformation> contacts = (List<ContactInformation>)model.ContactInformations;
         contacts.Add(new ContactInformation { });
     }
     if (model != null) {
         InvestorInformation investorInformation = (InvestorInformation)model;
         LoadCustomFieldValues(ref investorInformation);
     }
     return Json(model, JsonRequestBehavior.AllowGet);
 }
Example #2
0
 public ActionResult Edit(int? id)
 {
     EditModel model = new EditModel();
     ViewData["MenuName"] = "InvestorManagement";
     ViewData["SubmenuName"] = "UpdateInvestorInformation";
     ViewData["PageName"] = "UpdateInvestorInformation";
     if ((id ?? 0) == 0) {
         model.id = InvestorRepository.FindLastInvestorId();
     }
     else {
         model.id = id ?? 0;
     }
     model.InvestorId = model.id;
     model.DomesticForeigns = SelectListFactory.GetDomesticForeignList();
     model.InvestorEntityTypes = SelectListFactory.GetInvestorEntityTypesSelectList(AdminRepository.GetAllInvestorEntityTypes());
     model.Sources = SelectListFactory.GetSourceList();
     model.ContactInformations = new List<ContactInformation>();
     model.AccountInformations = new List<AccountInformation>();
     model.CustomField = new CustomFieldModel();
     model.CustomField.Fields = AdminRepository.GetAllCustomFields((int)DeepBlue.Models.Admin.Enums.Module.Investor);
     model.CustomField.Values = new List<CustomFieldValueDetail>();
     model.CustomField.InitializeDatePicker = false;
     return View(model);
 }