public Models.Customer.getComponents setComponents(BusinessObjects.CustomerRecord custRecord) { allComponents = service.getAllComponents(custRecord); Mapper.CreateMap <BusinessObjects.Gender, Models.Customer.Gender>(); Mapper.CreateMap <BusinessObjects.Citizenship, Models.Customer.Citizenship>(); Mapper.CreateMap <BusinessObjects.District, Models.Customer.District>(); Mapper.CreateMap <BusinessObjects.Organization, Models.Customer.Organization>(); Mapper.CreateMap <BusinessObjects.ApplicationType, Models.Customer.ApplicationType>(); Mapper.CreateMap <BusinessObjects.BorrowerType, Models.Customer.BorrowerType>(); Mapper.CreateMap <BusinessObjects.LeadSource, Models.Customer.LeadSource>(); Mapper.CreateMap <BusinessObjects.CivilStatus, Models.Customer.CivilStatus>(); Mapper.CreateMap <BusinessObjects.City, Models.Customer.City>(); Mapper.CreateMap <BusinessObjects.Province, Models.Customer.Province>(); Mapper.CreateMap <BusinessObjects.HomeOwnership, Models.Customer.HomeOwnership>(); Mapper.CreateMap <BusinessObjects.BusinessType, Models.Customer.BusinessType>(); Mapper.CreateMap <BusinessObjects.NatureofBusiness, Models.Customer.NatureofBusiness>(); Mapper.CreateMap <BusinessObjects.AddressType, Models.Customer.AddressType>(); Mapper.CreateMap <BusinessObjects.RelationshipType, Models.Customer.RelationshipType>(); Mapper.CreateMap <BusinessObjects.EducationType, Models.Customer.EducationType>(); Mapper.CreateMap <BusinessObjects.Agent, Models.Customer.Agent>(); Mapper.CreateMap <BusinessObjects.getComponents, Models.Customer.getComponents>(); Models.Customer.getComponents list = new Models.Customer.getComponents(); list = Mapper.Map <BusinessObjects.getComponents, Models.Customer.getComponents>(allComponents); return(list); }
public Models.Customer.CustomerRecord SetCustomerRecordModel(BusinessObjects.CustomerRecord custRecord) { Models.Customer.CustomerRecord retRecord = new Models.Customer.CustomerRecord(); Mapper.CreateMap <BusinessObjects.CustomerRecord, Models.Customer.CustomerRecord>(); retRecord = Mapper.Map <BusinessObjects.CustomerRecord, Models.Customer.CustomerRecord>(custRecord); return(retRecord); }
public ActionResult Add_CustomerRecord() { Models.Customer.CustomerModel custModel = new Models.Customer.CustomerModel(); BusinessObjects.CustomerRecord custRecord = new BusinessObjects.CustomerRecord(); Models.Customer.CustomerRecord CMcustRecord = new Models.Customer.CustomerRecord(); List <Models.Customer.CustomerAddress> LCustAddress = new List <Models.Customer.CustomerAddress>(); Models.Customer.CustomerAddress McustAddress = new Models.Customer.CustomerAddress(); LCustAddress.Add(McustAddress); custModel.custRecord = CMcustRecord; custModel.custAddress = LCustAddress; var PISID = System.Guid.NewGuid().ToString(); custModel.custRecord.ID = PISID; custModel.custAddress[0].ID = System.Guid.NewGuid().ToString(); custModel.custAddress[0].PISID = PISID; custModel.custAddress[0].AddressTypeID = "0"; custModel.allComponents = setComponents(custRecord); return(View(custModel)); }
public getComponents getAllComponents(BusinessObjects.CustomerRecord custRecord) { getComponents retComponent = new getComponents(); retComponent.Gender = getGender(); retComponent.Citizenship = getCitizenship(); retComponent.District = getDistrict(); retComponent.Organization = getOrganization(); retComponent.ApplicationType = getApplicationType(); retComponent.BorrowerType = getBorrowerType(); retComponent.LeadSource = getLeadSource(); retComponent.CivilStatus = getCivilStatus(); retComponent.City = getCity(custRecord.ID); retComponent.Province = getProvince(); retComponent.HomeOwnership = getHomeOwnership(); retComponent.BusinessType = getBusinessType(); retComponent.NatureofBusiness = getNatureofBusiness(); retComponent.AddressType = getAddressType(false); retComponent.RelationshipType = getRelationshipType(); retComponent.EducationType = getEducationType(); retComponent.Agent = getAgent(custRecord.ID); return(retComponent); }
public getComponents getAllComponents(BusinessObjects.CustomerRecord custRecord) { return(customer.getAllComponents(custRecord)); }