public Models.MaintenanceAgentProfile.AgentProfile setAgentProfile(BusinessObjects.AgentProfile AgentProfile)
 {
     Models.MaintenanceAgentProfile.AgentProfile retAgentProfile = new Models.MaintenanceAgentProfile.AgentProfile();
     Mapper.CreateMap <BusinessObjects.AgentProfile, Models.MaintenanceAgentProfile.AgentProfile>();
     retAgentProfile = Mapper.Map <BusinessObjects.AgentProfile, Models.MaintenanceAgentProfile.AgentProfile>(AgentProfile);
     return(retAgentProfile);
 }
        public ActionResult Add_AgentProfile(string Code)
        {
            Models.MaintenanceAgentProfile.AgentModel          AgentModel    = new Models.MaintenanceAgentProfile.AgentModel();
            Models.MaintenanceAgentProfile.AgentProfile        AgentProfile  = new Models.MaintenanceAgentProfile.AgentProfile();
            List <Models.MaintenanceAgentProfile.AgentAddress> LAgentAddress = new List <Models.MaintenanceAgentProfile.AgentAddress>();

            Models.MaintenanceAgentProfile.AgentAddress AgentAddress = new Models.MaintenanceAgentProfile.AgentAddress();
            LAgentAddress.Add(AgentAddress);
            AgentModel.AgentProfile = AgentProfile;
            AgentModel.AgentAddress = LAgentAddress;
            var ID = System.Guid.NewGuid().ToString();

            AgentModel.AgentProfile.ID                = ID;
            AgentModel.AgentAddress[0].ID             = System.Guid.NewGuid().ToString();
            AgentModel.AgentAddress[0].AgentProfileID = ID;
            AgentModel.AgentAddress[0].AddressTypeID  = "0";
            AgentModel.Gender        = setGender(customerSvc.getGender());
            AgentModel.CivilStatus   = setCivilStatus(customerSvc.getCivilStatus());
            AgentModel.District      = setDistrict(customerSvc.getDistrict());
            AgentModel.Organization  = setOrganization(customerSvc.getOrganization());
            AgentModel.Province      = setProvince(customerSvc.getProvince());
            AgentModel.City          = setCity(service.getCity(ID));
            AgentModel.AgentType     = setAgentType(service.getAgentType());
            AgentModel.HomeOwnership = setHomeOwnership(customerSvc.getHomeOwnership());
            AgentModel.WithCashCard  = setWithCashCard();
            return(View(AgentModel));
        }
        public ActionResult Index(string ID)
        {
            if (ID == null)
            {
                ID = "";
            }
            string Code;

            Code = service.getAgentCodebyID(ID);
            LMS.Models.MaintenanceAgentProfile.AgentProfile AgentProfile = new Models.MaintenanceAgentProfile.AgentProfile();
            if (Code == null)
            {
                Code = "";
            }
            AgentProfile.AGENTCode = Code;
            return(View(AgentProfile));
        }