public void Post(TimeSheet timesheet) { TimeManagementEntities context = new TimeManagementEntities(); // TimeSheet temp = new TimeSheet(); timesheet.Notes = HttpUtility.HtmlEncode(timesheet.Notes); //timesheet.DateOfSheet = timesheet.DateOfSheet; //timesheet.TotalTime = timesheet.TotalTime; //timesheet.CreatedDate = timesheet.CreatedDate; repository.Add(timesheet); }
private void createRecordBtn_Click(object sender, EventArgs e) { var record = new Record(); var dialog = new RecordDialog(record, false, _repo.GetAllTypes()); var result = dialog.ShowDialog(); if (result == DialogResult.OK) { _repo.Add(dialog.Item); reloadRecords(); } }