protected void gvTime_Delete(Object sender, GridViewDeleteEventArgs e) { int projectId = 0; int taskId = 0; int phaseId = 0; int billable = 0; if (e.Keys["Billable"].ToString().Equals("True")) { billable = 1; } taskId = Convert.ToInt16(e.Keys["Task"].ToString()); projectId = Convert.ToInt16(e.Keys["Project"].ToString()); phaseId = Convert.ToInt16(e.Keys["Milestone"].ToString()); StoneTimeBusiness.TimeEntryFunctions ui = new StoneTimeBusiness.TimeEntryFunctions(); ui.DeleteUserTime(projectId, taskId, phaseId, Convert.ToBoolean(billable), SelectedUserId); PopulateDataGrid(); }