private void btnVal_Click(object sender, RoutedEventArgs e) { dollar = USD.Text.Replace(',', '.'); euro = EUR.Text.Replace(',', '.'); rubl = RUB.Text.Replace(',', '.'); if (dollar == "") { dollar = "0"; } if (euro == "") { euro = "0"; } if (rubl == "") { rubl = "0"; } dbCon.Registr("INSERT INTO currency(usd,eur,rub) " + "VALUE('" + dollar + "','" + euro + "','" + rubl + "')"); string id = dbCon.DisplayReturn("SELECT id FROM currency where usd='" + dollar + "' and eur='" + euro + "' and rub='" + rubl + "'"); if (del_ != null) { del_(id, dollar, euro, rubl); } this.Close(); }
void Display() { dbCon2.eventDysplay += delegate(DataTable db) { type_flat_listwiew.ItemsSource = db.DefaultView; }; dbCon2.SoursData("SELECT name,kvm FROM type_flat" + " WHERE dom_id='6' and porch='" + ComboBox_P.Text + "'" + " and type='" + ComboBox_t.Text + "' and room='" + ComboBox_flat.Text + "'"); TextBlock_kvm.Text = "Всего: " + dbCon2.DisplayReturn("SELECT SUM(kvm) FROM type_flat " + " WHERE dom_id='6' and porch='" + ComboBox_P.Text + "'" + " and type='" + ComboBox_t.Text + "' and room='" + ComboBox_flat.Text + "'") + " кв. м."; }