/// <summary>
 /// 修改支付机构记录
 /// </summary>
 /// <param name="paymentOrganization">
 /// 需修改的支付机构
 /// </param>
 public void Modify(Config_Payment_Organization paymentOrganization)
 {
     this.paymentOrganizationDA.Update(paymentOrganization);
 }
        /// <summary>
        /// 新增支付机构
        /// </summary>
        /// <param name="paymentOrganization">
        /// 要新增的支付机构
        /// </param>
        /// <returns>
        /// 新增的支付机构Id
        /// </returns>
        /// <exception cref="Exception">
        /// </exception>
        public int Insert(Config_Payment_Organization paymentOrganization)
        {
            var paraList = new List<SqlParameter>()
                               {
                                   this.SqlServer.CreateSqlParameter(
                                       "Name",
                                       SqlDbType.NVarChar,
                                       paymentOrganization.Name,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "PaymentTypeID",
                                       SqlDbType.Int,
                                       paymentOrganization.PaymentTypeID,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "URL",
                                       SqlDbType.VarChar,
                                       paymentOrganization.URL,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ImageURL",
                                       SqlDbType.VarChar,
                                       paymentOrganization.ImageURL,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "CreateTime",
                                       SqlDbType.DateTime,
                                       DateTime.Now,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "Sorting",
                                       SqlDbType.Int,
                                       paymentOrganization.Sorting,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ReferenceID",
                                       SqlDbType.Int,
                                       null,
                                       ParameterDirection.Output)
                               };

            try
            {
                this.SqlServer.ExecuteNonQuery(
                    CommandType.StoredProcedure,
                    "sp_Config_Payment_Organization_Insert",
                    paraList,
                    null);

                return (int)paraList.Find(p => p.ParameterName == "ReferenceID").Value;
            }
            catch (Exception exception)
            {

                throw new Exception("Exception - ConfigPaymentOrganization - Insert", exception);
            }
        }
 /// <summary>
 /// 新增支付机构
 /// </summary>
 /// <param name="paymentOrganization">
 /// 需添加的支付机构
 /// </param>
 /// <returns>
 /// 新增的支付机构ID
 /// </returns>
 public int Add(Config_Payment_Organization paymentOrganization)
 {
     return this.paymentOrganizationDA.Insert(paymentOrganization);
 }
        /// <summary>
        /// 更新支付机构
        /// </summary>
        /// <param name="paymentOrganization">
        /// 要更新的支付机构
        /// </param>
        /// <exception cref="Exception">
        /// </exception>
        public void Update(Config_Payment_Organization paymentOrganization)
        {
            var paraList = new List<SqlParameter>()
                               {
                                   this.SqlServer.CreateSqlParameter(
                                       "Name",
                                       SqlDbType.NVarChar,
                                       paymentOrganization.Name,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "PaymentTypeID",
                                       SqlDbType.Int,
                                       paymentOrganization.PaymentTypeID,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "URL",
                                       SqlDbType.VarChar,
                                       paymentOrganization.URL,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ImageURL",
                                       SqlDbType.VarChar,
                                       paymentOrganization.ImageURL,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "CreateTime",
                                       SqlDbType.DateTime,
                                       DateTime.Now,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "Sorting",
                                       SqlDbType.Int,
                                       paymentOrganization.Sorting,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ID",
                                       SqlDbType.Int,
                                       paymentOrganization.ID,
                                       ParameterDirection.Input)
                               };

            try
            {
                this.SqlServer.ExecuteNonQuery(
                    CommandType.StoredProcedure,
                    "sp_Config_Payment_Organization_Update",
                    paraList,
                    null);

            }
            catch (Exception exception)
            {

                throw new Exception("Exception - ConfigPaymentOrganization - Update", exception);
            }
        }