public ActionResult Delete(string id) { try { if (SessionIsNull()) { return(Redirect("/Home/Login?mustLogin=true&next=/Plan/Delete?id=" + id)); } PlanService ser = new PlanService(); int result = ser.DeletePlan(id); SetViewBag(); if (result == 1) { return(Redirect("/Plan/ViewMyPlan?delete_success=true")); } else { return(Redirect("/Plan/ViewMyPlan?delete_error=true")); } } catch (System.Exception) { return(Redirect("/Plan/ViewMyPlan?delete_error=true")); } }
public string DeletePlan(int planid) { PlanService ptmService = new PlanService(); Mapper.CreateMap <PlanModel, Plan>(); Plan plan = new Plan(); plan.PlanID = planid; int i = ptmService.DeletePlan(plan); return(i.ToString()); }
public ActionResult DeletePlan(string[] ids) { var op = PlanService.DeletePlan(ids); return(new OpActionResult(op)); }
public bool DeletePlan(string date) { return(planService.DeletePlan(date)); }
public bool DeletePlan(DeletePlanRequest deleteplanrequest) { return(planService.DeletePlan(deleteplanrequest.PlanId)); }