protected void TimeEntry_Repeater_Command(object sender, RepeaterCommandEventArgs e) { int TimeEntryID = Int32.Parse(((HiddenField)((Repeater)sender).Parent.FindControl("TimeEntryID")).Value); int NewBillingPeriodID = Int32.Parse(e.CommandArgument.ToString()); new TFS.Intranet.Data.Billing.TimeEntryController().MoveToTimesheet(TimeEntryID, NewBillingPeriodID, _timesheetid); TimeEntryGridView.DataBind(); }
protected void inserting_timeentry(object sender, EventArgs e) { if (string.IsNullOrEmpty(tbxDay.Text)) { return; } DateTime dayDateTime; if (!DateTime.TryParse(tbxDay.Text, out dayDateTime)) { return; } int id = Int32.Parse(Request.Params["id"]); int __Day = dayDateTime.Day; String TimeIn = TimeInHours.SelectedValue + ":" + TimeInMinutes.SelectedValue + ":00"; String TimeOut = TimeOutHours.SelectedValue + ":" + TimeOutMinutes.SelectedValue + ":00"; String NotesText = Notes.Text; (new TFS.Intranet.Data.Billing.TimeEntryController()).Insert(id, __Day, TimeIn, TimeOut, NotesText, false, null, null, null, null); TimeEntryGridView.DataBind(); }