public bool Update(int?Id, SuppliersParam supplierParam) { var get = Get(Id); get.Update(supplierParam); var result = _context.SaveChanges(); if (result > 0) { status = true; } return(status); }
public bool Insert(SuppliersParam supplierParam) { var get = new Supplier(supplierParam); _context.Suppliers.Add(get); var result = _context.SaveChanges(); if (result > 0) { status = true; } return(status); }
// PUT: api/Suppliers/5 public void Put(int id, SuppliersParam supplierParam) { _supplierService.Update(id, supplierParam); }
// POST: api/Suppliers public void Post(SuppliersParam supplierParam) { _supplierService.Insert(supplierParam); }
public ActionResult Create(SuppliersParam suppliersParam) { return(Json(JsonRequestBehavior.AllowGet)); }
public virtual void Update(SuppliersParam suppliersParam) { this.Name = suppliersParam.Name; this.UpdateDate = DateTimeOffset.Now.LocalDateTime; }
public Supplier(SuppliersParam suppliersParam) { this.Name = suppliersParam.Name; this.CreateDate = DateTimeOffset.Now.LocalDateTime; }
public bool Update(int?Id, SuppliersParam supplierParam) { return(_supplierRepository.Update(Id, supplierParam)); }
public bool Insert(SuppliersParam supplierParam) { return(_supplierRepository.Insert(supplierParam)); }