private void InsertData(Employee_Activities activities) { using var context = new TimeCardEntityModel(); var act = context.Set <Employee_Activities>(); act.Add(activities); context.SaveChanges(); }
public Employee_Activities ReturnEntity() { var ea = new Employee_Activities(); ea.EmployeeID = getEmployeeIDFromComboBox(); ea.ActivityDate = GetDateTimePickerValue(dateTimePicker2); ea.ActivityTime = Convert.ToDouble(getControlText(textBox2)); ea.ActivityComment = getControlText(textBox1); return(ea); }