public ActionResult CreateOrEditPurchaseRequestConfig()
        {
            PurchaseRequestResponse _response = new PurchaseRequestResponse();

            if (Request.QueryString["id"] != null)
            {
                var request = new PurchaseRequestConfigRequest
                {
                    Data = new PurchaseRequestConfigModel
                    {
                        Id = long.Parse(Request.QueryString["id"].ToString())
                    }
                };

                PurchaseRequestConfigResponse resp   = new PurchaseRequestConfigHandler(_unitOfWork).GetDetail(request);
                PurchaseRequestConfigModel    _model = resp.Entity;
                ViewBag.Response = _response;
                return(View(_model));
            }
            else
            {
                ViewBag.Response   = _response;
                ViewBag.ActionType = ClinicEnums.Action.Add;
                return(View());
            }
        }
        public ActionResult GetPurchaseRequestConfigData()
        {
            var _draw          = Request.Form.GetValues("draw").FirstOrDefault();
            var _start         = Request.Form.GetValues("start").FirstOrDefault();
            var _length        = Request.Form.GetValues("length").FirstOrDefault();
            var _sortColumn    = Request.Form.GetValues("columns[" + Request.Form.GetValues("order[0][column]").FirstOrDefault() + "][name]").FirstOrDefault();
            var _sortColumnDir = Request.Form.GetValues("order[0][dir]").FirstOrDefault();
            var _searchValue   = Request.Form.GetValues("search[value]").FirstOrDefault();

            int _pageSize = _length != null?Convert.ToInt32(_length) : 0;

            int _skip = _start != null?Convert.ToInt32(_start) : 0;

            var request = new PurchaseRequestConfigRequest
            {
                Draw          = _draw,
                SearchValue   = _searchValue,
                SortColumn    = _sortColumn,
                SortColumnDir = _sortColumnDir,
                PageSize      = _pageSize,
                Skip          = _skip
            };

            var response = new PurchaseRequestConfigHandler(_unitOfWork).GetListData(request);

            return(Json(new { data = response.Data, recordsFiltered = response.RecordsFiltered, recordsTotal = response.RecordsTotal, draw = response.Draw }, JsonRequestBehavior.AllowGet));
        }