public ActionResult Index() { brandService = new BrandService(); var model = brandService.GetAll().ToList(); return(View(model)); }
private void InitBag() { var brand = brandService.GetAll().Select(x => new SelectListItem() { Text = x.Brand_name.ToString(), Value = x.Brand_code.ToString() }).ToList(); brand.Insert(0, (new SelectListItem { Text = "ALL", Value = "" })); ViewBag.Brand_code = brand; var year = modelService.GetYear().Select(y => new SelectListItem() { Text = y.ToString(), Value = y.ToString() }).ToList(); year.Insert(0, (new SelectListItem { Text = "ALL", Value = "" })); ViewBag.Year = year; }
public ActionResult BrandList() { var Brandservice = new BrandService(); var brands = Brandservice.GetAll(); //brands = Brandservice.Find(f => f.Id == id); //var brnd = Brandservice.Remove(new Brand() { Id = id }); return(View(brands)); }
// GET: /Category/Details/5 public ActionResult GetAll() { List <Brand> category = service.GetAll(); if (category == null) { return(HttpNotFound()); } var result = AutoMapper.Mapper.Map <List <Brand>, List <BrandResponse> >(category); return(Json(result, JsonRequestBehavior.AllowGet)); }
private static void GetAllBrand(BrandService brandService) { Console.WriteLine("List of Brand"); var result = brandService.GetAll(); if (result.Success) { foreach (var brand in result.Data) { Console.WriteLine(brand.Name); } } }
public JsonResult BrandList() { return(this.Json( new { Result = (from obj in brandService.GetAll() select new { Id = obj.Id, Name = obj.Name, }) }, JsonRequestBehavior.AllowGet )); }
public ActionResult ProductAdd() { Product prod = new Product(); ViewBag.categoryservice = categoryservice.GetAll(); ViewBag.brandservice = brandservice.GetAll(); ViewBag.pictureservice = pictureservice.GetAll(); //var productservice = new ProductService(); //if (id != null) //{ // var urun = productservice.Find(x => x.Id == id).FirstOrDefault(); // ViewBag.categoryservice = categoryservice.GetAll(); // ViewBag.brandservice = brandservice.GetAll(); // ViewBag.pictureservice = pictureservice.GetAll(); // return View(urun); //} return(View(prod)); ////ViewBag.productservice = productservice.GetAll(); //ViewBag.categoryservice = categoryservice.GetAll(); //ViewBag.brandservice = brandservice.GetAll(); //return View(); }
public ActionResult SaveStockIn(string InvoiceNo, string Notes, List <StockIn> stockIns) { StockIn result = new StockIn(); var brands = _brandService.GetAll(); var sizes = _sizeService.GetAll(); var apis = _apiService.GetAll(); var stockOutInvoice = ""; foreach (var item in stockIns) { var brand = brands.Where(a => a.Id == item.BrandId).FirstOrDefault(); var size = sizes.Where(a => a.Id == item.SizeId).FirstOrDefault(); var api = apis.Where(a => a.Id == item.APIId).FirstOrDefault(); item.Notes = Notes; item.InvoiceNo = InvoiceNo; item.BrandName = brand.BrandName; item.APIName = item.APIName; item.SizeName = size.Name; item.CreatedDate = DateTime.Now; item.CreatedBy = CurrentSession.GetCurrentSession().UserName; if (!item.ProductionDate.HasValue) { item.ProductionDate = DateTime.Now; } item.StockInPrice = item.Rate * item.BaleQty; serviceStockIn.Save(item); stockOutInvoice = item.StockOutInvoiceNo; } //stocOut Invoice Update var stockOuts = stockOutService.GetStockChallan(stockOutInvoice); foreach (var item in stockOuts) { item.AlreadyProcessed = true; item.UpdatedDate = DateTime.Now; item.UpdatedBy = CurrentSession.GetCurrentSession().UserName; stockOutService.Update(item, item.Id); } return(Json(true, JsonRequestBehavior.AllowGet)); }
public ActionResult BrandAdd() { ViewBag.brandservice = brandservice.GetAll(); return(View()); }
public ActionResult <List <Brand> > GetAll() => _brandService.GetAll();
[Route("getBrands")] //api/customer/brand/getBrands public async Task <IActionResult> GetBrands() { return(Ok(await brandService.GetAll())); }
public IEnumerable <BrandDto> GetAll() { return(brandService.GetAll()); }
public ActionResult <List <Brand> > GetAll() { return(_brandsService.GetAll()); }
public IEnumerable<Brand> GetBrand() { Guid activeId = new Guid("87577063-322E-4901-98D2-FF519341D992"); return brandService.GetAll().Result.Where(m => m.StatusId == activeId); }
// GET: Sales public ActionResult Index() { ViewBag.Brand = brandService.GetAll(); ViewBag.Customer = customerService.GetAll(); return(View()); }
public ActionResult Index() { return(View(bs.GetAll())); }
public IActionResult GetAll() { return(Ok(_service.GetAll())); }
public ActionResult Add() { var brand = brandService.GetAll(); return(View(brand)); }