i have to create a programme that will handle complaints i have to track how many times i complete the process, this means i will need a count that increases when i return to the first form in the process however the number always resets when the first form is opened
runNum is set to a public int this is the code i have for entering data ito the form automatically then increaseing the runmber before opening the next form so far:
private void autoFill()
{
TitlePage titlepage = new TitlePage();
if (titlepage.getRun() == true)
{
int priority = runNum % 4;
if (priority == 0)
priority = 2;
txtDate.Text = DateTime.Today.ToString("dd/MM/yyyy");
txtRef.Text = (100 + runNum).ToString();
txtPriority.Text = priority.ToString();
txtCustName.Text = firstNames[runNum] + " " + secondNames[runNum];
txtCustAddress.Text = (runNum + 5).ToString() + " " + Address1[runNum] + " " + Address2[(runNum % 7)];
txtCustEmail.Text = firstNames[runNum] + secondNames[runNum] + "@" + ISP[(runNum % 10)] + "." + Suff[(runNum % 10)];
txtCustTel.Text = TelNo[runNum];
//TBD- fill this in with actual data
rtbComplaint.Text = "Complaint type, Sevarity, soultion exsiting, employee who dealt with complaint, Date";
rtbComplaint.Enabled = false;
txtPriority.Enabled = false;
txtDate.Enabled = false;
txtRef.Enabled = false;
txtCustName.Enabled = false;
txtCustName.Enabled = false;
txtCustEmail.Enabled = false;
txtCustAddress.Enabled = false;
txtCustTel.Enabled = false;
if (runNum % 2 == 0)
{
rdoNo.Checked = true;
enter code here }
else
{
rdoYes.Checked = true;
}
getTimer();
runNum++;
}
}