예제 #1
0
 public void Excluir(string id, string arquivo)
 {
     if (string.IsNullOrEmpty(id))
     {
         throw new ApplicationException("O Id deve ser informado");
     }
     dal.Excluir(id.ToString(), arquivo.ToString());
 }
예제 #2
0
 public ActionResult Excluir(string id, FormCollection form)
 {
     try
     {
         string arquivo = HttpContext.Server.MapPath("~/App_Data/Cliente " + id + ".xml");
         bll.Excluir(id, arquivo.ToString());
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         ModelState.AddModelError(string.Empty, ex.Message);
         return(View(bll.ObterporId(id)));
     }
 }