public Judoist(string name, string surName, int weight, int height, int age, double experience, string diet, string injury, string typeOfSport, int numberOfWins, Achievements achievement, Belts belt) : base(name, surName, weight, height, age, experience, diet, injury, numberOfWins, achievement) { this.typeOfSport = "Judoist"; Belt = belt; }
public static bool IsBelt(string itemBase) { if (Belts.Contains(itemBase)) { return(true); } return(false); }
public async Task <IActionResult> OnGetAsync(Guid?id) { if (id == null) { return(NotFound()); } Belts = await _context.Belts.FirstOrDefaultAsync(m => m.Id == id); if (Belts == null) { return(NotFound()); } return(Page()); }
public static bool IsJewelery(string itemBase) { if (Belts.Contains(itemBase)) { return(true); } if (Amulets.Contains(itemBase)) { return(true); } if (Rings.Contains(itemBase)) { return(true); } return(false); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } Belts = await _context.Belts.FindAsync(id); if (Belts != null) { _context.Belts.Remove(Belts); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public static string GetItemType(string itemBase) { if (Bows.Contains(itemBase)) { return("Bow"); } if (Claws.Contains(itemBase)) { return("Claw"); } if (OneHandedAxes.Contains(itemBase)) { return("One Hand Axe"); } if (OneHandedMaces.Contains(itemBase)) { return("One Hand Mace"); } if (OneHandedSwords.Contains(itemBase)) { return("One Hand Sword"); } if (TwoHandedAxes.Contains(itemBase)) { return("Two Hand Axe"); } if (TwoHandedMaces.Contains(itemBase)) { return("Two Hand Mace"); } if (Sceptres.Contains(itemBase)) { return("Sceptre"); } if (Daggers.Contains(itemBase)) { return("Dagger"); } if (Staves.Contains(itemBase)) { return("Staff"); } if (Belts.Contains(itemBase)) { return("Belt"); } if (Amulets.Contains(itemBase)) { return("Amulet"); } if (Rings.Contains(itemBase)) { return("Ring"); } if (Boots.Contains(itemBase)) { return("Boots"); } if (Gloves.Contains(itemBase)) { return("Gloves"); } if (BodyArmors.Contains(itemBase)) { return("Body Armour"); } if (Wands.Contains(itemBase)) { return("Wand"); } if (Helmets.Contains(itemBase)) { return("Helmet"); } if (Shields.Contains(itemBase)) { return("Shield"); } if (Jewels.Contains(itemBase)) { return("Jewel"); } if (itemBase == "Gem") { return(itemBase); } if (Quivers.Contains(itemBase)) { return("Quiver"); } return("No type found"); }
public Judoist() : base() { typeOfSport = "Judoist"; Belt = (Belts)1; }
private async void Delete(object value) { #if XBAP MessageBoxResult result = MessageBox.Show("确定要删除?", "删除", MessageBoxButton.OK, MessageBoxImage.Warning); #else MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show("确定要删除?", "删除", MessageBoxButton.OKCancel, MessageBoxImage.Warning); #endif if (result == MessageBoxResult.OK) { if (DevicesIsSelected == true) { T_DeviceDiagnose t_model = DeviceDiagnoseClass.ConvertToDB(SelectedDevice); if (t_model.id != -1) { await _databaseComponent.Delete <T_DeviceDiagnose>(ServerIP, t_model.id); } Devices.Remove(SelectedDevice); } else if (ShaftsIsSelected == true) { T_Shaft t_model = ShaftClass.ConvertToDB(SelectedShaft); if (t_model.id != -1) { await _databaseComponent.Delete <T_Shaft>(ServerIP, t_model.id); } Shafts.Remove(SelectedShaft); } else if (BearingsIsSelected == true) { T_Bearing t_model = BearingClass.ConvertToDB(SelectedBearing); if (t_model.id != -1) { await _databaseComponent.Delete <T_Bearing>(ServerIP, t_model.id); } Bearings.Remove(SelectedBearing); } else if (BeltsIsSelected == true) { Belts.Remove(SelectedBelt); T_Belt t_model = BeltClass.ConvertToDB(SelectedBelt); if (t_model.id != -1) { await _databaseComponent.Delete <T_Belt>(ServerIP, t_model.id); } } else if (GearsIsSelected == true) { T_Gear t_model = GearClass.ConvertToDB(SelectedGear); if (t_model.id != -1) { await _databaseComponent.Delete <T_Gear>(ServerIP, t_model.id); } Gears.Remove(SelectedGear); } else if (ImpellersIsSelected == true) { T_Impeller t_model = ImpellerClass.ConvertToDB(SelectedImpeller); if (t_model.id != -1) { await _databaseComponent.Delete <T_Impeller>(ServerIP, t_model.id); } Impellers.Remove(SelectedImpeller); } else if (MotorsIsSelected == true) { T_Motor t_model = MotorClass.ConvertToDB(SelectedMotor); if (t_model.id != -1) { await _databaseComponent.Delete <T_Motor>(ServerIP, t_model.id); } Motors.Remove(SelectedMotor); } } }
private void Add(object value) { if (DevicesIsSelected == true) { SelectedDevice = new DeviceDiagnoseClass() { Name = "新建设备" }; Devices.Add(SelectedDevice); } else if (ShaftsIsSelected == true) { SelectedShaft = new ShaftClass() { Name = "新建轴" }; Shafts.Add(SelectedShaft); } else if (BearingsIsSelected == true) { SelectedBearing = new BearingClass() { Name = "新建轴承" }; Bearings.Add(SelectedBearing); } else if (BeltsIsSelected == true) { SelectedBelt = new BeltClass() { Name = "新建皮带" }; Belts.Add(SelectedBelt); } else if (GearsIsSelected == true) { SelectedGear = new GearClass() { Name = "新建齿轮" }; Gears.Add(SelectedGear); } else if (ImpellersIsSelected == true) { SelectedImpeller = new ImpellerClass() { Name = "新建叶轮" }; Impellers.Add(SelectedImpeller); } else if (MotorsIsSelected == true) { SelectedMotor = new MotorClass() { Name = "新建电机" }; Motors.Add(SelectedMotor); } ShowWin(); //立即更新到服务器 }