Exemplo n.º 1
0
 public static void MapDataModel(this ViewHourModel HourModel, HourDataModel dataModel)
 {
     HourModel.Id            = dataModel.ID;
     HourModel.Employee_ID   = dataModel.Employee_Id;
     HourModel.StandbyHours  = dataModel.StandbyHours;
     HourModel.IncidentHours = dataModel.IncidentHours;
     HourModel.TimeStamp     = dataModel.TimeStamp;
 }
Exemplo n.º 2
0
        public static void RegisterHour(int employee_id, int standbyHours, int incidentHours)
        {
            HourDataModel data = new HourDataModel
            {

                Employee_Id = employee_id,
                StandbyHours = standbyHours,
                IncidentHours = incidentHours,


            };

            string sql = @"INSERT INTO registeredhours (employee_id, standbyHours, incidentHours )
                            VALUES(@Employee_Id, @StandbyHours, @IncidentHours);";
            SQLDataAccess.SaveData(sql, data);
        }