public void DeleteVendor(Vendor vendor) { using (ISession session = HibernateProvider.Factory.OpenSession()) { session.Delete(vendor); session.Flush(); } }
public void InsertVendor(Vendor vendor) { using (ISession session = HibernateProvider.Factory.OpenSession()) { session.SaveOrUpdate(vendor); session.Flush(); } }
/// <summary> /// Deprecated Method for adding a new object to the Vendors EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToVendors(Vendor vendor) { base.AddObject("Vendors", vendor); }
public static void Send(Vendor vendor) { Messenger.Default.Send(vendor, MessageTypes.EditVendor); }
/// <summary> /// Create a new Vendor object. /// </summary> /// <param name="vendorID">Initial value of the VendorID property.</param> /// <param name="vendorName">Initial value of the VendorName property.</param> /// <param name="address">Initial value of the Address property.</param> /// <param name="city">Initial value of the City property.</param> /// <param name="state">Initial value of the State property.</param> /// <param name="zip">Initial value of the Zip property.</param> /// <param name="email">Initial value of the Email property.</param> /// <param name="phoneNumber">Initial value of the PhoneNumber property.</param> /// <param name="contactPerson">Initial value of the ContactPerson property.</param> /// <param name="meansOfPayment">Initial value of the MeansOfPayment property.</param> public static Vendor CreateVendor(global::System.Int32 vendorID, global::System.String vendorName, global::System.String address, global::System.String city, global::System.String state, global::System.String zip, global::System.String email, global::System.String phoneNumber, global::System.String contactPerson, global::System.Int32 meansOfPayment) { Vendor vendor = new Vendor(); vendor.VendorID = vendorID; vendor.VendorName = vendorName; vendor.Address = address; vendor.City = city; vendor.State = state; vendor.Zip = zip; vendor.Email = email; vendor.PhoneNumber = phoneNumber; vendor.ContactPerson = contactPerson; vendor.MeansOfPayment = meansOfPayment; return vendor; }