Home > Net >  Winform data table how to access data in a text box
Winform data table how to access data in a text box

Time:11-20

How to input the data shown in the chart, bosses, genuflect is begged solve

CodePudding user response:

Of new bosses solutions, genuflect is begged

CodePudding user response:

//click the confirm button
Private void button1_Click (object sender, EventArgs e)
{
//textBoxShangPin commodity name input box
//textBoxDanJia unit price input box
//textBoxShuLiang quantity input box

String strje=(double. Parse (textBoxDanJia. Text) * double Parse (textBoxShuLiang. Text)). The ToString ();//get amount
String [] strlist={textBoxDanJia textBoxShangPin. Text, Text, textBoxShuLiang. Text, strje};
DataGridView1. Rows. The Add (strlist);//added to the form
}
  •  Tags:  
  • C #
  • Related