예제 #1
0
 public ActionResult DeleteOffers(string _p)
 {
     if (!string.IsNullOrEmpty(_p))
     {
         ViewModel.OffersSetup.OffersSetup OffersSetup = new ViewModel.OffersSetup.OffersSetup();
         OffersSetup.DeleteOffer(_p);
     }
     return(RedirectToAction("OffersSetup"));
 }
예제 #2
0
        //#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));
        }
예제 #3
0
        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));
        }
예제 #4
0
 public ActionResult AddOrUpdate(OffersSetup offersSetup)
 {
     ViewModel.OffersSetup.OffersSetup _o = new ViewModel.OffersSetup.OffersSetup();
     _o.AddOffersSetup(offersSetup);
     return(RedirectToAction("OffersSetup"));
 }