您的位置:首页 > 其它

获取控件的值并进行窗体间的传递

2015-11-25 08:20 239 查看
public partial class FormTaxStatements : Form
{

public FormTaxStatements()
{
InitializeComponent();
}

private void btnChoice_Click(object sender, EventArgs e)
{
//FormChoiceCustomer frm = new FormChoiceCustomer();
//frm.ShowDialog();
}

private void btnOk_Click(object sender, EventArgs e)
{
string Date = dtpDate.Value.ToString("yyyy-MM-dd");
string CustomerName = txtCustomerName.Text.Trim();
string ProductName = txtProductName.Text.Trim();
string Taxes = txtTaxes.Text.Trim();
string Express = txtExpress.Text.Trim();
string AccountName = txtAccountName.Text.Trim();

//if (this.rbYes.Checked == true)
// {
//     string YesOrNO = rbYes.Text;
// }
//else if ( this.rbNo.Checked == true)
// {
//     string YesOrNO = rbYes.Text;
// }
string YesOrNO = cmbYesOrNO.SelectedItem.ToString();
string PayNo = txtPayNo.Text.ToString();

FormTaxStatementsPrint OrdersPrint = new FormTaxStatementsPrint(Date, CustomerName, ProductName, Taxes, Express, AccountName, YesOrNO, PayNo);
OrdersPrint.Show();
}

private void btnExit_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("确定关闭?", "操作提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
this.Close();
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: