Ejemplo n.º 1
0
        public int Insert(WorkingTimeTableRow row)
        {
            #region SQL
            const string sql = @"
INSERT INTO 
  workingtimes
(
  taskid
  , ymd
  , starttime
  , endtime
)
values
(
  @taskid
  , @ymd
  , @starttime
  , @endtime
)
";
            #endregion

            Connection.Execute(sql, row, Transaction);

            return((int)Connection.LastInsertRowId);
        }
Ejemplo n.º 2
0
        public void Update(WorkingTimeTableRow row)
        {
            #region SQL
            const string sql = @"
UPDATE
  workingtimes
SET
  taskid = @taskid
  , ymd = @ymd
  , starttime = @starttime
  , endtime = @endtime
WHERE
  id = @id
";
            #endregion

            Connection.Execute(sql, row, Transaction);
        }