public override bool Equals(object obj) { if (obj == null) { return(false); } ComponentVendors cv = obj as ComponentVendors; if ((object)cv == null) { return(false); } return((this.CvComponents == cv.CvComponents) && (this.CvVendor == cv.CvVendor)); }
public List <ComponentVendors> GetComponentVendors() { Datahandler dh = Datahandler.getData(); List <ComponentVendors> compVends = new List <ComponentVendors>(); DataTable table = dh.readDataFromDB(DataAccesHelper.QueryGetComponentVendors + this.CvComponents.CompCode + "'"); foreach (DataRow item in table.Rows) { ComponentVendors cv = new ComponentVendors(); cv.CvComponents = new SystemComponents(); cv.CvComponents.CompCode = item[DataAccesHelper.cvCompCode].ToString(); cv.CvVendor = new Vendor(); cv.CvVendor.VendorCode = item[DataAccesHelper.cvVendorCode].ToString(); compVends.Add(cv); } return(compVends); }