Example #1
0
 public async Task <IActionResult> SetProductDetailOwner([FromBody] ProductDetailOwner obj)
 {
     if (ModelState.IsValid)
     {
         return(Ok(await _IProductService.SetProductDetailOwner(obj)));
     }
     else
     {
         return(UnprocessableEntity());
     }
 }
Example #2
0
        public async Task <int> SetProductDetailOwner(ProductDetailOwner pro)
        {
            try
            {
                var sp     = StringGenerator.GetProcedureParameter(pro, SPConstants.spSetProductDetailOwner);
                var result = await _connectContext.spSetProductDetailOwner
                             .FromSqlRaw(sp, pro.Action, pro.PRD_Id, pro.PRD_UID_UserId, pro.PRD_PRDG_Id, pro.PRD_GST, pro.PRD_Mrp, pro.PRD_Discount, pro.PRD_IsActive)
                             .ToListAsync();

                return(result.FirstOrDefault().Result);
            }
            catch (Exception ex)
            {
                _ILogger.Log(LogLevel.Critical, "Exception while calling SpRegistrationTeam ", ex);
                return(0);
            }
        }