Exemplo n.º 1
0
        /// <summary>
        ///     创建供应商
        ///     供应商公司与供应商具有一致的编码
        /// </summary>
        /// <param name="supplierType">供应商类型</param>
        /// <param name="code">供应商编码</param>
        /// <param name="name">名称</param>
        /// <param name="note">备注</param>
        /// <returns>创建的供应商</returns>
        public static Supplier CreateSupplier(SupplierType supplierType, string code, string name, string note)
        {
            var supplier = new Supplier
            {
                SupplierType = supplierType,
                Code = code,
                CnName = name,
                CreateDate = DateTime.Now,
                UpdateDate = DateTime.Now,
                IsValid = true,
                Note = note
            };

            return supplier;
        }
Exemplo n.º 2
0
        /// <summary>
        ///     设置供应商
        /// </summary>
        /// <param name="supplier">供应商</param>
        public void SetSupplier(Supplier supplier)
        {
            if (supplier == null || supplier.IsTransient())
            {
                throw new ArgumentException("供应商参数为空!");
            }

            Supplier = supplier;
            SupplierId = supplier.Id;
            SupplierName = supplier.CnName;
        }
Exemplo n.º 3
0
 /// <summary>
 ///     设置发票属性
 /// </summary>
 /// <param name="invoice">发票</param>
 /// <param name="invoideCode">发票代码</param>
 /// <param name="invoiceDate">发票日期</param>
 /// <param name="operatorName">经办人</param>
 /// <param name="invoiceNumber">发票号</param>
 /// <param name="supplier">供应商</param>
 /// <param name="order">订单</param>
 /// <param name="paidAmount">已付金额</param>
 /// <param name="currency">币种</param>
 /// <param name="paymentScheduleLineId">付款计划行ID</param>
 /// <param name="status">发票状态</param>
 /// <returns>发票</returns>
 public static void SetInvoice(Invoice invoice, string invoideCode, DateTime invoiceDate, string operatorName,
     string invoiceNumber, Supplier supplier, Order order,
     decimal paidAmount, Currency currency, int? paymentScheduleLineId, int status)
 {
     invoice.InvoideCode = invoideCode;
     invoice.InvoiceDate = invoiceDate;
     invoice.SetOperator(operatorName);
     invoice.SetInvoiceNumber(invoiceNumber);
     invoice.SetSupplier(supplier);
     invoice.SetOrder(order);
     invoice.SetCurrency(currency);
     invoice.SetPaymentScheduleLine(paymentScheduleLineId);
     invoice.SetInvoiceStatus((InvoiceStatus) status);
 }
Exemplo n.º 4
0
 /// <summary>
 ///     设置发动机所有权人
 /// </summary>
 /// <param name="supplier">发动机所有权人</param>
 public void SetSupplier(Supplier supplier)
 {
     Supplier = supplier;
     SupplierId = supplier.Id;
 }
Exemplo n.º 5
0
        /// <summary>
        ///     设置所有权人
        /// </summary>
        /// <param name="supplier">所有权人</param>
        public void SetSupplier(Supplier supplier)
        {
            if (supplier == null || supplier.IsTransient())
            {
                throw new ArgumentException("所有权人Id参数为空!");
            }

            Supplier = supplier;
            SupplierId = supplier.Id;
        }