protected void btnSaveHours_Click(object sender, EventArgs e) { Whitfieldcore wc = new Whitfieldcore(); try { Boolean isValidEntry = wc.MaintainScheduledata(Convert.ToInt32(ViewState["twc_project_number"].ToString()), ddlYear.SelectedItem.Value.ToString(), ddlMonth.SelectedItem.Value.ToString() + "(" + ddlYear.SelectedItem.Value.ToString() + ")", ddlWeek.SelectedItem.Value.ToString(), Convert.ToInt32(txtSchhours.Text.Trim()), txtWeeklyComments.Text.Trim(), Convert.ToInt32(lblTotAnnFabHours.Text.Trim()),"0"); if (!isValidEntry) { lblSchError.Text = "Please check the input hours. The scheduled hours should not exceed " + lblTotAnnFabHours.Text.Trim(); } else { lblSchError.Text = ""; } DisplaySchedulingGrid(); } catch (Exception ex) { Response.Write(ex.Message); } }