private void EditOffer() { offer = new Offer(txtOfferId.Text); this.offer.OfferName = txtOfferName.Text; this.offer.Description = txtOfferDescription.Text; this.offer.DiscountPercentage = Convert.ToDouble(txtDiscount.Text); this.offer.OfferGiven = Convert.ToDateTime(txtOfferGiven.Text); this.offer.OfferValid = Convert.ToDateTime(txtOfferValidity.Text); this.offer.ItemCode = comboBoxItemCode.Text; this.offer.CategoryID = comboBoxCategoryId.Text; this.offer.MemberTypeID = comboBoxMemberShipId.Text; if (offerService.Edit(this.offer) == 1) { this.refreshDelegate.Invoke(); MessageBox.Show("Record Updated Successfully!"); } }
public async Task Consume(ConsumeContext <ListingEditedMessage> context) { var message = context.Message; await offerService.Edit(message.ListingId, message.Title); }