注册 登录
编程论坛 C# 论坛

两个tbx.txt相乘问题

gg100200 发布于 2014-03-13 14:35, 502 次点击
public double Multiplication(double price,double weight)
        {
            return price * weight;
        }
            public  void  Multiplication_1(object sender,EventArgs e)
            {
                string str单价 = tbx产品单价.Text;
                string str重量 = tbx产品重量.Text;
                if(str单价!="")
                {
                    try
                    {
                        tbx产品总价.Text = Multiplication(double.Parse(str单价),double.Parse(str重量)).ToString();


                    }
                    catch
                    {
                        MessageBox.Show("请输入正确的数字!");
                    
                    
                    }
                }

            }

[ 本帖最后由 gg100200 于 2014-3-13 14:59 编辑 ]
3 回复
#2
wangnannan2014-03-13 16:29
你想问啥
#3
gg1002002014-03-13 17:50
回复 楼主 gg100200
两个tbx相乘返回到tbx总价.txt
#4
gg1002002014-03-13 17:51
回复 楼主 gg100200
只有本站会员才能查看附件,请 登录
1