コード例 #1
0
 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"));
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        public ActionResult DeletePlan(string[] ids)
        {
            var op = PlanService.DeletePlan(ids);

            return(new OpActionResult(op));
        }
コード例 #4
0
 public bool DeletePlan(string date)
 {
     return(planService.DeletePlan(date));
 }
コード例 #5
0
 public bool DeletePlan(DeletePlanRequest deleteplanrequest)
 {
     return(planService.DeletePlan(deleteplanrequest.PlanId));
 }