Ejemplo n.º 1
0
        private void InsertData(Employee_Activities activities)
        {
            using var context = new TimeCardEntityModel();
            var act = context.Set <Employee_Activities>();

            act.Add(activities);
            context.SaveChanges();
        }
Ejemplo n.º 2
0
        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);
        }