示例#1
0
 /// <summary>
 /// 添加新公司
 /// </summary>
 /// <param name="company"></param>
 /// <returns></returns>
 public int addVendor(ABiVendor vendor)
 {
     VPDAL.ABi_Vendor obj = new VPDAL.ABi_Vendor();
     obj.VendorCode = vendor.VendorCode;
     obj.VendorName = vendor.VendorName;
     obj.TaxNumber = vendor.TaxNumber;
     obj.IndustryCode = vendor.IndustryCode;
     obj.DateCreated = Convert.ToDateTime(vendor.DateCreated);
     obj.DateModified = Convert.ToDateTime(vendor.DateModified);
     obj.Blocking = vendor.Blocking;
     obj.Deletion = vendor.Deletion;
     dbContent.ABi_Vendor.AddObject(obj);
     return dbContent.SaveChanges();
 }
示例#2
0
 public static ABiVendor FromABi_Vendor(VPDAL.ABi_Vendor vd)
 {
     ABiVendor obj = new ABiVendor();
     obj.ABi_Vendor_ID = vd.ABi_Vendor_ID;
     obj.VendorCode = vd.VendorCode;
     obj.VendorName = vd.VendorName;
     obj.TaxNumber = vd.TaxNumber;
     obj.IndustryCode = vd.IndustryCode;
     obj.DateCreated = Convert.ToDateTime(vd.DateCreated);
     obj.DateModified = Convert.ToDateTime(vd.DateModified);
     obj.Blocking = vd.Blocking;
     obj.Deletion = vd.Deletion;
     obj.Active = vd.Active;
     return obj;
 }
示例#3
0
 /// <summary>
 /// 更新供应商激活状态
 /// </summary>
 /// <param name="vendor"></param>
 /// <returns></returns>
 public int updateVendorActive(ABiVendor vendor)
 {
     var obj = dbContent.ABi_Vendor.FirstOrDefault(o => o.ABi_Vendor_ID == vendor.ABi_Vendor_ID);
     if (obj != null)
     {
         obj.VendorCode = vendor.VendorCode;
         obj.VendorName = vendor.VendorName;
         obj.TaxNumber = vendor.TaxNumber;
         obj.IndustryCode = vendor.IndustryCode;
         obj.DateCreated = Convert.ToDateTime(vendor.DateCreated);
         obj.DateModified = Convert.ToDateTime(vendor.DateModified);
         obj.Blocking = vendor.Blocking;
         obj.Deletion = vendor.Deletion;
         obj.Active = vendor.Active;
     }
     return dbContent.SaveChanges();
 }
示例#4
0
 /// <summary>
 /// 更新供应商激活状态
 /// </summary>
 /// <param name="vendor"></param>
 /// <returns></returns>
 public int updateVendor(ABiVendor vendor)
 {
     int id = Convert.ToInt32(vendor.ABi_Vendor_ID);
     var obj = dbContent.ABi_Vendor.FirstOrDefault(o => o.ABi_Vendor_ID == id);
     if (obj != null)
     {
         obj.Active = vendor.Active;
     }
     return dbContent.SaveChanges();
 }