/// <summary>
 /// 更新一条发票类型
 /// </summary>
 /// <param name="configInvoiceType">
 /// 需更新的发票类型
 /// </param>
 public void Modify(Config_Invoice_Type configInvoiceType)
 {
     this.configInvoiceTypeDA.Update(configInvoiceType);
 }
        /// <summary>
        /// 新增一条发票类别
        /// </summary>
        /// <param name="invoiceType">
        /// 新增的类别
        /// </param>
        /// <returns>
        /// 增加的Id
        /// </returns>
        /// <exception cref="Exception">
        /// </exception>
        public int Insert(Config_Invoice_Type invoiceType)
        {
            var paraList = new List<SqlParameter>()
                               {
                                   this.SqlServer.CreateSqlParameter(
                                       "Name",
                                       SqlDbType.NVarChar,
                                       invoiceType.Name,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "Description",
                                       SqlDbType.NVarChar,
                                       invoiceType.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_Type_Insert",
                    paraList,
                    null);
                return (int)paraList.Find(parameter => parameter.ParameterName == "ReferenceID").Value;
            }
            catch (Exception exception)
            {
                throw new Exception("Exception - ConfigInvoiceTypeDA - Insert", exception);
            }
        }
 /// <summary>
 /// 增加一条发票类型记录
 /// </summary>
 /// <param name="invoiceType">
 /// 增加的发票类型
 /// </param>
 /// <returns>
 /// 增加的对象的Id
 /// </returns>
 public int Add(Config_Invoice_Type invoiceType)
 {
     return configInvoiceTypeDA.Insert(invoiceType);
 }
        /// <summary>
        /// 更新发票类别
        /// </summary>
        /// <param name="invoiceType">
        /// 要更新的发票类别
        /// </param>
        /// <exception cref="Exception">
        /// </exception>
        public void Update(Config_Invoice_Type invoiceType)
        {
            var paraList = new List<SqlParameter>()
                               {
                                   this.SqlServer.CreateSqlParameter(
                                       "Name",
                                       SqlDbType.NVarChar,
                                       invoiceType.Name,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "Description",
                                       SqlDbType.NVarChar,
                                       invoiceType.Description,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "CreateTime",
                                       SqlDbType.DateTime,
                                       DateTime.Now,
                                       ParameterDirection.Input),
                                   this.SqlServer.CreateSqlParameter(
                                       "ID",
                                       SqlDbType.Int,
                                       invoiceType.ID,
                                       ParameterDirection.Input)
                               };

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

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