예제 #1
0
 public static Supplier Map(this tblSupplier supp)
 {
     if (supp == null)
         return null;
     Supplier supplier = new Supplier(supp.id)
                             {
                                 Name = supp.Name,
                                 Description = supp.Description,
                                 Code = supp.Code
                             };
     supplier._SetDateCreated(supp.IM_DateCreated);
     supplier._SetDateLastUpdated(supp.IM_DateLastUpdated);
     supplier._SetStatus((EntityStatus) supp.IM_Status);
     return supplier;
 }
예제 #2
0
 protected Guid AddSupplier(string code, string name, string description)
 {
 Supplier supplier=new Supplier(Guid.NewGuid())
 {
  Name=name,
  Code=code,
   Description=description
 };
 supplier._SetStatus(EntityStatus.Active);
 return _supplierRepository.Save(supplier);
 }