public int Insert(WorkTaskTableRow row)
        {
            #region sql
            const string sql = @"
insert into worktasks
(
  title 
  , taskcategory 
  , productid
  , clientId 
  , processId 
  , tasksource
)
values
(
  @title 
  , @taskcategory 
  , @productId
  , @clientId 
  , @processId 
  , @tasksource
)
";
            #endregion

            Connection.Execute(sql, row, Transaction);

            return((int)Connection.LastInsertRowId);
        }
        public void Update(WorkTaskTableRow row)
        {
            #region SQL
            const string sql = @"
update worktasks
set
  title = @title
  , taskcategory = @taskcategory 
  , productId = @productId
  , clientId = @clientId
  , processId = @processId
where
  id = @id
";
            #endregion

            Connection.Execute(sql, row, Transaction);
        }
Exemple #3
0
        public int Insert(WorkTaskTableRow row)
        {
            #region sql
            const string sql = @"
insert into worktasks
(
  title 
  , taskcategory 
  , productid
  , clientId 
  , processId 
  , remarks
  , planedStartDateTime 
  , planedEndDateTime 
  , actualStartDateTime 
  , actualEndDateTime 
  , source
  , importkey
  , istemporary
)
values
(
  @title 
  , @taskcategory 
  , @productId
  , @clientId 
  , @processId 
  , @remarks
  , @planedStartDateTime 
  , @planedEndDateTime 
  , @actualStartDateTime 
  , @actualEndDateTime 
  , @source
  , @importkey
  , @istemporary
)
";
            #endregion

            Connection.Execute(sql, row, Transaction);

            return((int)Connection.LastInsertRowId);
        }
Exemple #4
0
        public void Update(WorkTaskTableRow row)
        {
            #region SQL
            const string sql = @"
update worktasks
set
  title = @title
  , taskcategory = @taskcategory 
  , productId = @productId
  , clientId = @clientId
  , processId = @processId
  , remarks = @remarks
  , planedStartDateTime = @planedStartDateTime 
  , planedEndDateTime  = @planedEndDateTime
  , actualStartDateTime = @actualStartDateTime
  , actualEndDateTime = @actualEndDateTime
where
  id = @id
";
            #endregion

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