public async Task <Response <int> > AddProductionMilestoneDepartmentApproval(ProductionMilestoneDepartmentApproval productionmilestonedepartmentapproval)
        {
            try
            {
                await _context.ProductionMilestoneDepartmentApproval.AddAsync(productionmilestonedepartmentapproval);

                await _context.SaveChangesAsync();

                var model = productionmilestonedepartmentapproval.P_D_ID;

                return(new Response <int>()
                {
                    IsSuccess = true,
                    Model = model
                });
            }
            catch (Exception ex)
            {
                _log.Error(ex, _user.GetCurrentUser().User_Name);
                return(new Response <int>()
                {
                    IsSuccess = false,
                    Message = ex.Message
                });
            }
        }
 public async Task <ActionResult> AddProjectMilestone(ProductionMilestoneDepartmentApproval model)
 {
     if (ModelState.IsValid)
     {
         return(Ok(await _repository.AddProductionMilestoneDepartmentApproval(model)));
     }
     return(BadRequest());
 }
        public async Task <ActionResult> UpdateProjectMilestone([FromBody] ProductionMilestoneDepartmentApproval model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    await _repository.UpdateProductionMilestoneDepartmentApproval(model);

                    return(Ok());
                }
                catch (Exception ex)
                {
                    if (ex.GetType().FullName == "Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException")
                    {
                        return(NotFound());
                    }
                    return(BadRequest());
                }
            }
            return(BadRequest());
        }
 public Task <Response <bool> > UpdateProductionMilestoneDepartmentApproval(ProductionMilestoneDepartmentApproval productionmilestonedepartmentapproval)
 {
     throw new NotImplementedException();
 }