Esempio n. 1
0
        public JsonResult DeletePlan(int id)
        {
            var model = this.CurrentUserTourPlan().Where(e => e.PlanID == id).FirstOrDefault();

            if (model != null && model.PlanID > 0)
            {
                tourPlanRepository.Delete(model);
                tourPlanRepository.Uow.Commit();
            }
            var data = this.CurrentUserTourPlan();
            var dto  = data.ToDto();

            return(Json(dto, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public bool DeleteTrue(iPow.Infrastructure.Data.DataSys.Sys_TourPlan entity, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser)
        {
            var res = false;

            if (entity != null)
            {
                try
                {
                    tourPlanRepository.Delete(entity);
                    tourPlanRepository.Uow.Commit();
                    res = true;
                }
                catch (Exception ex)
                {
                }
            }
            return(res);
        }