public ActionResult DeleteOffers(string _p) { if (!string.IsNullOrEmpty(_p)) { ViewModel.OffersSetup.OffersSetup OffersSetup = new ViewModel.OffersSetup.OffersSetup(); OffersSetup.DeleteOffer(_p); } return(RedirectToAction("OffersSetup")); }
//#region Existed Customers in partner center //public ActionResult Customers() //{ // ViewModel.PartnerRepository.Customers cus = new ViewModel.PartnerRepository.Customers(ApplicationDomain.Instance); // SeekBasedResourceCollection<Microsoft.Store.PartnerCenter.Models.Customers.Customer> obj = cus.GetCustomerList(); // return View(obj); //} //#endregion #region Show/Add/Edit Offers setup public async Task <ActionResult> OffersSetup() { ViewModel.OffersSetup.OffersSetup _o = new ViewModel.OffersSetup.OffersSetup(); List <Models.PartnerAndMicrosoftRepository> _pm = new List <Models.PartnerAndMicrosoftRepository>(); _pm = await _o.RecieveOffersDetail(); return(View(_pm)); }
public async Task <ActionResult> AddOrUpdate(string Offerid) { MicrosoftOffer microsoftOffers = await ApplicationDomain.Instance.OffersRepository.RetrieveMicrosoftOfferByIdAsync(Offerid).ConfigureAwait(false); OffersSetup offersSetup = new Models.OffersSetup(); ViewModel.OffersSetup.OffersSetup _o = new ViewModel.OffersSetup.OffersSetup(); offersSetup = _o.GetOfferByMicrosoftOfferId(Offerid); if (offersSetup.MicrosoftOfferId == null) { offersSetup.MicrosoftOfferId = Offerid; offersSetup.Title = microsoftOffers.Offer.Name; } Models.OffersSetupRepository rep = new OffersSetupRepository(); rep.MicrosoftOffer = microsoftOffers; rep.OffersSetup = offersSetup; return(View(rep)); }
public ActionResult AddOrUpdate(OffersSetup offersSetup) { ViewModel.OffersSetup.OffersSetup _o = new ViewModel.OffersSetup.OffersSetup(); _o.AddOffersSetup(offersSetup); return(RedirectToAction("OffersSetup")); }