public ActionResult Delete(int id, FormCollection collection)
        {
            // Get the product IDs.
            IEnumerable <ProductXInvoiceDto> xInvoices = getProductXInvoices(id);             foreach (ProductXInvoiceDto product in xInvoices)

            {
                string url = ControllersHelper.getUrl("ProductXInvoice", "Delete", product.id);
                helper.doPostRequest(url, "");
            }

            // TODO: do something with the response.
            helper.doPostRequest(getUrl("Delete", id), "");
            return(RedirectToAction("Index"));
        }
示例#2
0
 static ProductsController()
 {
     helper = new ControllersHelper(helperName);
 }
 static InvoicesController()
 {
     helper         = new ControllersHelper(helperName);
     productsHelper = new ControllersHelper(ProductsController.helperName);
     xInvoiceHelper = new ControllersHelper(ProductXInvoicesController.helperName);
 }
 static ProductXInvoicesController()
 {
     helper = new ControllersHelper("ProductXInvoice");
 }