/// <summary>
 /// 修改一条发票内容
 /// </summary>
 /// <param name="configInvoiceContent">
 /// 需修改的发票内容
 /// </param>
 public void Modify(Config_Invoice_Content configInvoiceContent)
 {
     this.configInvoiceContentDA.Update(configInvoiceContent);
 }
        /// <summary>
        /// 新增一条发票内容
        /// </summary>
        /// <param name="invoiceContent">
        /// 要新增的发票内容
        /// </param>
        /// <returns>
        /// 新增的Id
        /// </returns>
        /// <exception cref="Exception">
        /// </exception>
        public int Insert(Config_Invoice_Content invoiceContent)
        {
            var parameters = new List<SqlParameter>()
                                 {
                                     this.SqlServer.CreateSqlParameter(
                                         "Name",
                                         SqlDbType.NVarChar,
                                         invoiceContent.Name,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "Description",
                                         SqlDbType.NVarChar,
                                         invoiceContent.Description,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "CreateTime",
                                         SqlDbType.DateTime,
                                         DateTime.Now,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ReferenceID",
                                         SqlDbType.Int,
                                         null,
                                         ParameterDirection.Output)
                                 };
            try
            {

                this.SqlServer.ExecuteNonQuery(
                    CommandType.StoredProcedure,
                    "sp_Config_Invoice_Content_Insert",
                    parameters,
                    null);
                return (int)parameters.Find(parameter => parameter.ParameterName == "ReferenceID").Value;
            }
            catch (Exception exception)
            {
                throw new Exception("Exception - ConfigInvoiceContentDA - Insert", exception);
            }
        }
 /// <summary>
 /// 新增发票内容
 /// </summary>
 /// <param name="invoiceContent">
 /// 需新增的发票内容
 /// </param>
 /// <returns>
 /// 新增的ID
 /// </returns>
 public int Add(Config_Invoice_Content invoiceContent)
 {
     return configInvoiceContentDA.Insert(invoiceContent);
 }
        /// <summary>
        /// 更新发票内容
        /// </summary>
        /// <param name="invoiceContent">
        /// 要更新的发票内容
        /// </param>
        /// <exception cref="Exception">
        /// </exception>
        public void Update(Config_Invoice_Content invoiceContent)
        {
            var paraList = new List<SqlParameter>()
                               {
                                   this.SqlServer.CreateSqlParameter(
                                       "Name",
                                       SqlDbType.NVarChar,
                                       invoiceContent.Name,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "Description",
                                       SqlDbType.NVarChar,
                                       invoiceContent.Description,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "CreateTime",
                                       SqlDbType.DateTime,
                                       DateTime.Now,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ID",
                                       SqlDbType.Int,
                                       invoiceContent.ID,
                                       ParameterDirection.Input)
                               };

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

            }
            catch (Exception exception)
            {
                throw new Exception("Exception - ConfigInvoiceContentDA - Update", exception);
            }
        }