public JsonResult GetDialogProduct(string productId) { try { var identity = (LoginIdentity)Thread.CurrentPrincipal.Identity; return(Json(Mapper.Map <ProductStockViewModel>(_rawSqlService.GetProductDetailWithStock(identity.CompanyId, identity.BranchId, productId)))); } catch (Exception ex) { throw new Exception(ex.Message); } }