Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For Each row As DataGridViewRow In ResultGrid.Rows
- 'CREATE PROCEDURE [dbo].[Ins_BonusSalary]
- ' @EmpId int
- ' ,@BonusType Varchar(50)
- ' ,@BonusAmount Numeric(18,2)
- ' ,@SalDate datetime
- ' ,@AddBy Varchar(50)
- ' ,@Jan numeric(18,2)
- ' ,@Feb numeric(18,2)
- ' ,@Mar numeric(18,2)
- ' ,@Apr numeric(18,2)
- ' ,@May numeric(18,2)
- ' ,@Jun numeric(18,2)
- ' ,@Jul numeric(18,2)
- ' ,@Aug numeric(18,2)
- ' ,@Sep numeric(18,2)
- ' ,@Oct numeric(18,2)
- ' ,@Nov numeric(18,2)
- ' ,@Dec numeric(18,2)
- ' ,@Year int
- ' ,@FromDt datetime
- 'AS
- Sqlstring &= "Exec Ins_BonusSalary " & _
- Val(row.Cells("EmpId").Value.ToString) & ",'" & _
- CmbBonusType.Text & "'," & _
- Val(row.Cells("BonusAmt").Value.ToString) & ",'" & _
- Format(ToDate.Value, "yyyy/MM/01") & "'," & _
- UserId & "," & _
- IIf(ResultGrid.Columns.Contains("Jan") = True, Val(row.Cells("Jan").Value.ToString), 0) & "," & _
- IIf(ResultGrid.Columns.Contains("Feb") = True, Val(row.Cells("Feb").Value.ToString), 0) & "," & _
- IIf(ResultGrid.Columns.Contains("Mar") = True, Val(row.Cells("Mar").Value.ToString), 0) & "," & _
- Val(row.Cells("Apr").Value.ToString) & "," & _
- Val(row.Cells("May").Value.ToString) & "," & _
- Val(row.Cells("Jun").Value.ToString) & "," & _
- Val(row.Cells("Jul").Value.ToString) & "," & _
- Val(row.Cells("Aug").Value.ToString) & "," & _
- Val(row.Cells("Sep").Value.ToString) & "," & _
- IIf(ResultGrid.Columns.Contains("Oct") = True, Val(row.Cells("Oct").Value.ToString), 0) & "," & _
- IIf(ResultGrid.Columns.Contains("Nov") = True, Val(row.Cells("Nov").Value.ToString), 0) & "," & _
- IIf(ResultGrid.Columns.Contains("Dec") = True, Val(row.Cells("Dec").Value.ToString), 0) & "," & _
- Val(row.Cells("Year").Value.ToString) & ",'" & _
- Format(FromDate.Value, "yyyy/MM/01") & "'," & vbNewLine
- Next
- IIf(ResultGrid.Columns.Contains("Jan") = True, Val(row.Cells("Jan").Value.ToString), 0) & "," & _
- If(ResultGrid.Columns.Contains("Jan") = True, Val(row.Cells("Jan").Value.ToString), 0) & "," & _
Advertisement
Add Comment
Please, Sign In to add comment