示例#1
0
        // GET: Companies/Create
        public ActionResult Create()
        {
            ViewBag.CompanyTypeId     = new SelectList(companyTypeService.GetAll(), "Id", "Name");
            ViewBag.DeliveryCountryId = new SelectList(countryService.GetAll(), "Id", "Name");
            ViewBag.DeliveryCityId    = new SelectList(cityService.GetAllByCountryId(Guid.NewGuid()), "Id", "Name");
            ViewBag.DeliveryRegionId  = new SelectList(regionService.GetAllByCityId(Guid.NewGuid()), "Id", "Name");

            ViewBag.InvoiceCountryId = new SelectList(countryService.GetAll(), "Id", "Name");
            ViewBag.InvoiceCityId    = new SelectList(cityService.GetAllByCountryId(Guid.NewGuid()), "Id", "Name");
            ViewBag.InvoiceRegionId  = new SelectList(regionService.GetAllByCityId(Guid.NewGuid()), "Id", "Name");
            ViewBag.MainCompanyId    = new SelectList(companyService.GetAll(), "Id", "Name");
            ViewBag.SectorId         = new SelectList(sectorService.GetAll(), "Id", "Name");
            return(View());
        }
 public IHttpActionResult Get()
 {
     return(Ok(content: _companyTypeService.GetAll()));
 }
示例#3
0
        // GET: CompanyTypes
        public ActionResult Index()
        {
            var companyTypes = Mapper.Map <IEnumerable <CompanyTypeViewModel> >(companyTypeService.GetAll());

            return(View(companyTypes));
        }