..
This commit is contained in:
@@ -259,8 +259,20 @@
|
||||
Private Sub AddNewDataRow_bunbae(ByVal sender As Object, ByVal e As System.Data.DataTableNewRowEventArgs)
|
||||
e.Row.Item("code") = GetMaxCode(DSET1.tbl_bunbae)
|
||||
e.Row.Item("설명") = "신규데이터"
|
||||
e.Row.Item("sortkey") = GetNewSortKey()
|
||||
End Sub
|
||||
|
||||
Private Function GetNewSortKey() As String
|
||||
AddDebug("GetNewSortKey")
|
||||
|
||||
Dim drows() As DS.tbl_bunbaeRow = DSET1.tbl_bunbae.Select("code <> '0'", "sortkey desc")
|
||||
If drows.Length < 1 Then Return 1
|
||||
Dim Dr As DS.tbl_bunbaeRow = drows(0)
|
||||
Dim maxsortkey As Integer = Dr.sortkey
|
||||
Return maxsortkey + 1
|
||||
|
||||
End Function
|
||||
|
||||
#Region "제어버튼"
|
||||
Private Sub ToolStripButton48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_add.Click
|
||||
If Not EndEdit(Me.bs) Then Return
|
||||
|
||||
Reference in New Issue
Block a user