public ActionResult ModifyPaymentOrganization([DataSourceRequest] DataSourceRequest request, ConfigPaymentOrganizationModel model)
        {
            if (model != null && ModelState.IsValid)
            {
                var service = new ConfigPaymentOrganizationService();

                var paymentOrganization = DataTransfer.Transfer<Config_Payment_Organization>(
                    model,
                    typeof(ConfigPaymentOrganizationModel));

                service.Modify(paymentOrganization);
            }

            return Json(new[] { model }.ToDataSourceResult(request, ModelState));
        }
        public ActionResult AddPaymentOrganization([DataSourceRequest] DataSourceRequest request, ConfigPaymentOrganizationModel model)
        {
            try
            {
                if (model != null)
                {
                    var service = new ConfigPaymentOrganizationService();

                    var paymentOrganization = DataTransfer.Transfer<Config_Payment_Organization>(
                        model,
                        typeof(ConfigPaymentOrganizationModel));

                    model.ID = service.Add(paymentOrganization);
                }

                return Json(new[] { model }.ToDataSourceResult(request, ModelState));
            }
            catch
            {
                return View();
            }
        }
        public ActionResult RemovePaymentOrganization(int id, FormCollection collection)
        {
            try
            {
                var service = new ConfigPaymentOrganizationService();

                service.Remove(id);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
        public ActionResult QueryPaymentOrganization([DataSourceRequest] DataSourceRequest request, int paymentTypeId)
        {
            var service = new ConfigPaymentOrganizationService();

            var list = service.QueryAll();
            if (list != null)
            {
                var modelList = new List<ConfigPaymentOrganizationModel>();

                foreach (var config in list)
                {
                    modelList.Add(
                        DataTransfer.Transfer<ConfigPaymentOrganizationModel>(
                            config,
                            typeof(Config_Payment_Organization)));
                }

                return Json(modelList.ToDataSourceResult(request));
            }

            return this.View();
        }