public ActionResult CreateCustomerAccount(int?Id) { ViewModel.Countries.Countries country = new ViewModel.Countries.Countries(); ViewBag.Countries = country.GetCountries(); if (Id != null) { ViewModel.ResellerRequest.NewRequest _VresellerRequest = new ViewModel.ResellerRequest.NewRequest(); return(View(_VresellerRequest.GetReseller(Id))); } return(View()); }
public async Task <ActionResult> CreateCustomerAccount(Models.Customers _resellerRequest) { //_resellerRequest.Id = 0; if (ModelState.IsValid) { //Session["_resellerRequest"] = _resellerRequest; //saved the new customer/Reseller ViewModel.ResellerRequest.NewRequest res = new ViewModel.ResellerRequest.NewRequest(); string MicrosoftCustomerId = await res.AcceptRequest(_resellerRequest); if (MicrosoftCustomerId == "Unknown error occur" || MicrosoftCustomerId == "Domain name already exist") { ViewBag.msg = MicrosoftCustomerId; } else { return(RedirectToAction("Customers")); } } ViewModel.Countries.Countries country = new ViewModel.Countries.Countries(); ViewBag.Countries = country.GetCountries(); return(View()); }
// Delete: Admin/DeleteRequest // Delete the New reseller request public ActionResult DeleteRequest(int Id) { ViewModel.ResellerRequest.NewRequest _VresellerRequest = new ViewModel.ResellerRequest.NewRequest(); ViewBag.IsDeleted = _VresellerRequest.DeleteRequest(Id); return(View("ResellerRequest", _VresellerRequest.GetAll())); }