public JsonResult Remove(Guid id)
        {
            var response = new ResponseModel();

            try
            {
                Service.Remove(id);
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Upsert(EmployeeProxy proxy)
        {
            var response = new ResponseModel();

            try
            {
                response.Data = Service.Upsert(proxy);
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Get(AdminFilter filter)
        {
            var response = new ResponseModel();

            try
            {
                response.Data = Service.Get(filter);
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Beispiel #4
0
        public JsonResult Save(AppointmentInfoProxy proxy)
        {
            var response = new ResponseModel();

            try
            {
                Service.Save(proxy);
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Get(AdminFilter filter)
        {
            var response = new ResponseModel();

            try
            {
                response.Data = Service.Get(filter);
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));

            //return this.Json(new { records = result, total = filter.Count }, JsonRequestBehavior.AllowGet);
        }
Beispiel #6
0
        public JsonResult Get(AppointmentInfoFilter filter)
        {
            var response = new ResponseModel();

            try
            {
                response.Data = new
                {
                    Records    = Service.Get(filter),
                    Count      = filter.Count,
                    TotalValue = filter.TotalValue
                };
            }
            catch (Exception ex)
            {
                response.SetException(ex);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }