public IActionResult Edit_OgranzitionService([FromBody] OgranzitionService _OgranzitionService, string id)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid model object"));
     }
     try
     {
         return(Ok(OgranzitionServiceRepos.Edit_OgranzitionService(id, _OgranzitionService)));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
Exemple #2
0
        public bool Edit_OgranzitionService(string id, OgranzitionService _OgranzitionService)
        {
            var findId_OgranzitionService = _context.OgranzitionService.Find(id);

            if (findId_OgranzitionService != null)
            {
                findId_OgranzitionService.LicenseAvailable = _OgranzitionService.LicenseAvailable;
                findId_OgranzitionService.LincenseAmount   = _OgranzitionService.LincenseAmount;
                _context.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #3
0
 public bool Create_OgranzitionService(OgranzitionService _OgranzitionService)
 {
     return(Genaral_Add_Edit_Remove <OgranzitionService> .Add_ObjInDatabase(_OgranzitionService, _context));
 }