コード例 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            double totalPrices = 0;

            CashContext csuper = new CashContext(cbxType.SelectedItem.ToString());
            totalPrices = csuper.GetResult(Convert.ToDouble(txtPrice.Text) * Convert.ToDouble(txtNum.Text));

            lbxList.Items.Add(
                "单价:" + txtPrice.Text + " 数量:" + txtNum.Text + " " + cbxType.SelectedItem + " 合计:" + totalPrices.ToString());
            lblResult.Text = total.ToString();
        }
コード例 #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            double totalPrices = 0;

            CashContext csuper = new CashContext(cbxType.SelectedItem.ToString());

            totalPrices = csuper.GetResult(Convert.ToDouble(txtPrice.Text) * Convert.ToDouble(txtNum.Text));

            lbxList.Items.Add(
                "单价:" + txtPrice.Text + " 数量:" + txtNum.Text + " " + cbxType.SelectedItem + " 合计:" + totalPrices.ToString());
            lblResult.Text = total.ToString();
        }