Beispiel #1
0
 private void TxtBoxPurchacePrice_TextChanged(object sender, EventArgs e)
 {
     if (StockCheckInput.CheckInteger(TxtBoxPurchacePrice.Text))
     {
         double purchasePrice;
         double coef;
         purchasePrice      = TxtBoxPurchacePrice.Text == string.Empty ? 0 : double.Parse(TxtBoxPurchacePrice.Text);
         coef               = txtCoef.Text == string.Empty ? 0 : int.Parse(txtCoef.Text);
         lblFinalPrice.Text = (purchasePrice * coef).ToString();
     }
 }
Beispiel #2
0
 private bool CheckIntegerInput()
 {
     return(StockCheckInput.CheckInteger(TxtBoxPurchacePrice.Text) && StockCheckInput.CheckInteger(txtCoef.Text) &&
            StockCheckInput.CheckInteger(textBoxStockMin.Text) && StockCheckInput.CheckInteger(textBoxStockMax.Text));
 }