protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        ClassJob oJob = new ClassJob(Convert.ToInt32(ViewState["JobId"].ToString()));
        double HoursVal;

        if (double.TryParse(this.TxtBudgetHours.Text, out HoursVal) != true)
        {
            //	Problem with the hours figure.

            ShowTimeError("Hours are incorrectly specified!");
        }
        else
        {
            oJob.TaskId = Convert.ToInt32(this.DdlTasks.SelectedValue);
            oJob.JobRef = this.TxtJobRef.Text;
            oJob.Description = this.TxtDescription.Text;
            oJob.BudgetHours = Convert.ToDouble(this.TxtBudgetHours.Text);
            oJob.Active = this.ChkActive.Checked;
            oJob.Save(Convert.ToInt32(ViewState["JobId"].ToString()));

            ShowJobs(0);
            ShowJob(0);
            ViewState["JobId"] = "0";
            this.BtnSubmit.Text = "Submit";
        }
    }
    protected void BtnUpdateActive_Click(object sender, System.EventArgs e)
    {
        for (Int32 RowNo = 0; RowNo < this.GridJob.Rows.Count; RowNo++)
        {
            GridViewRow oRow = this.GridJob.Rows[RowNo];
            Label oLbl = (Label)oRow.FindControl("LblJobId");

            if (oLbl != null)
            {
                CheckBox oChk = (CheckBox)oRow.FindControl("ChkActive");

                if (oChk != null)
                {
                    ClassJob oJob = new ClassJob(Convert.ToInt32(oLbl.Text));

                    oJob.Active = oChk.Checked;
                    oJob.Save(oJob.JobId);
                }
            }
        }
    }