public modItemWindow(CatalogBike kt_) { InitializeComponent(); //initialize the windows kt = kt_; //diplay the item data tb_newItemName.Text = kt.getName(); sl_pricemul.Value = kt.getPriceMul(); lb_pricemul.Content = "Price " + (sl_pricemul.Value / 100).ToString("P"); }
public static string updateCatalogBike(CatalogBike kt) { return("UPDATE `bv_catalog` SET `name` = '" + kt.getName() + "' , `PriceMul` = '" + kt.getPriceMul().ToString() + "' WHERE `id` = " + kt.getId().ToString()); }
public static string addCatalogBike(CatalogBike cb) { return("INSERT INTO `bv_catalog` (`id`,`name`,`PriceMul`,`picture`) VALUES (" + cb.getId().ToString() + ",'" + cb.getName() + "'," + cb.getPriceMul().ToString() + ", 'Bike0.jpg')"); }