Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE AttendanceRoll
- SET ErrorFlag = 0
- WHERE ContractID = @ContractID
- AND DATEPART(month,AttendanceDate) = DATEPART(month,@Month_Beginning)
- AND DATEPART(year,AttendanceDate) = DATEPART(year,@Month_Beginning)
- INSERT INTO AttendanceRoll
- (AttendanceDate, ContractID, PersonID,
- StartTime,
- EndTime,
- Hours, AbsenceReason,
- UpdateCount, SplitShiftID, ModifiedBy, ModifiedDate)
- SELECT
- @P33, @P34, @P35,
- CONVERT(datetime,REPLACE( @P36, '.', ':')),
- CONVERT(datetime,REPLACE( @P37, '.', ':')),
- @P38, @P39,
- @P40, 1, @P41, GETDATE()
- for (;;) {
- try {
- using (var t = BeginTransaction()) {
- DoTheCall();
- t.Commit();
- return;
- }
- }
- catch (SqlException ex) {
- if (ex.Number != 1205 && ex.Number != 601 && ex.Number != 605)
- throw;
- }
- }
Add Comment
Please, Sign In to add comment