 |
|
Error ปุ่มบันทึก เวลาลบข้อมูลออกแล้วกดบันทึกขึ้นError |
|
 |
|
|
 |
 |
|
เอาเป็นโค๊ดมาดีกว่าครับคนอื่นเขาจะได้มาช่วยแก้ใข
ดูจากการอธิบายของคุณแล้วมันตีความหมายไม่ออกอ่ะครับ
|
 |
 |
 |
 |
Date :
2012-01-29 01:57:13 |
By :
worajito |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatabaseDataSet.Product' table. You can move, or remove it, as needed.
Me.ProductTableAdapter.Fill(Me.DatabaseDataSet.Product)
'TODO: This line of code loads data into the 'DatabaseDataSet.Product' table. You can move, or remove it, as needed.
Me.ProductTableAdapter.Fill(Me.DatabaseDataSet.Product)
ToolStripStatusLabel2.Text = Application.ProductVersion
Timer1.Start()
Form6.RichTextBox1.Text = (Form6.RichTextBox1.Text & "[" & (TimeOfDay) & "]" & "เริ่มการทำงาน" + vbCr + vbLf & "[" & (TimeOfDay) & "]" & "เพิ่มและแก้ไขสินค้า" + vbCr + vbLf)
End Sub
Private Sub Form5_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.WindowState = FormWindowState.Maximized Then
ProductDataGridView.Size = New Size(1024, 665)
ProductDataGridView.Location = New Point(0, 25)
ElseIf Me.WindowState = FormWindowState.Normal Then
ProductDataGridView.Size = New Size(800, 527)
ProductDataGridView.Location = New Point(0, 25)
End If
End Sub
Private Sub Form5_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Validate()
Me.ProductBindingSource.EndEdit()
[font=Verdana] Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)[/font]
Form6.RichTextBox1.Text = (Form6.RichTextBox1.Text & "[" & (TimeOfDay) & "]" & "สิ้นสุดการทำงาน" + vbCr + vbLf & "[" & (TimeOfDay) & "]" & "จากการเพิ่มและแก้ไขสินค้า" + vbCr + vbLf)
End Sub
Private Sub ToolStripLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form6.RichTextBox1.Text = (Form6.RichTextBox1.Text & "[" & (TimeOfDay) & "]" & "ใช้คำสั่งรีโหลด" + vbCr + vbLf)
Me.Close()
SplashScreen2.Show()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Text = "เพิ่มและแก้ไขรายการสินค้า" & " Version " & Application.ProductVersion & " " & "ขณะนี้เวลา : " & TimeOfDay
End Sub
Private Sub ProductBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductBindingNavigatorSaveItem.Click
Me.Validate()
Me.ProductBindingSource.EndEdit()
[font=Verdana]Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)[/font]
End Sub
End Class
นี้ครับโค้ด

ภาพการใช้การใส่เมนู
|
ประวัติการแก้ไข 2012-01-29 08:58:32 2012-01-29 09:00:47
 |
 |
 |
 |
Date :
2012-01-29 08:57:09 |
By :
manman12307 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|