Exemple #1
0
 public Configurations(string configId, string name, string description, SystemComponents configuration_component, double addCost, string status)
 {
     this.Name                    = name;
     this.Description             = description;
     this.Configuration_Component = configuration_component;
     this.AddCost                 = addCost;
     this.ConfigId                = configId;
     this.Status                  = status;
 }
Exemple #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SystemComponents sc = obj as SystemComponents;

            if ((object)sc == null)
            {
                return(false);
            }
            return((this.CompCode == sc.CompCode) && (this.Description == sc.Description) && (this.SysComps_Product == sc.SysComps_Product) && (this.Status == sc.Status) && (this.Manufacturer == sc.Manufacturer) && (this.Model == sc.Model));
        }
Exemple #3
0
        public List <SystemComponents> GetSystemComponents()
        {
            Datahandler             dh       = Datahandler.getData();
            List <SystemComponents> sysComps = new List <SystemComponents>();
            DataTable table = dh.readDataFromDB(DataAccesHelper.QueryGetSystemComponents + this.SysComps_Product.ProductCode + "'");

            foreach (DataRow item in table.Rows)
            {
                SystemComponents sc = new SystemComponents();
                sc.CompCode                     = item[DataAccesHelper.compCode].ToString();
                sc.Description                  = item[DataAccesHelper.compDesc].ToString();
                sc.SysComps_Product             = new Product();
                sc.SysComps_Product.ProductCode = item[DataAccesHelper.compProdCode].ToString();
                sc.Status       = item[DataAccesHelper.compStatus].ToString();
                sc.Manufacturer = item[DataAccesHelper.compManufacturer].ToString();
                sc.Model        = item[DataAccesHelper.compModel].ToString();
                sysComps.Add(sc);
            }

            return(sysComps);
        }
Exemple #4
0
 public Configurations(SystemComponents configuration_component)
 {
     this.Configuration_Component = configuration_component;
 }
Exemple #5
0
 public ComponentVendors(SystemComponents cvComponent, Vendor cvVendor)
 {
     this.CvComponents = cvComponent;
     this.CvVendor     = cvVendor;
 }