public ActionResult Edit(Sistema.Models.Clientes model)
 {
     this.validForm(model);
     if (ModelState.IsValid)
     {
         try
         {
             daoClientes = new DAOClientes();
             daoClientes.Update(model);
             this.AddFlashMessage(Util.AlertMessage.EDIT_SUCESS);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             this.AddFlashMessage(ex.Message, FlashMessage.ERROR);
             return(View(model));
         }
     }
     return(View(model));
 }
 public ActionResult Create(Sistema.Models.Clientes model)
 {
     this.validForm(model);
     if (ModelState.IsValid)
     {
         try
         {
             daoClientes = new DAOClientes();
             daoClientes.Insert(model);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             this.AddFlashMessage(ex.Message, FlashMessage.ERROR);
             return(View(model));
         }
     }
     else
     {
         return(View(model));
     }
 }