public bool AddOrderDetails(Shop_Product_Master model, string mobileNumber = "", int quantity = 0) { Shop_CartInfo objShop_CartInfo = new Shop_CartInfo(); objShop_CartInfo.ProductId = model.pkSkuId; objShop_CartInfo.RetailerMobileNumber = mobileNumber; objShop_CartInfo.Price = model.Price; if (quantity == 0) { objShop_CartInfo.Quantity = Convert.ToInt32(model.min_qty_to_book); } else { objShop_CartInfo.Quantity = quantity; } objShop_CartInfo.Price = model.Price; objShop_CartInfo.ShippingCharge = "Free"; objShop_CartInfo.Quantity = quantity; objShop_CartInfo.ProductGST = model.GSTPercent; objShop_CartInfo.TotalPrice = TotalPrice(objShop_CartInfo.Price, objShop_CartInfo.ProductGST, Convert.ToInt32(objShop_CartInfo.Quantity)).ToString(); objShop_CartInfo.ProductName = model.SkuName; objShop_CartInfo.ProductImageUrl = model.imageUrl; objShop_CartInfo.ProductDescription = model.Description; var addOrderDetails = objIProductRepository.AddOrderDetails(objShop_CartInfo); return(addOrderDetails); }
public bool AddOrderDetails(Shop_CartInfo model) { try { unitOfWork.Shop_CartInfoRepository.Insert(model); unitOfWork.SaveChanges(); return(true); } catch (Exception ex) { throw ex; } }
public bool UpdateCart(Shop_CartInfo model) { try { unitOfWork.Shop_CartInfoRepository.Update(model); unitOfWork.SaveChanges(); return(true); } catch (Exception) { throw; } }
public bool UpdateCart(Shop_CartInfo model) { var updateCart = objIProductRepository.UpdateCart(model); return(updateCart); }