예제 #1
0
파일: Form1.cs 프로젝트: dym0080/DHMS
        private void button1_Click(object sender, EventArgs e)
        {
            CashSuper csuper     = CashFactory.createCashAccept(comboBox1.SelectedItem.ToString());
            double    totalPrice = 0d;

            totalPrice = csuper.acceptCash(Convert.ToDouble(txtPrice.Text) * Convert.ToDouble(txtNum.Text));
            total      = total + totalPrice;
            lbxInfo.Items.Add("单价:" + txtPrice.Text + " 数量:" + txtNum.Text + " 合计:" + totalPrice);
            lblTotal.Text = total.ToString();
        }
예제 #2
0
 public double GetResult(double money)
 {
     return(cs.acceptCash(money));
 }