Result r1 = new Result();
public void test()
{
for (int i = 0; i < Convert.ToInt32(timeCreditText.Text.ToString()); i++)
{
try
{
r1.dataGridView1.Rows.Add();
r1.dataGridView1.Rows[i].Cells[0].Value = (i + 1).ToString();
}
catch (Exception e)
{
MessageBox.Show("error");
}
}
r1.Show();
}
private void button2_Click(object sender, EventArgs e)
{
test();
}
public partial class Result : Form
{
public Result()
{
InitializeComponent();
}
private void Result_FormClosed(object sender, FormClosedEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void Result_Load(object sender, EventArgs e)
{
}
}