예제 #1
0
        public string CreatePlans(PlanParam model)
        {
            try
            {
                //if (!ModelState.IsValid)
                //{
                //    return "ve";
                //}
                UnitOfWork uow = new UnitOfWork();
                Plan plan = new Plan()
                {
                    PlanID = Guid.NewGuid().ToString(),
                    PlanName = model.PlanName,
                    Price = model.Price,
                    Status = 1,
                    Hours = model.Credits
                };
                uow.Plans.Insert(plan);
                uow.Save();
                return "success";
            }
            catch (Exception ex)
            {
                return "ex";
            }

        }
예제 #2
0
        public async Task <IActionResult> GetPager(PlanParam param)
        {
            var result = await planService.GetList(param);

            return(Json(result));
        }