public bool EditBudgetData(VenBudget bd) { VenBudget bData = _db.venBudgets.FirstOrDefault(a => a.vendor_id == bd.vendor_id && a.catt_id == bd.catt_id); bData.catt_id = bd.catt_id; bData.Cat_budget = bd.Cat_budget; bData.vendor_id = bd.vendor_id; _db.SaveChanges(); return(true); }
public ActionResult addInVendor([FromBody] VenBudget vendor) { bool result = _WorksRepo.addInVendor(vendor); if (result) { return(Ok(new { msg = "Added" })); } else { return(BadRequest(new { msg = "not added" })); } }
public ActionResult EditBudgetData([FromBody] VenBudget bd) { bool result = _WorksRepo.EditBudgetData(bd); if (result) { return(Ok(bd)); } else { return(BadRequest(new { msg = "not modified" })); } }
public bool addInVendor(VenBudget vendor) { _db.venBudgets.Add(vendor); _db.SaveChanges(); return(true); }
public VenBudget Getbudget(string id, int id1) { VenBudget bd = _db.venBudgets.FirstOrDefault(a => a.catt_id == id1 && a.vendor_id == id); return(bd); }