コード例 #1
0
        public ActionResult Index(FormCollection form)
        {
            try
            {
                if (form["btnDelete"] != null)
                {
                    var personValues = form.GetValues("chkDelete");
                    if (personValues != null)
                    {
                        foreach (var personValue in personValues)
                        {
                            var personId = Convert.ToInt32(personValue);
                            personProvider.DeletePerson(personId);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public virtual long DeletePerson([FromBody] Person person)
 {
     return(PersonProvider.DeletePerson(person));
 }