Download self-help assessment and training support system for

Transcript
78
}
if (i1 + i2 > 13)
{
float total = i1 + i2;
float deg1 = (i1 / total) * 100;
float deg2 = (i2 / total) * 100;
float deg22 = 5 * (int)Math.Round(deg2 / 5.15);
dressingfrequency.Text = deg22.ToString();
cmd.CommandText = "update dressingassessment set frequency='" +
dressingfrequency.Text + "' where (Activity='" + dressingdescription.Text + "')";
cmd.Connection = database;
database.Open();
cmd.ExecuteNonQuery();
database.Close();
MessageBox.Show("You have finish the assessment. You can check the
result at the 'Report' section.", "Well Done",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
assessmentno.Visible = false;
assessmentyes.Visible = false;
assessmentask.Visible = false;
ask2.Visible = true;
}
}
if (eatingrb.Checked)
{
eatingyesorno.Text = "No";
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "update eatingassessment set yesorno='" +
eatingyesorno.Text + "' where (Activity='" + eatingdescription.Text + "')";
cmd.Connection = database;
database.Open();
cmd.ExecuteNonQuery();
database.Close();
this.eatingassessmentBindingSource.MoveNext();
if (i1 + i2 > 32)
{
float total = i1 + i2;
float deg1 = (i1 / total) * 100;
float deg2 = (i2 / total) * 100;
float deg11 = 5 * (int)Math.Round(deg1 / 5.15);
eatingfrequency.Text = deg11.ToString();
cmd.CommandText = "update eatingassessment set frequency='" +
eatingfrequency.Text + "' where (Activity='" + eatingdescription.Text + "')";
cmd.Connection = database;
database.Open();
cmd.ExecuteNonQuery();
database.Close();
}
if (i1 + i2 > 33)
{