Ejemplo n.º 1
0
 /// <summary>
 ///     创建供应商
 ///     供应商公司与供应商具有一致的编码
 /// </summary>
 /// <returns>创建的供应商</returns>
 public static Supplier CreateSupplier()
 {
     var supplier = new Supplier
     {
         CreateDate = DateTime.Now,
     };
     supplier.GenerateNewIdentity();
     return supplier;
 }
Ejemplo n.º 2
0
 public static void SetSupplier(Supplier supplier, SupplierType supplierType, string code, string name, string shortName, bool isValid, string note, DateTime updateTime, int supplierCompanyId)
 {
     supplier.SupplierType = supplierType;
     supplier.Code = code;
     supplier.CnName = name;
     supplier.CnShortName = shortName;
     supplier.UpdateDate = updateTime;
     supplier.IsValid = isValid;
     supplier.Note = note;
     supplier.SupplierCompanyId = supplierCompanyId;
 }
Ejemplo n.º 3
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;
            Signatory = supplier.CnName;
        }