public virtual ActionResult Create(ReceivingSetting model, string repository, string @return)
        {
            var data = new JsonResultData(ModelState);
            data.RunWithTry((resultData) =>
            {
                if (ModelState.IsValid)
                {
                    Manager.Add(Repository, model);
                    resultData.RedirectUrl = @return;
                }
            });

            return Json(data);
        }
        public virtual ActionResult Delete(ReceivingSetting[] Model)
        {
            ModelState.Clear();
            var data = new JsonResultData(ModelState);

            data.RunWithTry((resultData) =>
            {
                if (Model != null)
                {
                    foreach (var m in Model)
                    {
                        m.Repository = Repository;
                        Manager.Remove(Repository, m);
                    }
                    resultData.ReloadPage = true;
                }
            });
            return Json(data);
        }
        public virtual ActionResult Delete(ReceivingSetting[] Model)
        {
            var entry = new JsonResultEntry();

            try
            {
                if (Model != null)
                {
                    foreach (var m in Model)
                    {
                        m.Repository = Repository;
                        Manager.Remove(Repository, m);
                    }
                }
            }
            catch (Exception e)
            {
                entry.AddException(e);
            }
            return Json(entry);
        }
        public virtual ActionResult Create(ReceivingSetting model, string repository)
        {
            var entry = new JsonResultEntry();
            if (ModelState.IsValid)
            {
                try
                {
                    Manager.Add(Repository, model);
                    entry.SetSuccess();
                }
                catch (Exception e)
                {
                    entry.AddException(e);
                }
            }
            else
            {
                entry.AddModelState(ModelState);
            }

            return Json(entry);
        }
        public virtual ActionResult Edit(ReceivingSetting model, string @return)
        {
            var data = new JsonResultData(ModelState);

            if (ModelState.IsValid)
            {
                data.RunWithTry((resultData) =>
                {
                    model.Repository = Repository;
                    Manager.Remove(Repository, model);
                    Manager.Add(Repository, model);
                    resultData.RedirectUrl = @return;
                });
            }

            return Json(data);
        }