private void CB_Empl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (TB_Quantity.Text != "") { using (var DB = new SkladModel()) { TB_Result.Text = DB.ResultCount(Convert.ToInt32(CB_Product.SelectedValue), Convert.ToInt32(TB_Quantity.Text)).ToString(); } } }
private void TB_Quantity_TextChanged(object sender, TextChangedEventArgs e) { if (CB_Product.SelectedValue != null) { using (var DB = new SkladModel()) { decimal count = 0; count = count + DB.ResultCount(Convert.ToInt32(CB_Product.SelectedValue), Convert.ToInt32(TB_Quantity.Text)); TB_Result.Text = Convert.ToString(count); } } }