public ActionResult DeleteInfo() { string ids = Request["ids"]; try { string strwhere = " id in(" + ids + ")"; Business.Sys_FlowerTreatment Sys_FlowerTreatment = new Business.Sys_FlowerTreatment(); List <Model.FlowerTreatment> list = Sys_FlowerTreatment.FlowerTreatmentList(strwhere); foreach (var item in list) { if (Sys_FlowerTreatment.DeleteInfo(item.id.ToString())) { if (item.Photo != null && !string.IsNullOrEmpty(item.Photo)) { DeleteFlowerPhoto(item.Photo); } if (item.ChangePhoto != null && !string.IsNullOrEmpty(item.ChangePhoto)) { DeleteFlowerPhoto(item.ChangePhoto); } } } return(Content("1")); } catch (Exception ex) { return(Content("0")); } }
public ActionResult DeleteInfo() { string id = Request["id"]; Business.Sys_FlowerTreatment Sys_FlowerTreatment = new Business.Sys_FlowerTreatment(); if (Sys_FlowerTreatment.DeleteInfo(id)) { return(Content("1")); } return(Content("0")); }