示例#1
0
 //public ActionResult Delete(int cusId, Customer model)
 public ActionResult Delete(Customer model)
 {
     try
     {
         int    id = Convert.ToInt32(model.CusId);
         string Msg;
         string showMsg  = "Customer Deleted Successfully!";
         bool   response = _customService.DeleteMyCustomer(id, out Msg);
         //SetMesageHandler(response, showMsg, Msg);
         if (response)
         {
             if (Msg == "NOERROR")
             {
                 ViewBag.msgShow = showMsg;
                 return(RedirectToAction("Index"));
             }
         }
         ViewBag.msgShow = Msg;
         return(View());
     }
     catch
     {
         return(View());
     }
 }