Exemplo n.º 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"));
     }
 }
Exemplo n.º 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());
        }
Exemplo n.º 3
0
        public ActionResult DeletePlan(string[] ids)
        {
            var op = PlanService.DeletePlan(ids);

            return(new OpActionResult(op));
        }
 public bool DeletePlan(string date)
 {
     return(planService.DeletePlan(date));
 }
Exemplo n.º 5
0
 public bool DeletePlan(DeletePlanRequest deleteplanrequest)
 {
     return(planService.DeletePlan(deleteplanrequest.PlanId));
 }