public COMPONENTTYPE ParseComponentType(string Type) { COMPONENTTYPE _type; switch (Type) { case "F": { _type = COMPONENTTYPE.F; break; }; case "H": { _type = COMPONENTTYPE.H; break; }; case "PSU": { _type = COMPONENTTYPE.PSU; break; }; case "S": { _type = COMPONENTTYPE.S; break; }; case "A": { _type = COMPONENTTYPE.A; break; }; case "OP": { _type = COMPONENTTYPE.OP; break; }; case "MB": { _type = COMPONENTTYPE.MB; break; }; case "ENG": { _type = COMPONENTTYPE.ENG; break; }; case "E": { _type = COMPONENTTYPE.E; break; }; default: { _type = COMPONENTTYPE.M; break; }; } return(_type); }
public SNWindow(COMPONENTTYPE Type, int TestID) { InitializeComponent(); this.Topmost = true; this.Focus(); _managers = Managers.CreateManagers(); _mysqlManager = _managers.GetMySQLManager(); _type = Type; _testID = TestID; ChangeLabel(); txtSN.Focus(); }
public Component(int ID, string PN, string Foto, string Description, string Test, string FID, string Rev, string Type, int Stock, int YIELD, string Location, string Comment) { _id = ID; //_sID++; _PN = PN; _foto = Foto; _description = Description; _test = Test; _FID = FID; _REV = Rev; //_type = Type; _type = ParseComponentType(Type); _stock = Stock; _yield = YIELD; _location = Location; _comment = Comment; }