Generated by Foxit PDF Creator Foxit Software For evaluation only. ภาคผนวก ก

Size: px
Start display at page:

Download "Generated by Foxit PDF Creator Foxit Software For evaluation only. ภาคผนวก ก"

Transcription

1 ภาคผนวก ก

2 โปรแกรม SQL Server โปรแกรม SQL Server เป นโปรแกรมจ ดการฐานข อม ล ท จะการจ ดเก บข อม ลต างๆลงใน ตาราง เพ อช วยในการจ ดเก บข อม ลได ง ายข นและสามารถน าข อม ลข อม ลออกมาได อย างรวดเร ว ข นตอนการต ดต ง โปรแกรม SQL Sever 1. ท าการต ดต ง SQL Server ได ท CD-ROM เม อท าการใส แผ น CD โปรแกรม SQL Sever ก จะม ฟอร มข นให เราท าการต ดต งด งร ปภาพ เม อฟอร มโชว ให ท าการต ดต ง SQL Server 2000 ก ท าการคล กท SQL Server 2000 Components ด งร ปภาพท ให ด

3 2. ท าการคล กตรงท Install Database Server ต อไปต งร ปภาพข างล าง ท าการคล ก Next เพ อท าการต ดต ง SQL Server

4 แล วท าการคล ก Next ไปเร อยๆ จนกว าจะเสร จก ถ อว าการต ดต งเสร จสมบร ณ ในการ ต ดต งฐานข อม ลรองการระบบงานท ท าน น เม อท าการต ดต งเร ยบร อยแล วเราก เข าไปด ท Start Menu ด งร ปภาพข างล าง

5 เม อท าการคล กเข าโปรแกรมก จะม หน าตาของโปรแกรม SQL Serve ด งร ปข างล าง เม อเข าส โปรแกรมแล วเราท าการน าฐานข อม ลท เราสร างไว มาท าการต ดต งลงบน โปรแกรมท เราต ดต งไว แล วก จะม ข นตอนด งภาพข างล างน

6 ต อไป จากร ปข างล างน ก จะเป นการเล อกฐานข อม ลท ต องการต ดต งลงบนโปรแกรม SQL Server เม อท าการเล อกฐานข อม ลแล วก ท าคล กตรงค าว า OK ก ถ อเราต ดต งฐานข อม ลลง ในโปรแกรม SQL Server เร ยบร อยแล วก จะปรากฤฐานข อม ลของเราท ต ดต งให เห นในร ปภาพ ถ ดไป

7

8 ภาคผนวก ข ฟอร ม login Option Explicit Dim Conn As New ADODB.Connection Dim rstmp As New ADODB.Recordset Dim invalid As Integer Dim rstoaffect As Long Dim sqltmp As String Dim strlevel As String Private Sub Form_Load() With Conn Source Code Visul Basic Studio 6.0

9 txtusername.tooltiptext = " ÃسÒãÊèª èí¼ùéãªéãðºº" txtpassword.tooltiptext = " ÃسÒãªéÃËÑʼèÒ¹" If.State = adstateopen Then.Close.ConnectionString = strconn.commandtimeout = 90.Open invalid = 0 FLogint.WindowState = 0 Label4.Caption = Format(Now, "dd/mm/yyyy") Label5.Caption = Format(Time, "long time") Private Sub userlogin() ' Dim Name As String sqltmp = "SELECT * FROM A_Employee" sqltmp = sqltmp & " WHERE (Username='" & txtusername.text & "')" sqltmp = sqltmp & " AND (password='" & txtpassword.text & "') " With rstmp If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqltmp If.RecordCount <> 0 Then strlevel =.Fields("Username").Value nameuser2 =.Fields("Username").Value MDIMain.Show Name = txtusername.text MsgBox ("ÂÔ¹ Õµé͹ÃѺ س " & Name & " " & "à éòêùèã𺺠«éí - ÒÂÊÔ¹ éò"), vbokonly, "@[***&^& à éòêùè ÒÃãªé Ò¹ Í Ãкº &^&***]@"

10 txtusername = "" txtpassword = "" 'If strlevel = 1 Then ' invalid = invalid + 0 Main.Hide FLogint.Hide Else If txtusername.text = "" Then MsgBox " سÂÑ äáèä éãêè User Name", vbcritical, "¼Ô ¾ÅÒ " txtusername = "" txtpassword = "" Else If txtpassword.text = "" Then MsgBox " سÂÑ äáèä éãêè Password", vbcritical, "¼Ô ¾ÅÒ " txtusername = "" txtpassword = "" Exit Sub txtpassword.setfocus MsgBox " سãÊèÃËÑʼèÒ¹äÁè Ù µéí ", vbokonly + vbcritical, "¼Å ÒõÃÇ Êͺ" ' txtusername = "" txtpassword = "" invalid = invalid + 1 If invalid = 3 Then Call updateinvaliduser If rstoaffect <> 0 Then MsgBox " سãÊèÃËÑʼèÒ¹¼Ô 3 ÃÑé ÃØ³ÒµÔ µèí¼ùé ÙáÅÃкº", vbokonly + vbcritical, "¼Ô ¾ÅÒ " ' txtusername.text = "" txtpassword.setfocus txtpassword.text = ""

11 Private Sub updateinvaliduser() Dim sqlupdate As String Dim comupdate As New ADODB.Command With comupdate.commandtype = adcmdtext.commandtext = sqlupdate.execute rstoaffect Private Sub ImgCancel_Click() If MsgBox(" èò¹µéí ÒÃàÅÔ Ò¹Ëà ÍäÁè? ", vbinformation + vbyesno, "â»ã  ¹Âѹ") = vbyes Then End Private Sub ImgOK_Click() Call userlogin ฟอร ม เมน หล ก Private Sub adduser_click() frmadduser.show frmadduser.refresh frmadduser.setfocus Private Sub cheksale_click() frmcheksale.show

12 frmcheksale.refresh frmcheksale.setfocus Private Sub ck_click() Cheack.Show Private Sub Count_Click() Counts.Show Private Sub Cus_S_Click() frmcustomer.show Private Sub Ex_Click() If MsgBox(" سµéÍ ÒÃÍÍ Ò â»ãá ÃÁ¹Õé ãªèëã ÍäÁè? ", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then End Private Sub e2_click() P_monnyemp.Show Private Sub e4_click() frmemployee.show Private Sub Exi_Click() If MsgBox(" سµéÍ ÒÃÍÍ Ò â»ãá ÃÁ¹Õé ãªèëã ÍäÁè? ", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then End

13 Private Sub l05_click() Cheack.Show Private Sub MDIForm_Load() If chuser = "User" Then mas.visible = False Private Sub MenuRptProinStock_Click() Load Form9 Form9.Show Private Sub NameCus_Click() frmnamecus.show Private Sub Or_Click() Orders.Show Private Sub OrderofDay_Click() Load Form10 Form10.Show Private Sub OrdersOfMonth_Click() 'LoadForm14 Form14.Show Private Sub Paid_Click() Paids.Show Private Sub PaidDay_Click() 'LoadForm16 Form16.Show Private Sub PaidMonth_Click() 'LoadForm17 Generated by Foxit PDF Creator Foxit Software

14 Form17.Show Private Sub Pro_Click() product.show Private Sub RDE_Click() Load CryProDate CryProDate.Show Private Sub Re_Click() Load receives receives.show Private Sub RNP_Click() Load CryNoPaid CryNoPaid.Show Private Sub RNR_Click() Load CryNoReceives CryNoReceives.Show Private Sub rec1_click() P_remonny.Show Private Sub ReceiveDay_Click() 'LoadForm12 Form12.Show Private Sub ReceiveMonth_Click()

15 'LoadForm15 Form15.Show Private Sub Ro_Click() ''Load CryOrderAll ''CryOrderAll.Show 'Load Form4 'Form4.Show Private Sub RPB_Click() Load CryProBro CryProBro.Show 'Private Sub RPD_Click() ''Load Form5 ''Form5.Show ' ' 'Private Sub Rr_Click() ''Load Form3 ''Form3.Show ' Private Sub Rs_Click() Load CrySales CrySales.Show Private Sub RSP_Click() Load CryStockPro CryStockPro.Show

16 Private Sub RST_Click() Load Form8 Form8.Show Private Sub Sa_Click() Sales.Show Private Sub ST_Click() Stock_pro.Show Private Sub ShowRptProInSup_Click() Form20.Show Private Sub showrptsup_click() Form18.Show Private Sub Showsale1_Click() 'Load Form11 Form11.Show Private Sub Showsale2_Click() Form13.Show Private Sub Sup_Click() Supplier.Show Private Sub Timer1_Timer()

17 Static Text As String Static intc As Integer On Error Resume Next Text = Space(40) & "ÂÔ¹ Õµé͹ÃѺà éòêùè Ãкº«éÍ - ºÒ ÃéÒ¹ÊÔ Ô¹Ñ¹ ì ÒÃä éò ¾ÃéÍÁÃѺàËÁÒµÔ µñé ÍØ» óìä éò Ñ ËÇÑ ÁËÒÊÒà ÒÁ" Caption = Mid(Text, intc, 40) intc = intc + 1 If intc = Len(Text) Then intc = 0 Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Key Case Is = "tool_frmproduct" Me.Hide product.show Case Is = "tool_frmsale" Me.Hide Sales.Show Case Is = "tool_frmorder" Me.Hide Orders.Show Case Is = "tool_frmreproduct" Me.Hide receives.show Case Is = "tool_frmpayment" Me.Hide Paids.Show Case Is = "w_wok" Me.Hide w_work.show Case Is = "tool_frmsupplier" Me.Hide Supplier.Show Case Is = "tool_frmcusnew" Me.Hide

18 frmcustomer.show Case Is = "emplo" Me.Hide frmemployee.show Case Is = "tool_frmend" If MsgBox(" سµéÍ ÒÃÍÍ Ò â»ãá ÃÁ¹Õé ãªèëã ÍäÁè? ", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then End End Select Private Sub Type_Click() ProType.Show Private Sub udpvat_click() Form6.Show Form6.Refresh Form6.SetFocus Private Sub w2_click() w_work.show Private Sub w3_click() workemp.show Private Sub w4_click() w_frmb.show Private Sub w5_click()

19 w_frmreceives.show Private Sub w6_click() w_frmorder.show Private Sub w7_click() w_frmproducts.show Private Sub éíáùå»ãðàà ÅÙ éò_click() frmcustometype.show ฟอร มส นค า Option Explicit Dim actionflag As String Dim cmdproduct As ADODB.Command Dim rsproduct As New ADODB.Recordset Dim rspro_type As New ADODB.Recordset Dim rscount As New ADODB.Recordset Dim rscustomerhide As New ADODB.Recordset Dim i As Integer Dim AllRecord As String Dim currentrow As Integer Private Sub Showproduct() Dim sqlproduct As String sqlproduct = "SELECT * FROM Products ORDER BY pro_id" With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Else.MoveLast AllRecord =.Fields("pro_id").Value i = Val(Mid(AllRecord, 3)) txtpro_id.text = "P" & Format(i + 1, " ")

20 txtpro_id.text = "P" & " " Private Sub ShowtrueEnabled() Me.txtpro_id.Enabled = False Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = True Me.txtpro_name.BackColor = &H Me.txtPro_cost.Enabled = True Me.txtPro_cost.BackColor = &H Me.txtcost.Enabled = True Me.txtcost.BackColor = &H Me.txtpro_price.Enabled = True Me.txtpro_price.BackColor = &H Me.txtpro_property.Enabled = True Me.txtpro_property.BackColor = &H Me.txtpro_instock.Enabled = True Me.txtpro_instock.BackColor = &H Me.txtpro_wetorder.Enabled = True Me.txtpro_wetorder.BackColor = &H Me.txttype_id.Enabled = False Me.txttype_id.BackColor = &H Me.txtcount_id.Enabled = False Me.txtcount_id.BackColor = &H Private Sub ClearAllData() Me.txtpro_id.Text = "" Me.txtpro_name.Text = "" Me.txtpro_price.Text = "0.00" Me.txtpro_property.Text = "" Me.txtpro_instock.Text = "" Me.txtpro_wetorder.Text = "" Me.sup_id.Text = "" Me.sup_name.Text = "" Me.txttype_id.Text = "" Me.txtcount_id.Text = "" Me.txttype_name.Text = "" Me.txtcount_name.Text = "" Me.txtPro_cost.Text = "0.00" Me.txtcost.Text = "0.00" Private Sub DataTrueEnabled() Me.txtpro_id.Enabled = False

21 Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = True Me.txtpro_name.BackColor = &H Me.txtPro_cost.Enabled = True Me.txtPro_cost.BackColor = &H Me.txtcost.Enabled = True Me.txtcost.BackColor = &H Me.txtpro_price.Enabled = True Me.txtpro_price.BackColor = &H Me.txtpro_property.Enabled = True Me.txtpro_property.BackColor = &H Me.txtpro_instock.Enabled = True Me.txtpro_instock.BackColor = &H Me.txtpro_wetorder.Enabled = True Me.txtpro_wetorder.BackColor = &H Me.txttype_id.Enabled = True Me.txttype_id.BackColor = &H Me.txtcount_id.Enabled = True Me.txtcount_id.BackColor = &H Private Sub AddData() Dim sqlsave As String Dim comsave As New ADODB.Command sqlsave = "Insert into Products(Pro_id,Pro_name,Pro_price,Pro_Property,Pro_instock,Pro_wetorder,Type_i d,count_id)" sqlsave = sqlsave & "Values('" & CStr(txtpro_id.Text) & "', " sqlsave = sqlsave & "'" & CStr(txtpro_name.Text) & "'," sqlsave = sqlsave & "'" & CStr(txtpro_price.Text) & "'," sqlsave = sqlsave & "'" & CStr(txtpro_property.Text) & "'," sqlsave = sqlsave & "'" & CStr(txtpro_instock.Text) & "'," sqlsave = sqlsave & "'" & CStr(txtpro_wetorder.Text) & "'," sqlsave = sqlsave & "'" & CStr(txttype_id.Text) & "'," sqlsave = sqlsave & "'" & CStr(txtcount_id.Text) & "') " With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute sqlsave = "insert into Supplier_pro(Pro_id,Sup_id,Pro_cost,cost)" sqlsave = sqlsave & "values('" & CStr(txtpro_id.Text) & "', " sqlsave = sqlsave & "'" & CStr(sup_id.Text) & "', " sqlsave = sqlsave & "'" & CDbl(txtPro_cost.Text) & "',"

22 sqlsave = sqlsave & "'" & CDbl(txtcost.Text) & "') " With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute If MsgBox(" سµéÍ ÒÃà¾ÔèÁ éíáùåãªèëã ÍäÁè? ", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then MsgBox " ºÑ¹ Ö éíáùåå Ò¹ éíáùåàãõâ¹ãéíâáåéç ", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" Form_Load Else Exit Sub Private Sub EditData() Dim sqlsave As String Dim cmdproduct As New ADODB.Command sqlsave = "Update products SET Pro_id = '" & CStr(txtpro_id.Text) & "',Pro_name = '" & CStr(txtpro_name.Text) & "', Pro_price = '" & CStr(txtpro_price.Text) & "', pro_property = '" & CStr(txtpro_property.Text) & "',Pro_instock = '" & CStr(txtpro_instock.Text) & "', Pro_wetorder = '" & CStr(txtpro_wetorder.Text) & "', Type_id = '" & CStr(txttype_id.Text) & "',Count_id = '" & CStr(txtcount_id.Text) & "'" sqlsave = sqlsave & "where Pro_id = '" & CStr(txtpro_id.Text) & "'" With cmdproduct.commandtype = adcmdtext.commandtext = sqlsave.execute Dim cmdsupplier As New ADODB.Command sqlsave = "Update Supplier_pro SET sup_id = '" & CStr(sup_id.Text) & "', pro_id = '" & CStr(txtpro_id.Text) & "',pro_cost = '" & CStr(txtPro_cost.Text) & "',cost = '" & CDbl(txtcost.Text) & "'" sqlsave = sqlsave & "where Pro_id = '" & CStr(txtpro_id.Text) & "' and sup_id = '" & CStr(sup_id.Text) & "'" With cmdsupplier.commandtype = adcmdtext.commandtext = sqlsave.execute

23 If MsgBox(" سµéÍ ÒÃá éä éíáùåãªèëã ÍäÁè? ", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then MsgBox " ºÑ¹ Ö éíáùåå Ò¹ éíáùåàãõâ¹ãéíâáåéç ", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" Form_Load Else Exit Sub Private Sub DataFalseEnabled() Me.txtpro_id.Enabled = False Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = False Me.txtpro_name.BackColor = &H Me.txtPro_cost.Enabled = False Me.txtPro_cost.BackColor = &H Me.txtcost.Enabled = False Me.txtcost.BackColor = &H Me.txtpro_price.Enabled = False Me.txtpro_price.BackColor = &H Me.txtpro_property.Enabled = False Me.txtpro_property.BackColor = &H Me.txtpro_instock.Enabled = False Me.txtpro_instock.BackColor = &H Me.txtpro_wetorder.Enabled = False Me.txtpro_wetorder.BackColor = &H Me.txttype_id.Enabled = False Me.txttype_id.BackColor = &H Me.txtcount_id.Enabled = False Me.txtcount_id.BackColor = &H Me.txtcount_name.Enabled = False Me.txtcount_name.BackColor = &H Me.txttype_name.Enabled = False Me.txttype_name.BackColor = &H Private Sub cmd_sub_click() Dim sqlproduct As String sqlproduct = "SELECT * FROM Suppilers" With rsproduct If.State = adstateopen Then.Close

24 .CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgsub.datasource = rsproduct mfgsub.visible = True Private Sub cmdadd_click() actionflag = "ADD" ClearAllData Showproduct ShowtrueEnabled Command1.Enabled = True Me.cmdFind.Enabled = True Me.cmdFind1.Enabled = True Me.txtpro_name.SetFocus Me.cmdsave.Enabled = True Me.cmdAdd.Enabled = False Me.cmddelete.Enabled = False Me.cmdedit.Enabled = False txtpro_instock.text = "0" ' Me.mfgproduct.Enabled = False Private Sub Cmdback_Click() Call endfrm Private Sub cmddelete_click() Dim sqldelete As String Dim strsql As String If MsgBox(" سµéÍ Òà Õè Ðź éíáùåëã ÍäÁè", vbquestion + vbyesno, "ź éíáùå") = vbyes Then strsql = "DELETE FROM products WHERE (pro_id= '" & txtpro_id.text & "')" strsql = "DELETE FROM products_de WHERE (pro_id= '" & txtpro_id.text & "')" strsql = "DELETE FROM supplier_pro WHERE (sup_id= '" & sup_id.text & "')and(pro_id ='" & txtpro_id.text & "')" Set rsproduct = Conn.Execute(strSQL) MsgBox "ź éíáùåàãõâºãéíâáåéç", vbokonly + vbinformation, "¼Å ÒõÃÇ Êͺ" txtpro_id.text = "" txtpro_name.text = "" txtpro_cost.text = "0.00" txtcost.text = "0.00"

25 txtpro_price.text = "0.00" txtpro_property.text = "" sup_id.text = "" sup_name.text = "" txtpro_instock.text = "" txtpro_wetorder.text = "" txttype_id.text = "" txttype_name.text = "" txtcount_id.text = "" txtcount_name.text = "" Else MsgBox "äáèµéí ÒÃź éíáùåª èí " & txtpro_name.text & "", vbokonly + vbinformation, "¼Å ÒõÃÇ Êͺ " Me.cmdAdd.Enabled = True Me.cmddelete.Enabled = False Me.cmdsave.Enabled = False Me.cmdedit.Enabled = False ' Me.cmdEnd.Enabled = True ' Me.mfgproduct.Enabled = True Form_Load Private Sub cmdedit_click() actionflag = "EDIT" DataTrueEnabled ' ' Me.txtcount_name.Visible = False Me.txttype_name.Visible = False Me.txtpro_id.Enabled = False Me.txttype_id.Enabled = False Me.txtcount_id.Enabled = False Me.cmdFind.Enabled = True Me.cmdFind1.Enabled = True Me.txtpro_name.SetFocus Me.cmdsave.Enabled = True Me.cmdAdd.Enabled = False Me.cmddelete.Enabled = False Me.cmdedit.Enabled = False ' Me.mfgproduct.Enabled = False Me.Command1.Enabled = True Private Sub cmdfind_click() frmfindtypepro.show 'Me.txttype_name.Visible = True Private Sub cmdfind1_click() frmfindcount.show 'Me.txtcount_name.Visible = True

26 Private Sub cmdsave_click() If Me.txtpro_id.Text = "" Then MsgBox " Ãسһé͹ÃËÑÊÊÔ¹ éò éçâ ÃѺ", vbokonly + vbexclamation, "¼Å ÒõÃÇ " Me.txtpro_id.SetFocus Exit Sub If txtpro_name.text = "" Then MsgBox " Ãسһé͹ª èíêô¹ éò éçâ ÃѺ", vbokonly + vbexclamation, "¼Å ÒõÃÇ " Me.txtpro_name.SetFocus Exit Sub If txtpro_cost.text = "0.00" Then MsgBox " سÂÑ äáè»éí¹µé¹ Ø¹ÊÔ¹ éò ÃѺ", vbokonly + vbcritical, " éí¼ô ¾ÅÒ " txtpro_cost.setfocus Exit Sub If txtpro_price.text = "0.00" Then MsgBox " سÂÑ äáè»éí¹ãò ÒÊÔ¹ éò ÃѺ", vbokonly + vbcritical, " éí¼ô ¾ÅÒ " txtpro_price.setfocus Exit Sub ' If txtpro_instock.text = "" Then ' MsgBox " سÂÑ äáè»éí¹ Ó¹Ç¹ÊÔ¹ éòã¹êµêí ÃѺ", vbokonly + vbcritical, " éí¼ô ¾ÅÒ " ' txtpro_instock.setfocus ' ' Exit Sub If txtpro_wetorder.text = "" Then MsgBox " سÂÑ äáè»éí¹ Ø ÊÑè «éíêô¹ éò ÃѺ", vbokonly + vbcritical, " éí¼ô ¾ÅÒ " txtpro_wetorder.setfocus Exit Sub Select Case actionflag Case "ADD" AddData Case "EDIT" EditData End Select ClearAllData DataFalseEnabled Me.cmdsave.Enabled = False

27 ' Me.cmdAdd.Enabled = True Me.cmddelete.Enabled = False Me.cmdedit.Enabled = False sup_name.text = "" sup_id.text = "" 'Me.cmdEnd.Enabled = True Me.mfgproduct.Enabled = False Form_Load Private Sub Command1_Click() find_sup.show Private Sub Command2_Click() product.hide Private Sub Form_Load() DataFalseEnabled On Error GoTo ErrorData Set Conn = New ADODB.Connection Conn.ConnectionString = strconn Conn.Open Dim sqlproduct As String sqlproduct = "Select type_name,type_id From type_pro" With rspro_type If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct Dim sqlcount As String sqlcount = "Select count_name, count_id From counts" With rscount If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcount sqlproduct = "SELECT products.pro_id,products.pro_name,products.pro_price,products.pro_property,product s.pro_instock,products.pro_wetorder,products.type_id,type_pro.type_name,products.count_id,counts.count_name,supplier_pro.pro_cost,supplier_pro.sup_id,suppliers.s up_name,supplier_pro.cost From products,type_pro,counts,supplier_pro,suppliers where products.type_id =

28 Type_pro.Type_id and counts.count_id = products.count_id and Supplier_pro.pro_id = products.pro_id and Supplier_pro.Sup_id = Suppliers.Sup_id " With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgproduct.datasource = rsproduct ' MFGRowColor mfgproduct, 77, 134, 250 ErrorData: If Err.Number = Or Err.Number = Or Err.Number = Or Err.Number = Then MsgBox "à Ô ÇÒÁ¼Ô ¾ÅÒ à¹ èí Ò " & vbcrlf & "1. äáèêòáòã à»ô ãªé Ò¹ Ò¹ éíáùåä é" & vbcrlf & " ÃسҵÃÇ ÊͺÍÕ ÃÑé ", vbokonly + vbcritical, "¼Å ÒõÃÇ Êͺ" Exit Sub Me.cmdFind.Enabled = False Me.cmdFind1.Enabled = False txttype_id.enabled = False txtcount_id.enabled = False txttype_name.enabled = False txtcount_name.enabled = False Me.cmdsave.Enabled = False Me.cmdedit.Enabled = False Me.cmddelete.Enabled = False mfgsub.visible = False Showfindproduct FraCustomerList.Visible = False Command1.Enabled = False sup_id.enabled = False sup_name.enabled = False Private Sub Showfindproduct() With mfgproduct.textmatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".textmatrix(0, 1) = "ª èíêô¹ éò".textmatrix(0, 2) = "ÃÒ Ò ÒÂ".TextMatrix(0, 3) = " سÊÁºÑµÔ".TextMatrix(0, 4) = " ӹǹ àëå Í"

29 .TextMatrix(0, 5) = " Ø ÊÑè «éí".textmatrix(0, 6) = "ÃËÑÊ»ÃÐàÀ ÊÔ¹ éò".textmatrix(0, 7) = "ª èí»ãðàà ÊÔ¹ éò".textmatrix(0, 8) = "ÃËÑÊ˹èǹѺ".TextMatrix(0, 9) = "ª èíë¹èçâ¹ñº".textmatrix(0, 10) = "µé¹ عà ÅÕèÂ".TextMatrix(0, 11) = "ÃËÑʵÑÇá ¹ Ó˹èÒÂ".TextMatrix(0, 12) = "ª èíµñçá ¹ Ó˹èÒÂ".TextMatrix(0, 13) = "µé¹ ع".ColWidth(0) = 1500.ColWidth(1) = 2000.ColWidth(2) = 900.ColWidth(3) = 2000.ColWidth(4) = 1700.ColWidth(5) = 1700.ColWidth(6) = 0.ColWidth(7) = 1700.ColWidth(8) = 0.ColWidth(9) = 1700.ColWidth(10) = 1700.ColWidth(11) = 0.ColWidth(12) = 1700.ColWidth(13) = 1500 Private Sub mfgcustomer_click() Dim GRow As Integer ' µñçá»ãà çºá Ç Õè Ù ÅÔ àå Í GRow = mfgcustomer.row 'ÍèÒ¹á Ç Õè Ù ÅÔ àå Í If mfgcustomer.textmatrix(grow, 0) = "" Then Exit Sub With mfgcustomer 'áê éíáùåêô¹ éò Õè Ù ÅÔ ã¹ ÍÅâ ÃÅáµèÅеÑÇ sup_id.text =.TextMatrix(GRow, 0) sup_name.text = Trim(.TextMatrix(GRow, 1)) FraCustomerList.Visible = False Private Sub mfgproduct_click() With mfgproduct currentrow = mfgproduct.row

30 product.txtpro_id.text =.TextMatrix(currentrow, 0) product.txtpro_name.text =.TextMatrix(currentrow, 1) product.txtpro_price.text =.TextMatrix(currentrow, 2) product.txtpro_property.text =.TextMatrix(currentrow, 3) product.txtpro_instock.text =.TextMatrix(currentrow, 4) product.txtpro_wetorder.text =.TextMatrix(currentrow, 5) product.txttype_id.text =.TextMatrix(currentrow, 6) product.txttype_name.text =.TextMatrix(currentrow, 7) product.txtcount_id.text =.TextMatrix(currentrow, 8) product.txtcount_name.text =.TextMatrix(currentrow, 9) product.txtpro_cost.text = Format(.TextMatrix(currentrow, 10), "#,##0.00") product.sup_id.text =.TextMatrix(currentrow, 11) product.sup_name.text =.TextMatrix(currentrow, 12) product.txtcost.text = Format(.TextMatrix(currentrow, 13), "#,##0.00") Me.txtcount_name.Visible = True Me.txttype_name.Visible = True Me.cmdedit.Enabled = True Me.cmddelete.Enabled = True Me.cmdAdd.Enabled = True Private Sub mfgsub_click() With mfgsub currentrow = mfgsub.row txtsub_id.text =.TextMatrix(currentrow, 0) txtsub_name.text =.TextMatrix(currentrow, 1) mfgsub.visible = False Private Sub Text3_KeyPress(KeyAscii As Integer) Dim sqlcustomer As String If KeyAscii = 13 Then If Text3.Text = "" Then Exit Sub sqlcustomer = "SELECT * FROM Suppliers" sqlcustomer = sqlcustomer & " WHERE (sup_id LIKE '%" & Text3.Text & "%') or (sup_name LIKE '%" & Text3.Text & "% With rscustomerhide If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient

31 .Open sqlcustomer If.RecordCount <> 0 Then Set mfgcustomer.datasource = rscustomerhide ' MFGRowColor mfgcustomer, 195, 255, 117 Else MsgBox "ÃËÑʵÑÇá ¹ÊÑè «éí Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Dim i As Integer With mfgcustomer For i = 1 To.Rows 1 If.Rows > 2 Then.Rows =.Rows 1.clear Next Text3.Text = "" Text3.SetFocus setmfgpro11 Private Sub setmfgpro11() With mfgcustomer.textmatrix(0, 0) = "ÃËÑʵÑÇá ¹ Ó˹èÒÂ".TextMatrix(0, 1) = "ª èíµñçá ¹ Ó˹èÒÂ".TextMatrix(0, 2) = "¼ÙéµÔ µèí".textmatrix(0, 3) = " ÕèÍÂÙè".TextMatrix(0, 4) = "àºíãìâ ÃÈѾ ì".colwidth(0) = 1600.ColWidth(1) = 1700.ColWidth(2) = 2000.ColWidth(3) = 2500.ColWidth(4) = 1200 Private Sub txtpro_name_change()

32 ' If Not txtpro_name.text Like "*[ ÎÐ ä ì é è Ø Ù ã Ò ê ç Ñ A Z ]" Then SendKeys "{BackSpace}" 'Private Sub txtpro_name_keypress(keyascii As Integer) 'Dim Character As String ' Character = "¼»Í ÁÓ½ ÇÐÊ ËÑ ¾Ã¹Õ ÂêºÅ ì ³ ±Ø ÙÒÄÖ ÉÈã«Æ̲Îé áæä" ' ' KeyAscii = Asc(Chr(KeyAscii)) ' If KeyAscii > 26 Then ' If InStr(Character, Chr(KeyAscii)) = 0 Then ' KeyAscii = 0 ' ' ' ' If KeyAscii = 13 Then ' txtpro_price.setfocus ' ' Private Sub txtpro_price_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then txtpro_price.setfocus Private Sub txtpro_cost_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then txtpro_cost.setfocus

33 Private Sub txtcost_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then txtcost.setfocus Private Sub txtpro_wetorder_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then txtpro_wetorder.setfocus Private Sub txtpro_instock_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then txtpro_instock.setfocus

34 Private Sub txtsearch_change() Dim rsclone As New ADODB.Recordset If txtsearch.text = "" Then Exit Sub Set rsclone = rsproduct.clone With rsclone Select Case cbosearch.listindex Case 0.Filter = "pro_id LIKE '%" & txtsearch.text & "%'" Case 1.Filter = "pro_name LIKE '%" & txtsearch.text & "%'" Case Else End Select Set mfgproduct.datasource = rsclone Showfindproduct Set rsclone = Nothing Me.mfgproduct.Enabled = True Me.cmdAdd.Enabled = True Me.cmddelete.Enabled = True Me.cmdedit.Enabled = True ฟอร มการขายส นค า Option Explicit Dim Conn As New ADODB.Connection Dim RSsale As New ADODB.Recordset Dim rsproduct As New ADODB.Recordset Dim rscustomers As New ADODB.Recordset Dim rscus As New ADODB.Recordset Dim rod As Double Dim lod As Double Dim actionflag As String Dim IsLowqty As Boolean Dim rscustomer As New ADODB.Recordset Dim rscustomerhide As New ADODB.Recordset Dim IsCustomerShow As Boolean Dim rsdata As New ADODB.Recordset Dim showrpt As String Dim rsemp As New ADODB.Recordset Dim rsenducation As New ADODB.Recordset Dim rsposition As New ADODB.Recordset Dim rsprovince As New ADODB.Recordset Dim cmemp As ADODB.Command Dim i As Integer Dim AllRecord As String Dim action As String Dim sqlsave As String

35 Dim comsave As New ADODB.Command Dim rsvat As New ADODB.Recordset Dim rscount As New ADODB.Recordset Dim rstxtpro As New ADODB.Recordset Private Sub sumsalescustomer() Dim newrows As Integer Dim sums As Integer Dim bb As Integer With MSHFlexGrid1 For i = 1 To MSHFlexGrid1.Rows 1 sums = sums + CInt(MSHFlexGrid1.TextMatrix(i, 4)) Next Text2.Text = Format(sums, "#,##0.00") Private Sub Check1_Click() Checkss If Check1.Value = vbchecked Then MSHFlexGrid1.Visible = True FraCustomerList.Left = 360 FraCustomerList.Top = 960 Dim sqlcustomer As String ' sqlcustomer = "SELECT * FROM Customer" ' sqlcustomer = sqlcustomer & " WHERE (FullName LIKE '%" & txtsearch.text & "%') or (customerid LIKE '%" & txtsearch.text & "%') " sqlcustomer = "SELECT Sales_DE.Pro_id, Sales_DE.Pro_name, Sales_DE.Pro_price, Sales_DE.Sale_qty, Sales_DE.Total,Sales_DE.Sale_id,sales.sale_date FROM sales_de INNER JOIN sales ON sales_de.sale_id = sales.sale_id where Sales_DE.Sale_id = Sales.Sale_id AND (Sales.CustomerID ='" & txtcustomerid.text & "') and (Sales_DE.sale_id ='" & Text1.Text & "')" With rscus If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then Check2.Value = Unchecked Set MSHFlexGrid1.DataSource = rscus.movelast Text1.Text =.Fields("Sale_id").Value Showsaleprice

36 sumsalescustomer Else MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Check1.Value = Unchecked clearlist1 Exit Sub If Check1.Value = Unchecked Then Check2.Value = Unchecked clearlist1 Showsaleprice Me.Text2.Enabled = False Private Sub Checkss() MSHFlexGrid1.Visible = True FraCustomerList.Left = 360 FraCustomerList.Top = 960 Dim sqlcustomer As String ' sqlcustomer = "SELECT * FROM Customer" ' sqlcustomer = sqlcustomer & " WHERE (FullName LIKE '%" & txtsearch.text & "%') or (customerid LIKE '%" & txtsearch.text & "%') " sqlcustomer = "SELECT Sales_DE.Pro_id, Sales_DE.Pro_name, Sales_DE.Pro_price, Sales_DE.Sale_qty, Sales_DE.Total,Sales_DE.Sale_id FROM sales_de INNER JOIN sales ON sales_de.sale_id = sales.sale_id where Sales_DE.Sale_id = Sales.Sale_id AND (Sales.CustomerID ='" & txtcustomerid.text & "')" With rscus If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then Check2.Value = Unchecked.MoveLast Text1.Text =.Fields("Sale_id").Value Showsaleprice Else

37 MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Check1.Value = Unchecked clearlist1 Exit Sub If Check1.Value = Unchecked Then Check2.Value = Unchecked clearlist1 Showsaleprice Me.Text2.Enabled = False Private Sub Check2_Click() If Check2.Value = vbchecked Then MSHFlexGrid1.Visible = True FraCustomerList.Left = 360 FraCustomerList.Top = 960 Dim sqlcustomer As String ' sqlcustomer = "SELECT * FROM Customer" ' sqlcustomer = sqlcustomer & " WHERE (FullName LIKE '%" & txtsearch.text & "%') or (customerid LIKE '%" & txtsearch.text & "%') " sqlcustomer = "SELECT Sales_DE.Pro_id, Sales_DE.Pro_name, Sales_DE.Pro_price, Sales_DE.Sale_qty, Sales_DE.Total,Sales_DE.Sale_id,sales.sale_date FROM sales_de INNER JOIN sales ON sales_de.sale_id = sales.sale_id where Sales_DE.Sale_id = Sales.Sale_id AND (Sales.CustomerID ='" & txtcustomerid.text & "') " With rscus If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then Check1.Value = Unchecked Set MSHFlexGrid1.DataSource = rscus sumsalescustomer Showsaleprice Else MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò"

38 Check2.Value = Unchecked clearlist1 Exit Sub If Check2.Value = Unchecked Then Check1.Value = Unchecked clearlist1 Showsaleprice Me.Text2.Enabled = False 'äáèà Âà»ç¹ÅÙ éò Private Sub chknocustomer_click() 'actionflag = "ÊÁÑ ÃÊÁÒªÔ " If chknocustomer.value = vbchecked Then actionflag = "ÊÁÑ ÃÊÁÒªÔ " ' txtcustomerid.setfocus ClearCustomerData ShowID txtcustomerid.enabled = False cmdserchcustomer.enabled = False txtfullname.enabled = True Me.txtTelephone.Enabled = True Me.txtAddress.Enabled = True Me.cmdpro.Enabled = True Me.mskIDCard.Enabled = True optman.enabled = True optfemale.enabled = True ElseIf chknocustomer.value = vbunchecked Then txtcustomerid.enabled = True cmdserchcustomer.enabled = True ClearCustomerData actionflag = "" txtcustomerid.locked = False txtcustomerid.backcolor = &H F txtfullname.locked = False txtfullname.backcolor = &H mskidcard.text = "_ _" ' mskidcard.locked = False mskidcard.backcolor = &H txttelephone.locked = False txttelephone.backcolor = &H txtaddress.locked = False

39 txtaddress.backcolor = &H Private Sub cmdadd_click() If txtsale_qty.text = "0" Then MsgBox " ÃØ³Ò ÃÍ Ó¹Ç¹ÊÔ¹ éò Õè Ò éçâ ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" txtsale_qty.setfocus Exit Sub ' If dbocount.text = "ÃкØ˹èÇ Õè ÒÂ" Then ' MsgBox " ÃسÒÃкØ˹èÇÂÊÔ¹ éò éçâ ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" ' dbocount.setfocus ' Exit Sub ' Dim stock As Integer Dim i As Integer Dim newrows As String Dim tt As Integer For i = 1 To mfgsale.rows 2 If txtpro_id.text = Trim(mfgsale.TextMatrix(i, 0)) Then MsgBox "àå Í ÃÒ ÒÃÊÔ¹ éò«éó ÃسҵÃÇ ÊͺãËÁèÍÕ ÃÑé ", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" txtsale_qty.setfocus txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) Exit Sub Next i If Val(txtpro_instock.Text) < Int(Val(txtsale_qty.Text)) Then MsgBox "äáèáõêô¹ éòà¾õ⠾͵èÍ Òà Ò ÃسҵÃÇ ÊͺãËÁèÍÕ ÃÑé ", vbcritical + vbokonly, "¼Ô ¾ÅÒ " txtpro_id.setfocus txtpro_id.selstart = 0 txtpro_id.sellength = Len(txtpro_id.Text) Exit Sub 'µñç¹õéà»ç¹µñç Õè Ó Ò¹à ÕèÂÇ Ñº ÒÃµÑ ÊµêÍ ÊÔ¹ éò stock = Val(Me.txtpro_instock.Text) Int(Val(Me.txtsale_qty.Text)) With mfgsale newrows =.Rows 1.TextMatrix(newrows, 0) = txtpro_id.text.textmatrix(newrows, 1) = txtpro_name.text

40 .TextMatrix(newrows, 2) = stock.textmatrix(newrows, 3) = txtprice.text.textmatrix(newrows, 4) = txtsale_qty.text '.TextMatrix(newrows, 5) = dbocount.boundtext.textmatrix(newrows, 5) = txtunit.text.textmatrix(newrows, 6) = Format(CInt((txtsale_qty.Text) * CDbl((txtprice.Text))), "#,##0.00").Rows =.Rows + 1 Me.txtlodb.Enabled = False clearpro If txtcustomerid.text = "" Then calculator2 Else calculator1 setmfgsale lblnum.caption = mfgsale.rows 2 '¹Ñº ӹǹ ÒÃÊÑè «éí Me.txtlub.Enabled = True Me.cmdadd.Enabled = True Me.cmddelete.Enabled = True Me.cmdsave.Enabled = True Me.dbocount.Text = "ÃкØ˹èÇ Õè ÒÂ" Private Sub clearpro() txtpro_id.text = "" txtpro_id.locked = False ' Txtpro_id.BackColor = &H F txtpro_name.text = "" txtunit.text = "" txtpro_name.locked = False txtunit.locked = False txtpro_name.backcolor = &H F txtunit.backcolor = &H F txtprice.text = "0" txtprice.locked = False txtprice.backcolor = &H F txtpro_instock.text = "0" txtpro_instock.locked = False txtpro_instock.backcolor = &H F txtsale_qty.text = "0" txtsale_qty.locked = False

41 txtsale_qty.backcolor = &H F txtsum.enabled = False txtsum.backcolor = &H F txtsumnet.enabled = False txtsumnet.backcolor = &H F txtnet.enabled = False txtnet.backcolor = &H F txtvat.enabled = False txtvat.backcolor = &H F txtlub.enabled = False txtlub.backcolor = &H F txtton.enabled = False txtton.backcolor = &H F Private Sub clearlist1() Dim i As Integer With MSHFlexGrid1 For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next Private Sub cmdcancel_click() If MsgBox(" سµéÍ ÒÃà ÅÕÂÃÒ Òà ãªèëã ÍäÁè?", vbquestion + vbyesno, " Ó ¹Âѹ") = vbyes Then Me.txtCustomerID.Text = "" Me.txtFullName.Text = "" Me.txtTelephone.Text = "" Me.txtAddress.Text = "" Me.mskIDCard.Mask = "# #### ##### ## #" clearmfg Me.Text2.Text = "0.00" Me.txtnet.Text = "0.00" Me.txtvat.Text = "0.00" Me.txtnv.Text = "0.00" Me.txtlodb.Text = "0.00" Me.txtsumnet.Text = "0.00" Me.txtlub.Text = "0.00" Me.txtton.Text = "0.00"

42 Me.txttype_name.Text = "" Me.txttype_id.Text = "" Me.cmdSerchCustomer.Enabled = True Me.chkNoCustomer.Enabled = False Me.cmdpro.Enabled = False Me.cmdFind.Enabled = True Showsaleprice Check1.Value = Unchecked Check2.Value = Unchecked MSHFlexGrid1.Visible = False Private Sub cmdcancel2_click() Me.txtCustomerID.Text = "" Me.txtFullName.Text = "" Me.txtTelephone.Text = "" Me.txtAddress.Text = "" Me.mskIDCard.Mask = "# #### ##### ## #" clearmfg Me.Text2.Text = "0.00" Me.txtnet.Text = "0.00" Me.txtvat.Text = "0.00" Me.txtnv.Text = "0.00" Me.txtlodb.Text = "0.00" Me.txtsumnet.Text = "0.00" Me.txtlub.Text = "0.00" Me.txtton.Text = "0.00" Me.txttype_name.Text = "" Me.txttype_id.Text = "" Me.cmdSerchCustomer.Enabled = True Me.chkNoCustomer.Enabled = False Me.cmdpro.Enabled = False Me.cmdFind.Enabled = True Showsaleprice Check1.Value = Unchecked Check2.Value = Unchecked MSHFlexGrid1.Visible = False Private Sub cmdend_click() Call endfrm Private Sub cmdfind_click() frmfindcustomertype.show Private Sub cmdprint_click()

43 'Load CrySaleBill 'CrySaleBill.Show If showrpt = "ok" Then Load Form1 Form1.Show Else Load Form2 Form2.Show auto Call clearmfg Call clearpro Call Cleartxt Call cleartxt1 txtsum.text = "0" Private Sub cmdpro_click() Dim sqlproduct As String Dim rspro As New ADODB.Recordset ' sqlproduct = "Select Pro_id, Pro_name, Pro_price, Pro_instock from Products where Pro_instock >0order by Pro_id " sqlproduct = "Select Products.Pro_id, Products.Pro_name, Products.Pro_price, Products.Pro_instock,Counts.Count_name from Products,Counts where Products.Pro_instock >0 AND Products.Count_id = Counts.Count_id order by Products.Pro_id" With rspro If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgpro.datasource = rspro setmfgpro frmpro.visible = True MSHFlexGrid1.Visible = False Me.Check1.Enabled = False Me.Check2.Enabled = False buttu Private Sub setmfgpro() With mfgpro

44 .TextMatrix(0, 0) = "ÃËÑÊ".TextMatrix(0, 1) = "ª èíêô¹ éò".textmatrix(0, 2) = "ÃÒ Ò/˹èÇÂ".TextMatrix(0, 3) = " àëå Í".ColWidth(0) = 1600.ColWidth(1) = 1500.ColWidth(2) = 1000.ColWidth(3) = 1000.ColWidth(3) = 0 Private Sub cmddelete_click() Dim ClickRow As Integer ClickRow = mfgsale.row If mfgsale.rows = 2 Then Exit Sub If mfgsale.textmatrix(clickrow, 0) = "" Then Exit Sub With mfgsale.removeitem ClickRow lblnum.caption = lblnum.caption 1 clearpro calculator1 Private Sub cmdserchcustomer_click() Frmfindcustomer.Show Private Sub cmdsave_click() If txtlub.text = "" Then MsgBox " ÃØ³Ò èòâà Ô¹ éçâ¹ð ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" txtlub.setfocus Exit Sub 'If actionflag = "ÊÁÑ ÃÊÁÒªÔ " Or txtcustomerid.text <> "" Then Dim comsave As New ADODB.Command Dim cussave As New ADODB.Command Dim sqlsave As String Dim i As Integer Dim CurrentProductInShop As Integer 'µñçá»ãà çº Ó¹Ç¹ÊÔ¹ éòã¹ãéò¹ Dim rsproductinshop As New ADODB.Recordset Dim rscustomer As New ADODB.Recordset ' If txtcustomerid.text = "" Then ' MsgBox " ÃسÒÃкØÃËÑÊÅÙ éò!!!", vbokonly + vbinformation, "¼Å ÒõÃÇ Êͺ"

45 ' txtcustomerid.setfocus ' Exit Sub ' If actionflag = "ÊÁÑ ÃÊÁÒªÔ " Then With comsave.commandtype = adcmdtext If mfgsale.textmatrix(1, 0) = "" Then Exit Sub If mfgsale.textmatrix(1, 0) = "" Then MsgBox "ÂÑ äáèáõãòâ Òà ÒÂÊÔ¹ éò", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" Exit Sub If CInt((txtlub.Text)) < CInt((txtsumnet.Text)) Then MsgBox " ӹǹà Ô¹ Õè èòâ¹éíâ ÇèÒÃÒ Ò«éÍÊØ Ô¹Ð ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" txtlub.setfocus Exit Sub With rsproductinshop '.CursorType = adopenforwardonly.cursorlocation = aduseclient.locktype = adlockoptimistic conn.begintrans 'ãëéá éä éíáùåä é ' If chknocustomer.value = vbchecked Then sqlsave = "INSERT INTO Customer(CustomerID," sqlsave = sqlsave & " FullName,Sex,IDCard,Address,Telephone)" sqlsave = sqlsave & " VALUES('" & txtcustomerid.text & "'," sqlsave = sqlsave & "'" & txtfullname.text & "'," If optman.value = True Then sqlsave = sqlsave & "'M'," Else sqlsave = sqlsave & "'F'," sqlsave = sqlsave & "'" & mskidcard.text & "'," sqlsave = sqlsave & "'" & txtaddress.text & "'," sqlsave = sqlsave & "'" & txttelephone.text & "')" With comsave.commandtext = sqlsave.execute

46 ' sqlsave = "INSERT INTO Sales (Sale_id,CustomerID,Sale_date,Sale_dc,Vat,Sale_total,Sale_lub,Sale_ton,CusType_i d)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" & txtcustomerid.text & "'," sqlsave = sqlsave & "'" & lbldate.caption & "'," sqlsave = sqlsave & "'" & CInt(txtlodb.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtvat.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtsumnet.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtlub.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtton.Text) & "'," sqlsave = sqlsave & "'" & txtcus_name.text & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute With mfgsale For i = 1 To.Rows 2 sqlsave = "INSERT INTO Sales_DE ( Sale_id, Pro_id, Pro_name, Pro_price, Sale_qty,total,count)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 0) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 1) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 3)) & "'," sqlsave = sqlsave & "'" & CInt(.TextMatrix(i, 4)) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 6)) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 5) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute sqlsave = " UPDATE Products" sqlsave = sqlsave & " SET pro_id = '" &.TextMatrix(i, 0) & "', " sqlsave = sqlsave & " pro_instock = '" &.TextMatrix(i, 2) & "' " sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "') " sqlsave = "SELECT pro_id,pro_instock"

47 sqlsave = sqlsave & " FROM products" sqlsave = sqlsave & " WHERE (pro_id='" &.TextMatrix(i, 0) & "')" With rsproductinshop If.State = adstateopen Then.Close.Open sqlsave If.RecordCount <> 0 Then CurrentProductInShop =.Fields("pro_instock").Value.Fields("pro_instock").Value = CurrentProductInShop CInt(mfgsale.TextMatrix(i, 4)).Update Next If MsgBox(" سµéÍ Òúѹ Ö Òà ÒÂÊÔ¹ éò ÃÔ Ëà ÍäÁè?", vbquestion + vbyesno, " Ó ¹Âѹ") = vbyes Then ' conn.committrans 'ºÑ¹ Ö Å ã¹ Ò¹ éíáùå MsgBox "ºÑ¹ Ö àãõâºãéíâáåéç", vbinformation + vbokonly, "¼Å ÒÃ Ó Ò¹" showrpt = "ok" saleid = txtdebt_id.text cmdcancel2_click clearmfg Me.txtnet.Text = "0.00" Me.txtvat.Text = "0.00" Me.txtnv.Text = "0.00" Me.txtlodb.Text = "0.00" Me.txtsumnet.Text = "0.00" Me.txtlub.Text = "0.00" Me.txtton.Text = "0.00" Me.txttype_name.Text = "" Me.txttype_id.Text = "" Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.cmdFind.Enabled = True ClearCustomerData lblnum.caption = "" Me.cmdprint.Enabled = True Me.cmdadd.Enabled = True Me.cmddelete.Enabled = False Me.cmdsave.Enabled = False Call clearpro txtcustomerid.enabled = True

48 txtcustomerid.setfocus ' cmdserchcustomer.enabled = True chknocustomer.value = vbunchecked Else ' conn.rollbacktrans Exit Sub Call calculator1 ElseIf txtcustomerid.text <> "" And actionflag = "" Then 'sssssssssssssssssssssss 'With comsave '.ActiveConnection = conn '.CommandType = adcmdtext ' If mfgsale.textmatrix(1, 0) = "" Then Exit Sub If mfgsale.textmatrix(1, 0) = "" Then MsgBox "ÂÑ äáèáõãòâ Òà ÒÂÊÔ¹ éò", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" Exit Sub If CInt((txtlub.Text)) < CInt((txtsumnet.Text)) Then MsgBox " ӹǹà Ô¹ Õè èòâ¹éíâ ÇèÒÃÒ Ò«éÍÊØ Ô¹Ð ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" txtlub.setfocus Exit Sub With rsproductinshop.cursortype = adopenforwardonly.cursorlocation = aduseclient.locktype = adlockoptimistic 'ãëéá éä éíáùåä é sqlsave = "INSERT INTO Sales (Sale_id,CustomerID,Sale_date,Sale_dc,Vat,Sale_total,Sale_lub,Sale_ton,CusType_i d)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" & txtcustomerid.text & "'," sqlsave = sqlsave & "'" & lbldate.caption & "'," sqlsave = sqlsave & "'" & CInt(txtlodb.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtvat.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtsumnet.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtlub.Text) & "'," sqlsave = sqlsave & "'" & CInt(txtton.Text) & "'," sqlsave = sqlsave & "'" & txtcus_name.text & "')" With comsave

49 .CommandType = adcmdtext.commandtext = sqlsave.execute With mfgsale For i = 1 To.Rows 2 sqlsave = "INSERT INTO Sales_DE ( Sale_id, Pro_id, Pro_name, Pro_price, Sale_qty,total,count)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 0) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 1) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 3)) & "'," sqlsave = sqlsave & "'" & CInt(.TextMatrix(i, 4)) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 6)) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 5) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute sqlsave = " UPDATE Products" sqlsave = sqlsave & " SET pro_id = '" &.TextMatrix(i, 0) & "', " sqlsave = sqlsave & " pro_instock = '" &.TextMatrix(i, 2) & "' " sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "') " sqlsave = "SELECT pro_id,pro_instock" sqlsave = sqlsave & " FROM products" sqlsave = sqlsave & " WHERE (pro_id='" &.TextMatrix(i, 0) & "')" With rsproductinshop If.State = adstateopen Then.Close.Open sqlsave If.RecordCount <> 0 Then CurrentProductInShop =.Fields("pro_instock").Value.Fields("pro_instock").Value = CurrentProductInShop CInt(mfgsale.TextMatrix(i, 4)).Update Next

50 If MsgBox(" سµéÍ Òúѹ Ö Òà ÒÂÊÔ¹ éò ÃÔ Ëà ÍäÁè?", vbquestion + vbyesno, " Ó ¹Âѹ") = vbyes Then ' conn.committrans 'ºÑ¹ Ö Å ã¹ Ò¹ éíáùå MsgBox "ºÑ¹ Ö àãõâºãéíâáåéç", vbinformation + vbokonly, "¼Å ÒÃ Ó Ò¹" showrpt = "ok" saleid = txtdebt_id.text cmdcancel2_click clearmfg Me.txtnet.Text = "0.00" Me.txtvat.Text = "0.00" Me.txtnv.Text = "0.00" Me.txtlodb.Text = "0.00" Me.txtsumnet.Text = "0.00" Me.txtlub.Text = "0.00" Me.txtton.Text = "0.00" Me.txttype_name.Text = "" Me.txttype_id.Text = "" Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.cmdFind.Enabled = True ClearCustomerData lblnum.caption = "" Me.cmdprint.Enabled = True Me.cmdadd.Enabled = True Me.cmddelete.Enabled = False Me.cmdsave.Enabled = False Call clearpro ' ' txtcustomerid.enabled = True txtcustomerid.setfocus cmdserchcustomer.enabled = True chknocustomer.value = vbunchecked Else conn.rollbacktrans Exit Sub Call calculator1 Else 'lllllllllllllllllllllll Call Customer1 showrpt = "" auto optman.enabled = False optfemale.enabled = False

51 Me.txtCustomerID.Enabled = False Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.txtFullName.Enabled = False Me.txtTelephone.Enabled = False Me.txtAddress.Enabled = False Me.cmdpro.Enabled = False Me.mskIDCard.Enabled = False Me.cmdpro.Enabled = False Me.Combo1.Text = "àå Í»ÃÐàÀ ÅÙ éò" autoshows actionflag = "" Private Sub Customer1() Dim comsave As New ADODB.Command Dim cussave As New ADODB.Command Dim sqlsave As String Dim i As Integer Dim CurrentProductInShop As Integer 'µñçá»ãà çº Ó¹Ç¹ÊÔ¹ éòã¹ãéò¹ Dim rsproductinshop As New ADODB.Recordset Dim rscustomer As New ADODB.Recordset With comsave.commandtype = adcmdtext With rsproductinshop.cursortype = adopenforwardonly.cursorlocation = aduseclient.locktype = adlockoptimistic 'ãëéá éä éíáùåä é 'conn.begintrans If mfgsale.textmatrix(1, 0) = "" Then Exit Sub If mfgsale.textmatrix(1, 0) = "" Then MsgBox "ÂÑ äáèáõãòâ Òà ÒÂÊÔ¹ éò", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" Exit Sub If CInt((txtlub.Text)) < CInt((txtsumnet.Text)) Then MsgBox " ӹǹà Ô¹ Õè èòâ¹éíâ ÇèÒÃÒ Ò«éÍÊØ Ô¹Ð ÃѺ", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" txtlub.setfocus Exit Sub

52 sqlsave = "INSERT INTO Sales (Sale_id,Sale_date,Sale_dc,Vat,Sale_total,Sale_lub,Sale_ton,CusType_id)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" & lbldate.caption & "'," sqlsave = sqlsave & "'" & CDbl(txtlodb.Text) & "'," sqlsave = sqlsave & "'" & CDbl(txtvat.Text) & "'," sqlsave = sqlsave & "'" & CDbl(txtsumnet.Text) & "'," sqlsave = sqlsave & "'" & CDbl(txtlub.Text) & "'," sqlsave = sqlsave & "'" & CDbl(txtton.Text) & "'," sqlsave = sqlsave & "'" & txtcus_name.text & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute With mfgsale For i = 1 To.Rows 2 sqlsave = "INSERT INTO Sales_DE ( Sale_id, Pro_id, Pro_name, Pro_price, Sale_qty,total,count)" sqlsave = sqlsave & " VALUES('" & txtdebt_id.text & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 0) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 1) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 3)) & "'," sqlsave = sqlsave & "'" & CInt(.TextMatrix(i, 4)) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 6)) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 5) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute sqlsave = " UPDATE Products" sqlsave = sqlsave & " SET pro_id = '" &.TextMatrix(i, 0) & "', " sqlsave = sqlsave & " pro_instock = '" &.TextMatrix(i, 2) & "' " sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "') " sqlsave = "SELECT pro_id,pro_instock" sqlsave = sqlsave & " FROM products" sqlsave = sqlsave & " WHERE (pro_id='" &.TextMatrix(i, 0) & "')" With rsproductinshop

53 If.State = adstateopen Then.Close.Open sqlsave If.RecordCount <> 0 Then CurrentProductInShop =.Fields("pro_instock").Value.Fields("pro_instock").Value = CurrentProductInShop CInt(mfgsale.TextMatrix(i, 4)).Update Next If MsgBox(" سµéÍ Òúѹ Ö Òà ÒÂÊÔ¹ éò ÃÔ Ëà ÍäÁè?", vbquestion + vbyesno, " Ó ¹Âѹ") = vbyes Then ' conn.committrans 'ºÑ¹ Ö Å ã¹ Ò¹ éíáùå MsgBox "ºÑ¹ Ö àãõâºãéíâáåéç", vbinformation + vbokonly, "¼Å ÒÃ Ó Ò¹" cmdcancel2_click saleid = txtdebt_id.text ClearCustomerData lblnum.caption = "" Me.cmdprint.Enabled = True Me.cmdadd.Enabled = False Me.cmddelete.Enabled = False Me.cmdsave.Enabled = False Call clearpro txtcustomerid.enabled = True txtcustomerid.setfocus cmdserchcustomer.enabled = True chknocustomer.value = vbunchecked Else ' conn.rollbacktrans Exit Sub calculator2 Private Sub ClearButton() Me.cmdadd.Enabled = True Me.cmdsave.Enabled = False Me.cmdprint.Enabled = True Private Sub sumproductsave() Dim i As Integer Dim productsum As Integer Dim sqlsave As String

54 Dim cmdsaveme As New ADODB.Command With Me.mfgsale For i = 1 To.Rows 2 sqlsave = "UPDATE product" sqlsave = sqlsave & " SET pro_instock ='" & (.TextMatrix(i, 2)) - (.TextMatrix(i, 4)) & "'" sqlsave = sqlsave & " Where (pro_id ='" &.TextMatrix(i, 0) & "')" With cmdsaveme.commandtype = adcmdtext.commandtext = sqlsave.execute Next Private Sub Combo1_Click() If Combo1.Text = "ÅÙ éòêáòªô " Then txtcus_name.text = "CT " ElseIf Combo1.Text = "ÅÙ éò ÑèÇä»" Then txtcus_name.text = "CT " 'showrpt = "" Private Sub Form_Load() DataFalseEnabled With Conn If.State = adstateopen Then.Close.ConnectionString = strconn.commandtimeout = 90.Open Dim sqlcount As String sqlcount = "SELECT * FROM Counts" sqlcount = sqlcount & " Order By Count_id" With rscount If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient

55 .Open sqlcount If.RecordCount <> 0 Then Set dbocount.rowsource = rscount dbocount.listfield = "Count_name" dbocount.boundcolumn = "Count_name" Dim sqlvat As String sqlvat = "SELECT * FROM Logins" With rsvat If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlvat If.RecordCount <> 0 Then calvat =.Fields("vat").Value Label9.Caption = calvat FraCustomerList.Visible = False FraCustomerList.BackColor = RGB(209, 252, 232) mfgcustomer.backcolorbkg = RGB(214, 249, 252) OrderCustomerList IsCustomerShow = False cmdsave.enabled = False txtcustomerid.locked = True txtcustomerid.backcolor = &H F txtfullname.locked = True txtfullname.backcolor = &H F mskidcard.text = "_ _" mskidcard.backcolor = &H F txttelephone.locked = True txttelephone.backcolor = &H F txtaddress.locked = True txtaddress.backcolor = &H F actionflag = "" auto Me.txtlodb.Enabled = False clearpro Call setmfgsale frmpro.visible = False lbldate.caption = Format(Now, "dd/mm/yyyy") Call setmfgsale

56 Call Cleartxt Call DataFalseEnabled Call butena Me.cmdpro.Enabled = False optman.enabled = False optfemale.enabled = False Me.txtCustomerID.Enabled = False Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.txtFullName.Enabled = False Me.txtTelephone.Enabled = False Me.txtAddress.Enabled = False Me.cmdpro.Enabled = False Me.mskIDCard.Enabled = False Text2.Enabled = False showrpt = "" Me.txtlodb.Enabled = False 'autoshows Check1.Enabled = False Check2.Enabled = False Me.txtlub.Text = "0.00" Me.txtton.Text = "0.00" Private Sub butena() Me.cmdadd.Enabled = False Me.cmddelete.Enabled = False Me.cmdEnd.Enabled = False Me.cmdprint.Enabled = False Me.cmdsave.Enabled = False Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False ' Me.cmdpro.Enabled = False Private Sub buttu() Me.cmdadd.Enabled = True Me.cmddelete.Enabled = True Me.cmdEnd.Enabled = True Me.cmdprint.Enabled = True '«ÑºÃÙ Õ¹ OrderGrid Ó˹éÒ Õè Ó˹ éí ÇÒÁáÅÐ ÇÒÁ ÇéÒ ãëé ѺáµèÅÐ ÍÅÑÁÀì Private Sub OrderCustomerList() With mfgcustomer.textmatrix(0, 0) = "ÃËÑÊÅÙ éò".textmatrix(0, 1) = "ª èí Ê ØÅ".TextMatrix(0, 3) = "ºÑµÃ»ÃЪҪ¹"

57 .TextMatrix(0, 4) = " ÕèÍÂÙè".TextMatrix(0, 5) = "â ÃÈѾ ì".colwidth(0) = 1400.ColWidth(1) = 2000.ColWidth(2) = 0.ColWidth(3) = 1400.ColWidth(4) = 2000.ColWidth(5) = 1400.ColWidth(6) = 0.ColWidth(7) = 0 Private Sub Label13_Click() Label13.Caption = txtsumnet.text Private Sub mfgcustomer_dblclick() Dim i As Integer With mfgcustomer If.TextMatrix(1, 0) = "" Then Exit Sub txtcustomerid.text =.TextMatrix(.Row, 0) txtfullname.text =.TextMatrix(.Row, 1) If.TextMatrix(.Row, 2) = "M" Then optman.value = True ElseIf.TextMatrix(.Row, 2) = "F" Then optfemale.value = True mskidcard.text =.TextMatrix(.Row, 3) txtaddress.text =.TextMatrix(.Row, 4) txttelephone.text =.TextMatrix(.Row, 5) With mfgcustomer For i = 1 To.Rows 1 If.Rows > 2 Then

58 .Rows =.Rows 1.clear Next 'OrderCustomer IsCustomerShow = False FraCustomerList.Visible = False Me.chkNoCustomer.Enabled = False Me.cmdpro.Enabled = True txtpro_id.enabled = True txtpro_id.backcolor = &H Me.cmdSerchCustomer.Enabled = True '«ÑºÃÙ Õ¹ AutoGenerateCustomerID Ó˹éÒ ÕèÊÃéÒ ÃËÑÊÅÙ éòâ ÂÍѵâ¹ÁÑµÔ Private Sub ShowID() Dim sqlshow As String sqlshow = "SELECT CustomerID FROM Customer" With rsemp If.State = adstateopen Then.Close Format(i + 1, "000") "001".CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlshow If.RecordCount <> 0 Then.MoveLast AllRecord =.Fields("CustomerID").Value If Mid(AllRecord, 3, 2) = Right(Year(Date) + 543, 2) Then i = Val(Mid(AllRecord, 5)) txtcustomerid.text = "EP" & Right(Year(Date) + 543, 2) & Else txtcustomerid.text = "EP" & Right(Year(Date) + 543, 2) & Else txtcustomerid.text = "EP" & Right(Year(Date) + 543, 2) & "001"

59 Private Sub Timer1_Timer() If IsCustomerShow = True Then With FraCustomerList ' If.Height < 2895 Then '.Height =.Height ' ' ' If (.Width < 8535) Then '.Width =.Width ' ' ' If (.Height >= 2895) And (.Width >= 8535) Then '.Height = 2895 '.Width = 8535 ' ' Timer1.Enabled = False If.Height < 2895 Then.Height =.Height If (.Width < 8535) Then.Width =.Width If (.Height >= 2895) And (.Width >= 8535) Then.Height = 2895.Width = 8535 Timer1.Enabled = False Private Sub txtcus_name_change() If txtcus_name.text = "CT " Then ClearCustomerData cmdserchcustomer.enabled = False chknocustomer.enabled = False optman.enabled = False optfemale.enabled = False Me.txtCustomerID.Enabled = False

60 Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.txtFullName.Enabled = False Me.txtTelephone.Enabled = False Me.txtAddress.Enabled = False Me.cmdpro.Enabled = False Me.mskIDCard.Enabled = False Me.cmdpro.Enabled = True txtpro_id.enabled = True txtpro_id.backcolor = &H Else cmdserchcustomer.enabled = True chknocustomer.enabled = True 'optman.enabled = True ' optfemale.enabled = True cmdpro.enabled = False ' Me.cmdpro.Enabled = False Me.cmdFind.Enabled = False Private Sub txtcustomerid_change() If txtcustomerid.text = "" Then Check1.Enabled = False Check2.Enabled = False Text2.Enabled = False Else Check1.Enabled = True Check2.Enabled = True txtcustomerid.selstart = 0 txtcustomerid.sellength = Len(txtCustomerID.Text) Private Sub txtcustomerid_keypress(keyascii As Integer) Dim sqlcustomer As String 'àå Í éíáùååù éò Ò µòãò Customer µòáãëñêåù éò Õè»é͹à éòáò If KeyAscii = 13 Then sqlcustomer = "SELECT * FROM tblcustomer" sqlcustomer = sqlcustomer & " WHERE (CustomerID='" & txtcustomerid.text & "')" With rscustomer If.State = adstateopen Then.Close

61 .CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then ShowCustomerData txtproductid.setfocus Else MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" ClearCustomerData txtcustomerid.setfocus '«ÑºÃÙ Õ¹ ShowCustomerData Ó˹éÒ ÕèáÊ éíáùååù éò Private Sub ShowCustomerData() With rscustomer txtcustomerid.text =.Fields("CustomerID").Value txtfullname.text =.Fields("FullName").Value If.Fields("Sex").Value = "M" Then optman.value = True ElseIf.Fields("Sex").Value = "F" Then optfemale.value = True mskidcard.text =.Fields("IDCard").Value txtaddress.text =.Fields("Address").Value txttelephone.text =.Fields("Telephone").Value '«ÑºÃÙ Õ¹ ClearCustomerData Ó˹éÒ ÕèÅéÒ éíáùååù éò ÕèáÊ ÍÂÙè㹠͹â ÃÅáµèÅеÑÇ Private Sub ClearCustomerData() txtcustomerid.text = "" txtcustomerid.enabled = True txtcustomerid.setfocus cmdserchcustomer.enabled = True txtfullname.text = "" optman.value = True mskidcard.text = "_ _" txtaddress.text = "" txttelephone.text = ""

62 Private Sub Txtpro_id_Change() Dim sqlpro As String 'sqlpro = "SELECT * FROM products where Pro_instock >0 and pro_id='" & txtpro_id.text & "'" sqlpro = "Select Products.Pro_id, Products.Pro_name, Products.Pro_price, Products.Pro_instock,Counts.Count_name from Products,Counts where Products.Pro_instock >0 AND Products.Count_id = Counts.Count_id AND Products.pro_id='" & txtpro_id.text & "'" With rstxtpro If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlpro If.RecordCount <> 0 Then MsgBox "¾ºÊÔ¹ éòã¹êµçí ", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" txtpro_name.text =.Fields("Pro_name").Value txtpro_instock.text =.Fields("Pro_instock").Value txtprice.text =.Fields("Pro_price").Value txtunit.text =.Fields("Count_name").Value txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) txtsale_qty.locked = False txtsale_qty.backcolor = &H frmpro.visible = False txtsale_qty.enabled = True dbocount.enabled = True txtsale_qty.setfocus Else ' MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Exit Sub Private Sub txtsearch_gotfocus() txtsearch.selstart = 0 txtsearch.sellength = Len(txtSearch.Text) Private Sub prosalcus() Private Sub txtsearch_keypress(keyascii As Integer)

63 Dim sqlcustomer As String If KeyAscii = 13 Then If txtsearch.text = "" Then Exit Sub sqlcustomer = "SELECT * FROM Customer" sqlcustomer = sqlcustomer & " WHERE (FullName LIKE '%" & txtsearch.text & "%') or (customerid LIKE '%" & txtsearch.text & "%') " With rscustomerhide If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then Set mfgcustomer.datasource = rscustomerhide ' MFGRowColor mfgcustomer, 195, 255, 117 Else MsgBox "ÃËÑÊÅÙ éò Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Dim i As Integer With mfgcustomer For i = 1 To.Rows 1 If.Rows > 2 Then.Rows =.Rows 1.clear Next txtsearch.text = "" txtsearch.setfocus OrderCustomerList Private Sub txtsale_qty_gotfocus() txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) Private Sub mfgpro_click() Dim newrows As String newrows = mfgpro.row With mfgpro txtpro_id.text =.TextMatrix(newrows, 0)

64 ' txtpro_name.text =.TextMatrix(newrows, 1) txtprice.text =.TextMatrix(newrows, 2) txtpro_instock.text =.TextMatrix(newrows, 3) txtunit.text =.TextMatrix(newrows, 4) txtsale_qty.setfocus txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) txtsale_qty.locked = False txtsale_qty.backcolor = &H frmpro.visible = False txtsale_qty.enabled = True dbocount.enabled = True txtsale_qty.setfocus Private Sub setmfgsale() With mfgsale.textmatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".textmatrix(0, 1) = "ª èíêô¹ éò".textmatrix(0, 2) = " ÅÑ ".TextMatrix(0, 3) = "ÃÒ Ò/˹èÇÂ".TextMatrix(0, 4) = " ӹǹ".TextMatrix(0, 5) = "˹èǹѺ".TextMatrix(0, 6) = "ÃÇÁà»ç¹à Ô¹".ColWidth(0) = "1500".ColWidth(1) = "2500".ColWidth(2) = "1000".ColWidth(3) = "1000".ColWidth(4) = "800".ColWidth(5) = "1000".ColWidth(6) = "1000" Private Sub calculator1() 'ÅÙ éòêáòªô Ô ÊèǹŠDim i As Integer Dim total As Integer Dim suwlod As Integer Dim a As Long Dim vat As Integer Dim num As Integer num = txtnet.text With mfgsale

65 For i = 1 To.Rows 2 a = a + CInt((.TextMatrix(i, 3))) * CInt(.TextMatrix(i, 4)) total = total + CInt((.TextMatrix(i, 6))) suwlod = suwlod CInt((.TextMatrix(i, 6))) txtvat.text = vat 'ÀÒÉÕ num = (total + vat) vat Next ' txtnet.text = Format(a, "#,##0.00") ' txtvat.text = Format(CInt((txtnet.Text) * CDbl(Label9.Caption) / 100), "#,##0.00") ' txtnv.text = Format(CInt((txtnet.Text) + CInt((txtvat.Text))), "#,##0.00") ' txtlodb.text = Format(CInt((txtnv.Text) * 3 / 100), "#,##0.00") ' txtlodb.text = Format(CInt((txtnv.Text) * 5 / 100), "#,##0.00") ' txtsumnet.text = Format(CInt((txtnv.Text) CInt((txtlodb.Text))), "##,##0.00") txtnet.text = Format(a, "#,##0.00") txtvat.text = Format(CInt((txtnet.Text) * CDbl(Label9.Caption) / 100), "#,##0.00") ' txtnv.text = Format(CInt((txtnet.Text) + CInt((txtvat.Text))), "#,##0.00") ' txtlodb.text = Format(CInt((txtnet.Text) * 3 / 100), "#,##0.00") ' txtlodb.text = Format(CInt((txtnet.Text) * 5 / 100), "#,##0.00") If txtnet.text > 499 Then txtlodb.text = Format((CInt((txtnet.Text) * 5 / 100)), "##,##0.00") txtsumnet = Format(CInt((txtnet.Text) + CInt((txtvat.Text)) CInt((txtlodb.Text))), "##,##0.00") ElseIf txtnet.text < 499 Then txtlodb.text = Format((CInt((txtnet.Text) * 3 / 100)), "##,##0.00") txtsumnet = Format(CInt((txtnet.Text) + CInt((txtvat.Text) CInt((txtlodb.Text)))), "##,##0.00") ' txtsumnet.text = Format(CInt((txtnet.Text) CInt((txtlodb.Text))), "##,##0.00") ' If txtnv.text > 499 Then 'txtlodb.text = (CInt((txtnv.Text)) * 5 / 100) 'txtsumnet = (CInt(txtnv.Text) CInt(txtlodb.Text)) ' ' ElseIf txtnv.text < 499 Then 'txtlodb.text = (CInt((txtnv.Text)) * 3 / 100)

66 'txtsumnet = CInt(txtnv.Text) CInt(txtlodb.Text) ' Private Sub calculator2() 'ÅÙ éò ÑèÇä» äáè Ô ÊèǹŠDim i As Integer Dim total As Integer Dim suwlod As Integer Dim a As Long Dim vat As Integer Dim num As Integer num = txtnet.text With mfgsale For i = 1 To.Rows 2 a = a + CInt((.TextMatrix(i, 3))) * CInt((.TextMatrix(i, 4))) total = total + CInt((.TextMatrix(i, 6))) suwlod = suwlod CInt((.TextMatrix(i, 6))) txtvat.text = vat 'ÀÒÉÕ num = (total + vat) vat Next ' txtnet.text = Format(a, "#,##0.00") ' txtvat.text = Format(CInt((txtnet.Text) * CDbl(Label9.Caption) / 100), "#,##0.00") ' txtnv.text = Format(CInt((txtnet.Text) + CInt((txtvat.Text))), "#,##0.00") ' txtsumnet.text = Format(CInt((txtnv.Text) CInt((txtlodb.Text))), "##,##0.00") txtnet.text = Format(a, "#,##0.00") txtvat.text = Format(CInt((txtnet.Text) * CDbl(Label9.Caption) / 100), "#,##0.00") txtsumnet.text = Format(CInt((txtnet.Text) + CInt((txtvat.Text))), "##,##0.00") ' txtnv.text = Format(CInt((txtnet.Text) + CInt((txtvat.Text))), "#,##0.00") ' If txtnet.text > 499 Then 'txtlodb.text = (CInt((txtnet.Text)) * 5 / 100) 'txtsumnet = (CInt(txtnet.Text) CInt(txtlodb.Text)) ' ' ElseIf txtnet.text < 499 Then ''txtlodb.text = (CInt((txtnet.Text)) * 3 / 100) 'txtsumnet = CInt(txtnet.Text) CInt(txtlodb.Text) '' txtsumnet.text = Format(CInt((txtnet.Text) CInt((txtlodb.Text))), "##,##0.00") '

67 Private Sub mfgsale_click() If txtpro_id.text = "" Then Exit Sub If mfgsale.textmatrix(1, 0) = "" Then Exit Sub Dim NewRow As String NewRow = mfgsale.row With mfgsale txtpro_id.text =.TextMatrix(NewRow, 0) txtpro_name.text =.TextMatrix(NewRow, 1) txtpro_instock.text = (CInt((.TextMatrix(NewRow, 2))) + CInt((.TextMatrix(NewRow, 4)))) txtprice.text =.TextMatrix(NewRow, 3) txtsale_qty.text =.TextMatrix(NewRow, 4) txtsum.text =.TextMatrix(NewRow, 5).Row =.Row 1.RemoveItem (NewRow) txtsale_qty.setfocus txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) txtsale_qty.locked = False txtsale_qty.backcolor = &H cmddelete.enabled = True Private Sub txtlodb_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then cmdadd_click Private Sub txtlodb_change() 'txtsumnet.text = Format(CInt((txtnet.Text CInt(txtlodb.Text))), "##,##0.00") 'txtsumnet.text = Format(CInt((txtnet.Text + CInt((txtvat.Text)))), "##,##0.00") txtsumnet.text = Format(CInt((txtnet.Text CInt(txtlodb.Text))), "##,##0.00") 'txtsumnet.text = Format(CInt((txtnet.Text + CInt((txtvat.Text)))), "##,##0.00")

68 Private Sub txtlub_change() If txtlub.text = "" Then Exit Sub txtton.text = Format(CInt((txtlub.Text) CInt((txtsumnet.Text))), "##,##0.00") 'àªç ӹǹÊÔ¹ éò Õè Ó ÒÃÊÑè «éí Private Sub txtsale_qty_change() If txtsale_qty.text = "" Then Exit Sub Dim rsproduct As New ADODB.Recordset Dim sqlqty As String sqlqty = "SELECT Pro_instock FROM Products WHERE (pro_id='" & txtpro_id.text & "')" With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlqty If.RecordCount <> 0 Then If.Fields("pro_instock").Value < CInt((txtsale_qty.Text)) Then IsLowqty = True MsgBox " ӹǹÊÔ¹ éòã¹ãéò¹äáèà¾õ⠾͵èÍ Òà Ò ÃسҵÃÇ ÊͺãËÁè", vbexclamation + vbokonly, " Óൠ͹" txtsale_qty.setfocus txtsale_qty.selstart = 0 txtsale_qty.sellength = Len(txtsale_qty.Text) Exit Sub Else IsLowqty = False txtsum.text = Format(CInt((txtprice.Text) * CInt((txtsale_qty.Text))), "#,##0.00") 'ªèÍ Ó¹Ç¹ÊÔ¹ éòà»ç¹áººµñçáå à èò¹ñé¹ Private Sub txtsale_qty_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0

69 If KeyAscii = 13 Then 'ÃѺ èò Ò Enter cmdadd_click 'ÃѹÃËÑÊ Òà Ò¼è͹ä éẺíñµâ¹áñµô Private Sub auto() Dim sqlsale As String sqlsale = "SELECT Sale_id FROM Sales_de" With RSsale If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlsale If.RecordCount <> 0 Then.MoveLast AllRecord =.Fields("Sale_id").Value i = Val(Mid(AllRecord, 3)) txtdebt_id.text = "S#" & Format(i + 1, " ") Else txtdebt_id.text = "S#" & " " Private Sub autoshows() Dim sqlsale As String sqlsale = "SELECT Sale_id FROM Sales_DE " With RSsale If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlsale If.RecordCount <> 0 Then.MoveLast Text1.Text =.Fields("sale_id").Value 'Textbox äáèêòáòã Ó ÒÃà¾ÔèÁźá éä ä é Private Sub DataFalseEnabled() Me.txtnet.Enabled = False

70 Me.txtnet.BackColor = &H Me.txtsum.Enabled = False Me.txtsum.BackColor = &H Me.txtvat.Enabled = False Me.txtvat.BackColor = &H Me.Text2.Enabled = False Me.Text2.BackColor = &H Me.txtton.Enabled = False Me.txtton.BackColor = &H Me.txtpro_id.Enabled = False Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = False Me.txtpro_name.BackColor = &H txtunit.enabled = False Me.txtunit.BackColor = &H Me.txtpro_instock.Enabled = False Me.txtpro_instock.BackColor = &H Me.txtprice.Enabled = False Me.txtprice.BackColor = &H Me.txtsale_qty.Enabled = False dbocount.enabled = False Me.txtsale_qty.BackColor = &H Me.txtsumnet.Enabled = False Me.txtsumnet.BackColor = &H Me.txtnv.Enabled = False Me.txtnv.BackColor = &H Me.txtlodb.Enabled = False Me.txtlodb.BackColor = &H Me.txttype_id.Enabled = False Me.txttype_id.BackColor = &H Me.txttype_name.Enabled = False Me.txttype_name.BackColor = &H Me.cmdpro.Enabled = False 'Textbox ÊÒÁÒÃ Ó ÒÃà¾ÔèÁźá éä ä é Private Sub DataTrueEnabled() Me.txtnet.Enabled = True Me.txtnet.BackColor = &H Me.txtsum.Enabled = True Me.txtsum.BackColor = &H Me.txtvat.Enabled = True Me.txtvat.BackColor = &H Me.txtlub.Enabled = True

71 Me.txtlub.BackColor = &H Me.txtton.Enabled = True Me.txtton.BackColor = &H Me.txtpro_id.Enabled = True Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = True Me.txtpro_name.BackColor = &H Me.txtunit.Enabled = True Me.txtunit.BackColor = &H Me.txtpro_instock.Enabled = True Me.txtpro_instock.BackColor = &H Me.txtprice.Enabled = True Me.txtprice.BackColor = &H Me.txtsale_qty.Enabled = True dbocount.enabled = True Me.txtsale_qty.BackColor = &H Me.txtsumnet.Enabled = True Me.txtsumnet.BackColor = &H Private Sub clearmfg() Dim i As Integer With mfgsale For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next setmfgsale Private Sub Cleartxt() txtnet.text = "0.00" txtvat.text = "0.00" txtnv.text = "0.00" txtlodb.text = "0.00" txtsumnet.text = "0.00" Private Sub cleartxt1() txtlub.text = "0.00" txtton.text = "0.00"

72 Private Sub txttype_name_change() If txttype_name.text = "CT " Then txtcustomerid.text = "" txtcustomerid.enabled = True txtcustomerid.setfocus cmdserchcustomer.enabled = True txtfullname.text = "" optman.value = True mskidcard.text = "_ _" txtaddress.text = "" txttelephone.text = "" cmdserchcustomer.enabled = False chknocustomer.enabled = False optman.enabled = False optfemale.enabled = False Me.txtCustomerID.Enabled = False Me.cmdSerchCustomer.Enabled = False Me.chkNoCustomer.Enabled = False Me.txtFullName.Enabled = False Me.txtTelephone.Enabled = False Me.txtAddress.Enabled = False Me.cmdpro.Enabled = False Me.mskIDCard.Enabled = False Me.cmdpro.Enabled = True Else cmdserchcustomer.enabled = True chknocustomer.enabled = True 'optman.enabled = True ' optfemale.enabled = True ' Me.cmdpro.Enabled = False Me.cmdFind.Enabled = False Private Sub Showsaleprice() With MSHFlexGrid1.TextMatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".textmatrix(0, 1) = "ª èíêô¹ éò".textmatrix(0, 2) = "ÃÒ Ò ÒÂ".TextMatrix(0, 3) = " ӹǹ ÒÂ".TextMatrix(0, 4) = "ÃÇÁà»ç¹à Ô¹".TextMatrix(0, 5) = "àå Õè Òà ÒÂ".TextMatrix(0, 6) = "Çѹ Õè ÒÂ".ColWidth(0) = 1500

73 .ColWidth(1) = 2000.ColWidth(2) = 900.ColWidth(3) = 2000.ColWidth(4) = 1700.ColWidth(5) = 2000.ColWidth(6) = 2000 Private Sub txttelephone_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 ฟอร มการส งซ อ Dim rsposition As New ADODB.Recordset Dim rssupplier As New ADODB.Recordset Dim rsorder As New ADODB.Recordset Dim rsproduct As New ADODB.Recordset Dim rspro As New ADODB.Recordset Dim IsCustomerShow As Boolean Dim rscustomerhide As New ADODB.Recordset Dim rssearch As New ADODB.Recordset Dim rsvat As New ADODB.Recordset Dim rscount As New ADODB.Recordset Private Sub Showproductlow() With mfgpro.textmatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".colwidth(0) = 2000.TextMatrix(0, 1) = "ª èíêô¹ éò".colwidth(1) = 2000.TextMatrix(0, 2) = " àëå Í".ColWidth(2) = 1000.TextMatrix(0, 3) = " Ø ÊÑè «éí".colwidth(3) = 1000.TextMatrix(0, 4) = "µé¹ عÊÔ¹ éò".colwidth(4) = 1000

74 .TextMatrix(0, 5) = "ÃÒ Ò ÒÂ".ColWidth(5) = 1000 Private Sub mfgcustomer_click() Dim GRow As Integer ' µñçá»ãà çºá Ç Õè Ù ÅÔ àå Í GRow = mfgcustomer.row 'ÍèÒ¹á Ç Õè Ù ÅÔ àå Í If mfgcustomer.textmatrix(grow, 0) = "" Then Exit Sub With mfgcustomer 'áê éíáùåêô¹ éò Õè Ù ÅÔ ã¹ ÍÅâ ÃÅáµèÅеÑÇ tsup_id.text =.TextMatrix(GRow, 0) txtsup.text = Trim(.TextMatrix(GRow, 1)) txtsup_contactname.text = Trim(.TextMatrix(GRow, 2)) txtsup_add.text = Trim(.TextMatrix(GRow, 3)) txtsup_tel.text = Trim(.TextMatrix(GRow, 4)) FraCustomerList.Visible = False '.RemoveItem GRow Private Sub Option1_Click() Dim sqlsearch As String If Option1.Value = True Then ' sqlsearch = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and (products.pro_instock<=30) and suppliers.sup_id = supplier_pro.sup_id and (supplier_pro.sup_id = '" & tsup_id.text & "')" ' sqlsearch = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost,suppliers.sup_name,suppliers.sup_id from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and (products.pro_instock<=30) and suppliers.sup_id = supplier_pro.sup_id" sqlsearch = "select supplier_pro.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,s upplier_pro.cost,suppliers.sup_name,suppliers.sup_id from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and supplier_pro.sup_id = suppliers.sup_id and products.pro_instock < products.pro_wetorder" With rssearch If.State = adstateopen Then.Close.CursorType = adopenforwardonly

75 .CursorLocation = aduseclient.open sqlsearch If.RecordCount <> 0 Then Set mfgpro.datasource = rssearch tmprecordcount =.RecordCount Else tmprecordcount = 0 MsgBox "äáèáõêô¹ éò Õè Ö Ø ÊÑè «éí", vbcritical + vbokonly, "¼Å ÒõÃÇ Êͺ" ccc Option1.Value = False showproductdata Private Sub ccc() Option2.Value = False Option1.Value = False With Me.mfgpro.clear clearlistss Private Sub clearlistss() Dim i As Integer With mfgpro For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next Private Sub Option2_Click() Dim sqlsearch As String If Option2.Value = True Then ' sqlsearch = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost from products,supplier_pro,suppliers where products.pro_id =

76 supplier_pro.pro_id and suppliers.sup_id = supplier_pro.sup_id and (supplier_pro.sup_id = '" & tsup_id.text & "')" sqlsearch = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost,suppliers.sup_name,suppliers.sup_id from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and suppliers.sup_id = supplier_pro.sup_id" With rssearch If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlsearch If.RecordCount <> 0 Then Set mfgpro.datasource = rssearch tmprecordcount =.RecordCount Else tmprecordcount = 0 MsgBox "äáèáõêô¹ éòµòáµñçá ¹ Ó˹èÒ¹Õé", vbinformation + vbokonly, "¼Å ÒõÃÇ Êͺ" ccc showproductdata Private Sub Text1_Change() Option2.Value = False Private Sub Timer1_Timer() If IsCustomerShow = True Then With FraCustomerList If.Height < 2895 Then.Height =.Height

77 If (.Width < 8535) Then.Width =.Width If (.Height >= 2895) And (.Width >= 8535) Then.Height = 2895.Width = 8535 Timer1.Enabled = False "'" Private Sub tsup_id_change() strsql = "SELECT * FROM Suppliers Where Sup_id ='" & tsup_id.text & With rssupplier If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open strsql If.RecordCount <> 0 Then txtsup_contactname.text =.Fields("sup_contactname").Value ' tsup_id.text =.Fields("sup_id").Value txtsup_add.text =.Fields("sup_add").Value txtsup_tel.text =.Fields("sup_tel").Value txtsup.text =.Fields("Sup_name").Value Me.txtsup_contactname.Enabled = False Me.tsup_id.Enabled = False Me.txtsup_add.Enabled = False Me.txtsup_tel.Enabled = False Private Sub txtsearch_keypress(keyascii As Integer) Dim sqlcustomer As String If KeyAscii = 13 Then If txtsearch.text = "" Then Exit Sub sqlcustomer = "SELECT * FROM Suppliers" sqlcustomer = sqlcustomer & " WHERE (sup_id LIKE '%" & txtsearch.text & "%') or (sup_name LIKE '%" & txtsearch.text & "%') " With rscustomerhide

78 If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcustomer If.RecordCount <> 0 Then Set mfgcustomer.datasource = rscustomerhide ' MFGRowColor mfgcustomer, 195, 255, 117 Else MsgBox "µñçá ¹ Ó˹èÒ Õè سÃÐºØ äáèáõ!!!", vbokonly + vbinformation, "¼Å Òà é¹ëò" Dim i As Integer With mfgcustomer For i = 1 To.Rows 1 If.Rows > 2 Then.Rows =.Rows 1.clear Next txtsearch.text = "" txtsearch.setfocus setmfgpro11 Private Sub ShowID() Dim sqlorder As String sqlorder = "SELECT order_id FROM Orders_DE" With rsorder If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlorder If.RecordCount <> 0 Then.MoveLast AllRecord =.Fields("order_id").Value

79 i = Val(Mid(AllRecord, 3)) lblorder_id.caption = "OR" & Format(i + 1, " ") Else lblorder_id.caption = "OR" & " " Private Sub cmdadd_click() rec_date.value = DateAdd("d", 7, Date) Call ClearText 'Call showid Call AddEnabled Call DataTrueEnabled ' Me.rec_date.Enabled = True Me.cmdpro.Enabled = True Private Sub ClearText() Dim i As Integer Dim myctl As Control For Each myctl In Controls If TypeOf myctl Is TextBox Then myctl.text = "" Next For Each myctl In Controls If TypeOf myctl Is ComboBox Then myctl.text = "" Next Private Sub cmdadditem_click() Dim i As Integer 'If txtorder_qty.text = "" Or txtorder_qty.text = "0" Then ' txtorder_qty.setfocus 'Exit Sub ' 'If txtorder_qty.text <> "" And combocount.text = "ÃкØ˹èÇÂÊÑè «éí" Then ' MsgBox " ÃسÒÃкØ˹èÇ ÕèÊÑè «éí!!!", vbokonly + vbinformation, " Óൠ͹" 'combocount.setfocus 'Exit Sub ' If txtpro_name.text = "" Then Exit Sub If txtorder_qty.text = "" Then MsgBox " ÃسÒÃÐºØ Ó¹Ç¹ÊÔ¹ éò ÕèÊÑè «éí!!!", vbokonly + vbinformation, " Óൠ͹" txtorder_qty.setfocus Exit Sub

80 If combocount.text = "ÃкØ˹èÇÂÊÑè «éí" Then MsgBox " ÃسÒÃкØ˹èÇÂÊÔ¹ éò ÕèÊÑè «éí!!!", vbokonly + vbinformation, "¼Å ÒõÃÇ Êͺ" combocount.setfocus Exit Sub If (Me.txtpro_price.Text = "") Or (txtpro_id.text = "") Then Exit Sub For i = 1 To mfgorder.rows 2 If Trim(txtpro_id.Text) = Trim(mfgorder.TextMatrix(i, 1)) Then 'à»ãõâºà Õº éíáùåµòãò ÇèÒÁÕ éíáùåàëá ͹ ѹËà Íà»ÅèÒäÁèãËé éíáù Å«éÓ Ñ¹ MsgBox "ÃÒ ÒùÕéä éáõíâùèáåéç ÃسÒàÅ Í ãëáè!!!", vbokonly + vbinformation, " Óൠ͹" txtorder_qty.setfocus txtorder_qty.selstart = 0 txtorder_qty.sellength = Len(txtorder_qty.Text) Exit Sub Next ' Dim newrow As Integer With mfgorder NewRow =.Rows 1 '.TextMatrix(NewRow, 0) = NewRow.TextMatrix(NewRow, 1) = txtpro_id.text.textmatrix(newrow, 2) = txtpro_name.text.textmatrix(newrow, 3) = Format(txtpro_price.Text, "#,##0.00").TextMatrix(NewRow, 4) = txtorder_qty.text.textmatrix(newrow, 5) = combocount.text.textmatrix(newrow, 6) = Format(txttotal.Text, "#,##0.00").TextMatrix(NewRow, 7) = combocount.boundtext.rows =.Rows + 1 Me.combocount.Text = "ÃкØ˹èÇÂÊÑè «éí" calculator1 CalculateNet ClearOrderdetailsData cmdsave.enabled = True Me.cmdclear.Enabled = True txtorder_qty.setfocus

81 ' ÒÃÃÇÁÃÒÂ ÒÃ Private Sub CalculateNet() Dim i As Integer Dim Net As Double Net = 0 With mfgorder For i = 1 To.Rows 2 Net = Net + Int(Val(.TextMatrix(i, 5))) Next lblnet.caption = Format(Net, "#,##0.00") Private Sub Cmdback_Click() Call endfrm Private Sub cmdclear_click() Dim i As Integer With mfgorder For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next clearsub ShowHSHFlexGrid cmdsave.enabled = False lblnet.caption = "0.00" lblvat.caption = "0.00" lblsum.caption = "0.00" lbldc.caption = "0.00" lblsumnet.caption = "0.00" Me.tsup_id.Text = "" Me.txtsup_add.Text = "" Me.txtsup_contactname.Text = "" Me.txtsup_tel.Text = "" Me.txtsup.Text = "" Private Sub cmdpro_click()

82 frmpro.visible = True cmdpro_rop.visible = True Dim sqlproduct As String ' sqlproduct = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and (products.pro_instock<=30) and suppliers.sup_id = supplier_pro.sup_id and (supplier_pro.sup_id = '" & tsup_id.text & "')" sqlproduct = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.cost from products,supplier_pro,suppliers where products.pro_id = supplier_pro.pro_id and (products.pro_instock<=30) and suppliers.sup_id = supplier_pro.sup_id " With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgpro.datasource = rsproduct showproductdata Me.dcbsup_id.Enabled = False Me.tsup_id.Enabled = False Me.txtsup_add.Enabled = False Me.txtsup_contactname.Enabled = False Me.txtsup_tel.Enabled = False Option2.Value = False Option1.Value = False ccc showproductdata Option2.Value = True Private Sub showproductdata() With mfgpro '.Cols = 5.Cols = 7.TextMatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".colwidth(0) = 2000.TextMatrix(0, 1) = "ª èíêô¹ éò".colwidth(1) = 2200

83 .TextMatrix(0, 2) = " ÅÑ ".ColWidth(2) = 1000.TextMatrix(0, 3) = " Ø ÊÑè «éí".colwidth(3) = 1000.TextMatrix(0, 4) = "µé¹ ع/˹èÇÂ".ColWidth(4) = 1000.TextMatrix(0, 5) = "ª èíµñçá ¹ Ó˹èÒÂ".ColWidth(5) = 2000.TextMatrix(0, 6) = "ÃËÑʵÑÇ".ColWidth(6) = 2000 Private Sub cmdpro_rop_click() frmpro.visible = False Dim sqlproduct As String sqlproduct = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.pro_cost from products,supplier_pro where products.pro_id = supplier_pro.pro_id and products.pro_instock<=products.pro_wetorder and (supplier_pro.sup_id = '" & tsup_id.text & "')" With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgpro.datasource = rsproduct showproductdata ' ccc Private Sub cmdreport_click() Me.Hide 'Load CryOrderBill 'CryOrderBill.Show Load Form3 Form3.Show ClearText ClearOrderData clear cmdreport.enabled = False

84 Call Form_Load Private Sub cmdsave_click() Dim comsave As New ADODB.Command If MsgBox(" سµéÍ Òúѹ Ö ÃÒ Òà ãªèëã ÍäÁè?", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then Conn.BeginTrans sqlsave = "Insert into Orders(Order_id, Sup_id, Order_date, Rec_date, Vat, Order_dc,NetTotal,Status,IsReceive,ISNOreceive,NumVat)" sqlsave = sqlsave & " values('" & lblorder_id.caption & "'," sqlsave = sqlsave & "'" & tsup_id.text & "'," sqlsave = sqlsave & "'" & lbldate.caption & "'," sqlsave = sqlsave & "'" & Format(DateThaiFormat(rec_date), "mm/dd/yyyy") & "'," sqlsave = sqlsave & "'" & CDbl((lblVat.Caption)) & "'," sqlsave = sqlsave & "'" & CDbl((lblDc.Caption)) & "'," sqlsave = sqlsave & "'" & CDbl((lblsumnet.Caption)) & "'," sqlsave = sqlsave & "'1'," sqlsave = sqlsave & "'UnReceipt'," sqlsave = sqlsave & "'0'," sqlsave = sqlsave & "'" & CDbl((Label22.Caption)) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute 'ºÑ¹ Ö Å ã¹ãòâåðàíõâ With mfgorder For i = 1 To.Rows 2 sqlsave = "INSERT INTO Orders_DE (Order_id, Pro_id, Pro_name, Pro_cost, Order_qty, Total,NumberofReceives,Count_id)" sqlsave = sqlsave & " values('" & lblorder_id.caption & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 1) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 2) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 3)) & "'," sqlsave = sqlsave & "'" & CInt(.TextMatrix(i, 4)) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 6)) & "'," sqlsave = sqlsave & "'" & CDbl(.TextMatrix(i, 4)) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 7) & "')" With comsave.commandtext = sqlsave

85 .Execute Next Conn.CommitTrans MsgBox "ºÑ¹ Ö ÃÒ Òà àãõâºãéíâáåéç!!!", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" orderid = lblorder_id.caption cmdreport.enabled = True txtsup.text = "" Me.lblnet.Caption = "0.00" Me.lblVat.Caption = "0.00" Me.lblsum.Caption = "0.00" Me.lblDc.Caption = "0.00" Me.lblsumnet.Caption = "0.00" ' Me.CmdReport.Visible = True Me.rec_date.Enabled = False Me.cmdadd.Enabled = True cmdclear_click Call ShowID Private Sub ClearOrderData() tsup_id.text = "" Me.mfgorder.Text = "" lblorder_id.caption = "" dcbsup_id.text = "" ' Me.txtsup_name.Text = "" Me.txtsup_add.Text = "" Me.txtsup_tel.Text = "" 'Me.txtsup_fax.Text = "" Me.txtpro_id.Text = "" Me.txtpro_name.Text = "" Me.txtpro_instock.Text = "0.00" Me.txtpro_price.Text = "0.00" Me.txtorder_qty.Text = "" Me.txttotal.Text = "0.00" Me.lblnet.Caption = "0.00" Me.lblsum.Caption = "0.00" Me.lblVat.Caption = "0.00" Me.lblDc.Caption = "0.00" Me.lblsumnet.Caption = "0.00" Private Sub ClearOrderdetailsData()

86 txtpro_id.text = "" txtpro_name.text = "" txtpro_instock.text = "0" txtpro_price.text = "0" txtorder_qty.text = "0" txttotal.text = "0.00" 'Me.lblsum.Caption = "0" ' Me.CmdReport.Enabled = True Private Sub cmdserchcustomer_click() IsCustomerShow = Not IsCustomerShow If IsCustomerShow = True Then FraCustomerList.Visible = True FraCustomerList.Left = 4800 FraCustomerList.Top = 3240 Timer1.Enabled = True FraCustomerList.Height = 1 FraCustomerList.Width = 1 txtsearch.setfocus Else FraCustomerList.Visible = False setmfgpro11 Private Sub dcbsup_id_change() strsql = "SELECT * FROM Suppliers Where sup_name ='" & dcbsup_id.text & "'" With rssupplier If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open strsql If.RecordCount <> 0 Then txtsup_contactname.text =.Fields("sup_contactname").Value tsup_id.text =.Fields("sup_id").Value txtsup_add.text =.Fields("sup_add").Value

87 txtsup_tel.text =.Fields("sup_tel").Value Me.txtsup_contactname.Enabled = False Me.tsup_id.Enabled = False Me.txtsup_add.Enabled = False Me.txtsup_tel.Enabled = False Private Sub Form_Load() rec_date.value = DateThai(Date) 'On Error GoTo Err_Load DataFalseEnabled With Conn If.State = adstateopen Then.Close.ConnectionString = strconn.commandtimeout = 90.Open 'Set Conn = New ADODB.Connection ' ' Conn.ConnectionString = strconn Conn.Open Dim sqlcount As String sqlcount = "SELECT * FROM Counts" sqlcount = sqlcount & " Order By Count_id" With rscount If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlcount If.RecordCount <> 0 Then Set combocount.rowsource = rscount combocount.listfield = "countnum_name" combocount.boundcolumn = "Count_id" Dim sqlvat As String sqlvat = "SELECT * FROM Logins" With rsvat If.State = adstateopen Then.Close

88 .CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlvat If.RecordCount <> 0 Then calvat =.Fields("vatorder").Value Label22.Caption = calvat frmpro.visible = False DataFalseEnabled 'lbldate.caption = Date lbldate.caption = Format(Now, "dd/mm/yyyy") Dim sqlorder As String sqlorder = "SELECT order_id FROM Orders_DE" With rsorder If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlorder If.RecordCount <> 0 Then.MoveLast AllRecord =.Fields("order_id").Value i = Val(Mid(AllRecord, 3)) lblorder_id.caption = "OR" & Format(i + 1, " ") Else lblorder_id.caption = "OR" & " " ' Ö éíáùå Ò µñçá ¹ Ó˹èÒ strsql = "SELECT sup_id, sup_name from suppliers" With rssupplier If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open strsql

89 If.RecordCount <> 0 Then Set dcbsup_id.rowsource = rssupplier dcbsup_id.listfield = "sup_name" dcbsup_id.boundcolumn = "sup_id" ' Ö éíáùåêô¹ éò Ñé ËÁ ' strsql = "SELECT pro_id, pro_name, pro_price, pro_instock FROM product" ' With rsproduct ' If.State = adstateopen Then.Close '.ActiveConnection = conn '.CursorType = adopenforwardonly '.CursorLocation = aduseclient '.Open strsql ' If.RecordCount <> 0 Then ' txtpro_name.text =.Fields("pro_name").Value ' txtpro_price.text =.Fields("pro_price").Value ' ' Dim sqlproduct As String ' àãõâ ÃÒ ÒÃÊÔ¹ éò ÕèÁÕ Ó¹Ç¹ ÕèµèÓ ÇèÒ Ø ÊÑè «éí 'sqlproduct = "SELECT pro_id, pro_name, pro_cost, pro_instock, pro_wetorder FROM products WHERE (pro_instock<=pro_werorder) " sqlproduct = "select products.pro_id,products.pro_name,products.pro_instock,products.pro_wetorder,supp lier_pro.pro_cost from products,supplier_pro where products.pro_id = supplier_pro.pro_id and products.pro_instock<=products.pro_wetorder and (supplier_pro.sup_id = '" & tsup_id.text & "')" With rsproduct If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlproduct If.RecordCount <> 0 Then Set mfgpro.datasource = rsproduct showproductdata Call ShowHSHFlexGrid Me.cmdpro.Enabled = False Me.cmdsave.Enabled = False Me.cmdreport.Enabled = False Me.cmdclear.Enabled = False

90 Call ClearText lblnet.caption = "0.00" lblsum.caption = "0.00" lblvat.caption = "0.00" lbldc.caption = "0.00" lblsumnet.caption = "0.00" FraCustomerList.Visible = False rec_date.value = DateAdd("d", 7, Date) Call ClearText Call ShowID Call AddEnabled Call DataTrueEnabled Me.rec_date.Enabled = True Me.cmdpro.Enabled = True txtpro_id.enabled = False txtpro_name.enabled = False txtpro_instock.enabled = False txtpro_price.enabled = False txttotal.enabled = False txtsup.enabled = False tsup_id.enabled = False txtsup_tel.enabled = False txtsup_contactname.enabled = False txtsup_add.enabled = False Private Sub mfgorder_click() With mfgorder Dim NewRow As Integer NewRow =.Row If.Rows = 2 Then Exit Sub If.TextMatrix(NewRow, 0) = "" Then Exit Sub txtpro_id.text =.TextMatrix(NewRow, 1) txtpro_name.text =.TextMatrix(NewRow, 2) txtpro_price.text = Format(.TextMatrix(NewRow, 3), "#,##0.00") txtorder_qty.text =.TextMatrix(NewRow, 4) txttotal.text = Format(.TextMatrix(NewRow, 6), "#,##0.00") '.RemoveItem newrow Private Sub mfgpro_click() Dim GRow As Integer ' µñçá»ãà çºá Ç Õè Ù ÅÔ àå Í GRow = mfgpro.row 'ÍèÒ¹á Ç Õè Ù ÅÔ àå Í Dim chksup As String If mfgpro.textmatrix(grow, 0) = "" Then Exit Sub

91 With mfgpro 'áê éíáùåêô¹ éò Õè Ù ÅÔ ã¹ ÍÅâ ÃÅáµèÅеÑÇ chksup =.TextMatrix(GRow, 6) If tsup_id.text <> "" And tsup_id.text <> chksup And lblnet.caption <> "0.00" Then MsgBox " ÃسÒàÅ Í ÊÔ¹ éò Ò µñçá ¹ Ó˹èÒ " & txtsup.text, vbokonly, "¼Å ÒõÃÇ Êͺ" Exit Sub txtpro_id.text =.TextMatrix(GRow, 0) txtpro_name.text = Trim(.TextMatrix(GRow, 1)) txtpro_instock.text = Trim(.TextMatrix(GRow, 2)) txtpro_price.text = Format(Trim(.TextMatrix(GRow, 4)), "#,##0.00") tsup_id.text =.TextMatrix(GRow, 6) '.RemoveItem GRow If mfgpro.rows = 2 Then cmdsave.enabled = False txtorder_qty.setfocus frmpro.visible = False Private Sub mfgpro1_click() cmdpro_rop.visible = False Dim GRow As Integer ' µñçá»ãà çºá Ç Õè Ù ÅÔ àå Í GRow = mfgpro1.row 'ÍèÒ¹á Ç Õè Ù ÅÔ àå Í If mfgpro1.textmatrix(grow, 0) = "" Then Exit Sub With mfgpro1 txtpro_id.text =.TextMatrix(GRow, 0) txtpro_name.text =.TextMatrix(GRow, 1) txtpro_instock.text =.TextMatrix(GRow, 2) txtpro_price.text = Format(.TextMatrix(GRow, 4), "#,##0.00") If mfgpro1.rows = 2 Then txtorder_qty.setfocus ' Frame3.Visible = False

92 ' Ù³ÃÒ Ò/ ӹǹ Private Sub txtorder_qty_change() Dim total As Long If txtorder_qty.text <> "" And txtpro_price.text <> "" Then 'txttotal.text = Format(Int(Val(txtorder_qty.Text)) * Int(Val(txtpro_price.Text)), "#,##0.00") txttotal.text = Format(Int(Val(txtorder_qty.Text)) * Int(Val(txtpro_price.Text)), "#,##0.00") total = Format(CLng(CLng(txtorder_qty.Text) * CLng(txtpro_price.Text)), "#,##0.00") txttotal.text = Format(total, "#,##0.00") Private Sub txtorder_qty_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then cmdadditem_click ' txtorder_qty.setfocus Private Sub ShowHSHFlexGrid() With mfgorder.textmatrix(0, 0) = " ÅÓ Ñº Õè ".ColWidth(0) = 600.TextMatrix(0, 1) = " ÃËÑÊÊÔ¹ éò".colwidth(1) = 1800.TextMatrix(0, 2) = "ª èíêô¹ éò".colwidth(2) = 2700.TextMatrix(0, 3) = " ÃÒ Ò/˹èÇÂ".ColWidth(3) = 1000.TextMatrix(0, 4) = " ӹǹ".ColWidth(4) = 1000

93 .TextMatrix(0, 5) = "˹èǹѺ".ColWidth(5) = 1000.TextMatrix(0, 6) = " ÃÒ ÒÃÇÁ".ColWidth(6) = 1000.ColWidth(7) = 0 Private Sub ClearButton() Me.cmdadd.Enabled = True Me.cmdsave.Enabled = True 'Me.CmdReport.Enabled = True Me.cmdclear.Enabled = True Private Sub AddEnabled() Me.cmdadd.Enabled = False Me.cmdclear.Enabled = True Me.cmdsave.Enabled = False Me.cmdreport.Enabled = False Private Sub txtorder_date_keydown(keycode As Integer, Shift As Integer) Select Case KeyCode Case vbkeyf2 txtorder_date.text = Format(Date, "dd/mm/yyyy") End Select Sub clearsub() txtpro_id.text = "" txtpro_name.text = "" txtpro_instock.text = "0" txtpro_price.text = "0.00" txtorder_qty.text = "0" txttotal.text = "0.00" Private Sub DataFalseEnabled() ' ' Me.lblorder_id.Enabled = False Me.lblorder_id.BackColor = &H Me.dcbsup_id.Enabled = False Me.dcbsup_id.BackColor = &H Me.tsup_id.Enabled = False Me.tsup_id.BackColor = &H Me.txtsup_contactname.Enabled = False Me.txtsup_contactname.BackColor = &H Me.txtsup_add.Enabled = False Me.txtsup_add.BackColor = &H Me.txtsup_tel.Enabled = False

94 Me.txtsup_tel.BackColor = &H ' Me.rec_date.Enabled = False ' Me.rec_date.CalendarBackColor = &H Me.txtpro_id.Enabled = False Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = False Me.txtpro_name.BackColor = &H Me.txtpro_instock.Enabled = False Me.txtpro_instock.BackColor = &H Me.txtpro_price.Enabled = False Me.txtpro_price.BackColor = &H Me.txtorder_qty.Enabled = False Me.txtorder_qty.BackColor = &H Me.txttotal.Enabled = False Me.txttotal.BackColor = &H Private Sub DataTrueEnabled() Me.lblorder_id.Enabled = True Me.lblorder_id.BackColor = &H Me.dcbsup_id.Enabled = True Me.dcbsup_id.BackColor = &H Me.txtsup_contactname.Enabled = True Me.txtsup_contactname.BackColor = &H Me.txtsup_add.Enabled = True Me.txtsup_add.BackColor = &H Me.txtsup_tel.Enabled = True Me.txtsup_tel.BackColor = &H Me.tsup_id.Enabled = True Me.tsup_id.BackColor = &H Me.txtpro_id.Enabled = True Me.txtpro_id.BackColor = &H Me.txtpro_name.Enabled = True Me.txtpro_name.BackColor = &H Me.txtpro_instock.Enabled = True Me.txtpro_instock.BackColor = &H Me.txtpro_price.Enabled = True Me.txtpro_price.BackColor = &H Me.txtorder_qty.Enabled = True Me.txtorder_qty.BackColor = &H Me.txttotal.Enabled = True Me.txttotal.BackColor = &H

95 Private Sub calculator1() Dim i As Integer Dim total As Double Dim suwlod As Integer Dim a As Long Dim vat As Double Dim num As Long Dim cost As Double Dim quty As Integer num = CInt(lblsum.Caption) num = lblnet.caption With mfgorder For i = 1 To.Rows 2 cost = CDbl(.TextMatrix(i, 3)) quty = CInt(.TextMatrix(i, 4)) a = a + cost * quty Next lblnet.caption = Format(a, "#,##0.00") vat = a * (CDbl(Label22.Caption) / 100) lblvat.caption = Format(vat, "#,##0.00") lblsumnet.caption = Format(a + vat, "#,##0.00") Private Sub setmfgpro11() With mfgcustomer.textmatrix(0, 0) = "ÃËÑʵÑÇá ¹ Ó˹èÒÂ".TextMatrix(0, 1) = "ª èíµñçá ¹ Ó˹èÒÂ".TextMatrix(0, 2) = "¼ÙéµÔ µèí".textmatrix(0, 3) = " ÕèÍÂÙè".TextMatrix(0, 4) = "àºíãìâ ÃÈѾ ì".colwidth(0) = 1600.ColWidth(1) = 1700.ColWidth(2) = 2000.ColWidth(3) = 2500.ColWidth(4) = 1200 Private Sub clear() Dim i As Integer

96 With mfgorder For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next ฟอร มการร บส นค า Option Explicit Dim actionflag As String Dim rsorder As New ADODB.Recordset Dim strsql As String 'Dim rssupplier As New ADODB.Recordset 'Dim rsorder As New ADODB.Recordset Dim rsreceive As New ADODB.Recordset Dim rsproduct As New ADODB.Recordset Dim rssearch As New ADODB.Recordset Dim Net As Double Dim tmprecordcount As Integer Dim remain As String Dim NumberToReceives As String Dim NumCount As Integer Dim OrderVat As Double Dim rsvat As New ADODB.Recordset Private Sub Option1_Click() Dim sqlsearch As String If Option1.Value = True Then ' sqlsearch = " SELECT DISTINCT orders.order_id,orders.order_date,orders.sup_id,suppliers.sup_name FROM orders,suppliers,orders_de where (Orders_De.Order_id= orders.order_id ) and orders.sup_id = suppliers.sup_id and (Status = '1') and (orders.isreceive='unreceipt') and ISNOreceive = 1" '' ( Orders_De.NumberofReceives < Orders_De.Order_qty ) ' sqlsearch = " SELECT DISTINCT orders.order_id,orders.order_date,orders.sup_id,suppliers.sup_name FROM orders,suppliers,orders_de where (Orders_De.Order_id= orders.order_id ) and orders.sup_id = suppliers.sup_id and (Status = '1') and (orders.isreceive='unreceipt') and ISNOreceive = 1" ' sqlsearch = " SELECT DISTINCT orders.order_id,orders.order_date,orders.sup_id,suppliers.sup_name FROM orders,suppliers,orders_de where (Orders_De.Order_id= orders.order_id ) and

97 orders.sup_id = suppliers.sup_id and (Status = '1') and Orders_De.NumberofReceives < Orders_De.Order_qty and orders.isnoreceive = '1'" sqlsearch = " SELECT DISTINCT orders.order_id,orders.order_date,orders.sup_id,suppliers.sup_name FROM orders,suppliers,orders_de where (Orders_De.Order_id= orders.order_id ) and orders.sup_id = suppliers.sup_id and (Status = '1') and Orders_De.NumberofReceives > '0' and orders.isnoreceive = '1'" With rssearch If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlsearch If.RecordCount <> 0 Then Set mfgsearch.datasource = rssearch tmprecordcount =.RecordCount GridSearch Me.FrameSearch.Visible = True Me.mfgSearch.Visible = True Me.cmdSearch.Enabled = False Else tmprecordcount = 0 MsgBox "äáèáõãºêñè «éí Õè éò ÃѺÊÔ¹ éò ÃѺ", vbcritical + vbokonly, "¼Å ÒõÃÇ Êͺ" ccc Option1.Value = False Private Sub clearlistss() Dim i As Integer With mfgsearch For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next

98 Private Sub Option2_Click() Dim sqlsearch As String If Option2.Value = True Then sqlsearch = " SELECT DISTINCT orders.order_id,orders.order_date,orders.sup_id,suppliers.sup_name FROM orders,suppliers,orders_de where (Orders_De.Order_id= orders.order_id ) and orders.sup_id = suppliers.sup_id and (Status = '1') and (orders.isreceive='unreceipt') and Orders_De.NumberofReceives = Orders_De.Order_qty and orders.isnoreceive = '0'" With rssearch If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlsearch If.RecordCount <> 0 Then Set mfgsearch.datasource = rssearch tmprecordcount =.RecordCount GridSearch Me.FrameSearch.Visible = True Me.mfgSearch.Visible = True Me.cmdSearch.Enabled = False Else tmprecordcount = 0 MsgBox "äáèáõãòâ ÒÃãºÊÑè «éíêô¹ éòãëáè ÃѺ", vbcritical + vbokonly, "¼Å ÒõÃÇ Êͺ" ccc Option2.Value = False Private Sub ccc() Option2.Value = False Option1.Value = False With Me.mfgSearch.clear

99 clearlistss Private Sub cmdadd_click() Dim i As Integer Dim stacks As Integer Dim NewRow As Integer If txtpro_id.text = "" Then MsgBox " ÃسÒàÅ Í ÊÔ¹ éò Õè ÐÃѺ!!!", vbokonly + vbcritical, " Óൠ͹" Exit Sub If lblprice.caption = "" Or txtrub.text = "" Then MsgBox " Ãسһé͹ éíáùåãñºêô¹ éòãëé ú éçâ!!!", vbokonly + vbcritical, " Óൠ͹" Exit Sub For i = 1 To mfgreceive.rows 2 If Trim(txtpro_id.Text) = Trim(mfgreceive.TextMatrix(i, 0)) Then If MsgBox("ÊÔ¹ éò¹õéä éáõ ÒÃÃѺÃÒ ÒÃáÅéÇ Ø³µéÍ ÒÃá ¹ ÕèÃÒ ÒùÕéãªèËà ÍäÁè!!!", vbyesno + vbinformation, " Óൠ͹") = vbyes Then With mfgreceive.textmatrix(newrow, 0) = txtpro_id.text.textmatrix(i, 1) = lblpro_name.caption.textmatrix(i, 2) = lblprice.caption.textmatrix(i, 3) = txtrub.text.textmatrix(i, 4) = Int(txtrub.Text) + Int(lblpro_instock.Caption).TextMatrix(i, 5) = CInt(lblremain.Caption).TextMatrix(i, 6) = lbltotal.caption '.TextMatrix(NewRow, 7) = txtdc.text + CDbl(lblVat.Caption = Format(i, "#,###0.00")).TextMatrix(i, 7) = lblqty.caption.textmatrix(i, 8) = lblpro_instock.caption.textmatrix(i, 9) = lbltongrub.caption.textmatrix(i, 10) = NumCount Call Calculate Call CalculateNet

100 Call clearsub Call ShowHSHFlexGrid txtreceiver.text = "0" Exit Sub Else Call clearsub Exit Sub Next With mfgreceive NewRow =.Rows 1.TextMatrix(NewRow, 0) = txtpro_id.text.textmatrix(newrow, 1) = lblpro_name.caption.textmatrix(newrow, 2) = lblprice.caption.textmatrix(newrow, 3) = txtrub.text.textmatrix(newrow, 4) = Int(txtrub.Text) + Int(lblpro_instock.Caption).TextMatrix(NewRow, 5) = CInt(lblremain.Caption).TextMatrix(NewRow, 6) = lbltotal.caption '.TextMatrix(NewRow, 7) = txtdc.text + CDbl(lblVat.Caption = Format(i, "#,###0.00")).TextMatrix(NewRow, 7) = lblqty.caption.textmatrix(newrow, 8) = lblpro_instock.caption.textmatrix(newrow, 9) = lbltongrub.caption.textmatrix(newrow, 10) = NumCount.Rows =.Rows + 1 Call Calculate Call CalculateNet Call clearsub Call ShowHSHFlexGrid txtreceiver.text = "0" sumsalescustomer1 cmdsave.enabled = True Private Sub Cmdback_Click() Call endfrm Private Sub cmdcancel_click() Dim i As Integer With mfgre

101 For i = 1 To.Rows 2 If.Rows > 2 Then.Rows =.Rows 1.clear Next clearsub cmdsave.enabled = False Me.dtpPaidDate.Enabled = False Me.cmdSearch.Enabled = True Me.lblNudRec.Enabled = False Me.lblSupID.Caption = "" Me.lblsup.Caption = "" Me.txtOrderID.Text = "" Clearmfgre Clearmfgreceive lblnet1.caption = "0.00" lblvat.caption = "0.00" lblsum.caption = "0.00" lbldc.caption = "0.00" lblsumnet.caption = "0.00" Check1.Value = Unchecked Check2.Value = Unchecked ShowHSHFlexGrid Hshflexgrid Private Sub cmddata_click() 'DataTrueEnabled 'cmddata.enabled = False 'cmdsave.enabled = True 'CmdReport.Enabled = False 'cmdsearch.enabled = True 'Frame3.Enabled = True Private Sub cmdreport_click() 'Load CryReceivesBill 'CryReceivesBill.Show Load Form5 Form5.Show ClearreceiveData ClearreceivedetailData

102 Clearmfgreceive Clearmfgre Call Form_Load Private Sub cmdsearch_click() FrameSearch.Visible = True mfgsearch.visible = True Private Sub mfgsearch_click() Dim Row As String Row = Me.mfgSearch.Row If mfgsearch.textmatrix(row, 0) = "" Then Exit Sub With mfgsearch Me.txtOrderID.Text =.TextMatrix(Row, 0) Me.lblNudRec.Caption =.TextMatrix(Row, 1) lblsupid.caption =.TextMatrix(Row, 2) Me.lblsup.Caption =.TextMatrix(Row, 3) txtorderid_change ' Me.lblSupAddr.Caption =.TextMatrix(Row, 3) ' Me.lblSupTel.Caption =.TextMatrix(Row, 4) mfgre.setfocus Me.FrameSearch.Visible = False Me.mfgSearch.Visible = False ' sumsalescustomer2 Private Sub txtorderid_change() Dim sqlorder As String ' sqlorder = "SELECT DISTINCT orders_de.pro_id, orders_de.pro_name, orders_de.pro_cost, orders_de.order_qty, orders_de.total,orders_de.numberofreceives,counts.count_num,orders.numvat FROM orders_de INNER JOIN orders ON orders_de.order_id = orders.order_id INNER JOIN Counts ON orders_de.count_id = Counts.count_id where (orders_de.order_id='" & txtorderid.text & "') AND (orders_de.numberofreceives > 0) And (orders.status ='1')And (orders.isreceive='unreceipt') " sqlorder = "SELECT DISTINCT orders_de.pro_id, orders_de.pro_name, orders_de.pro_cost, orders_de.order_qty, orders_de.total,orders_de.numberofreceives,counts.count_num,orders.numvat FROM orders_de INNER JOIN orders ON orders_de.order_id = orders.order_id INNER JOIN Counts ON orders_de.count_id = Counts.count_id where

103 (orders_de.order_id='" & txtorderid.text & "') AND (orders_de.numberofreceives > 0) And (orders.status ='1')And (orders.isreceive='unreceipt')" With rsorder If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open sqlorder If.RecordCount <> 0 Then OrderVat =.Fields("NumVat").Value Set mfgre.datasource = rsorder VerifyOrderDetail Call ShowHSHFlexGrid Call Hshflexgrid Private Sub Command1_Click() Me.FrameSearch.Visible = False ccc Private Sub Form_Load() Lblusername.Caption = nameuser2 DataFalseEnabled lbldate.caption = Format(Now, "dd/mm/yyyy") lblnudrec.caption = Format(Now, "dd/mm/yyyy") dtppaiddate.value = DateAdd("d", 2, Date) dtppaiddate.value = DateThai(Date) Set Conn = New ADODB.Connection Conn.ConnectionString = strconn Conn.Open ' On Error GoTo Err_Load Set Conn = New ADODB.Connection Conn.ConnectionString = strconn Conn.Open Dim sqlvat As String sqlvat = "SELECT * FROM Logins" With rsvat If.State = adstateopen Then.Close.CursorType = adopenforwardonly

104 " ").CursorLocation = aduseclient.open sqlvat If.RecordCount <> 0 Then calvat =.Fields("vatorder").Value Label23.Caption = calvat Dim AllRecord As String Dim i As Integer strsql = "SELECT rec_id,total2 FROM receivers" With rsreceive If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open strsql If.RecordCount <> 0 Then.MoveLast ' Òà Ó˹ µñçá»ããñº èò AllRecord, RecordA AllRecord =.Fields("rec_id").Value 'RE ' ÒõÑé àå ÕèÍѵâ¹ÁÑµÔ lblrec_id.caption = "Re" & Format(Int(Mid(AllRecord, 3)) + 1, Else: lblrec_id.caption = "Re " Me.dtpPaidDate.Enabled = True Me.cmdSearch.Enabled = True Call ShowHSHFlexGrid Call Hshflexgrid cmdadd.enabled = False Me.FrameSearch.Visible = False lblprice.caption = "0.00" lblqty.caption = "0" lbltongrub.caption = "0.00" txtrub.text = "0.00" 'txtdc.text = "0" lbltotal.caption = "0.00" lblpro_instock.caption = "0"

105 lblremain.caption = "0" 'lblsum.caption = "0" Me.cmdSearch.Enabled = False Me.dtpPaidDate.Enabled = False Me.txtOrderID.Enabled = False cmddata.enabled = False CmdReport.Enabled = False cmdsearch.enabled = True cmdsave.enabled = False 'cmdend.enabled = False 'Call showid txtreceiver.enabled = False Frame3.Enabled = True Lblusername.Caption = nameuser2 'Err_Load: 'MsgBox Err.Description, vbcritical + vbokonly, "System Error Load" Private Sub ShowHSHFlexGrid() With mfgreceive.textmatrix(0, 0) = "ÃËÑÊÊÔ¹ éò".colwidth(0) = 1800.TextMatrix(0, 1) = " ª èíêô¹ éò".colwidth(1) = 2600.TextMatrix(0, 2) = "ÃÒ Ò/˹èÇÂ".ColWidth(2) = 1000.TextMatrix(0, 3) = " ÂÍ ÃѺÁÒ ".ColWidth(3) = 1000.TextMatrix(0, 4) = " ÃѺ+ ÅÑ ".ColWidth(4) = 1000.TextMatrix(0, 5) = " éò ÃѺ".ColWidth(5) = 1000.TextMatrix(0, 6) = "ÃÒ ÒÃÇÁ".ColWidth(6) = 1000 '.TextMatrix(0, 7) = " ÀÒÉÕ" '.ColWidth(7) = 1000.TextMatrix(0, 7) = " ӹǹÊÑè «éí".colwidth(8) = 0.TextMatrix(0, 8) = " ÅÑ ".ColWidth(9) = 0.TextMatrix(0, 9) = " ӹǹÃѺä é"

106 & "')".TextMatrix(0, 10) = "xxx".colwidth(10) = 0 Private Sub mfgre_click() Dim rsreceive As New ADODB.Recordset If mfgre.textmatrix(1, 0) = " " Then Exit Sub With mfgre Dim NewRow As Integer NewRow =.Row txtpro_id.text =.TextMatrix(NewRow, 0) lblpro_name.caption =.TextMatrix(NewRow, 1) lblprice.caption =.TextMatrix(NewRow, 2) lblqty.caption =.TextMatrix(NewRow, 3) 'txtdc.text =.TextMatrix(NewRow, 4) lbltotal.caption =.TextMatrix(NewRow, 4) lbltongrub.caption =.TextMatrix(NewRow, 5) txtrub.text =.TextMatrix(NewRow, 5) NumCount =.TextMatrix(NewRow, 6) strsql = "SELECT * FROM products Where (pro_id='" & txtpro_id.text With rsreceive If.State = adstateopen Then.Close.CursorType = adopenforwardonly.cursorlocation = aduseclient.open strsql If.RecordCount <> 0 Then lblpro_instock = Int(.Fields("pro_instock").Value) txtrub.setfocus Private Sub mfgreceive_click() With mfgreceive Dim NewRow As Integer NewRow =.Row If.Rows = 2 Then Exit Sub If.TextMatrix(NewRow, 0) = "" Then Exit Sub txtpro_id.text =.TextMatrix(NewRow, 0)

107 lblpro_name.caption =.TextMatrix(NewRow, 1) lblprice.caption =.TextMatrix(NewRow, 2) txtrub.text =.TextMatrix(NewRow, 3) ' txtdc.text =.TextMatrix(NewRow, 5) lblremain.caption =.TextMatrix(NewRow, 5) lbltotal.caption =.TextMatrix(NewRow, 6) lblqty.caption =.TextMatrix(NewRow, 8) lblpro_instock.caption =.TextMatrix(NewRow, 9) lbltongrub.caption =.TextMatrix(NewRow, 10) '.RemoveItem NewRow ' cmdsave.enabled = True Private Sub txtdc_change() If txtdc.text = "" Then txtdc.text = "0" txtdc.selstart = 0 txtdc.sellength = Len(txtDc.Text) Calculate Private Sub txtdc_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then cmdadd_click Private Sub txtaccdur_id_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii))

108 If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 Private Sub txtre_id_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 Private Sub txtsup_id_keypress(keyascii As Integer) Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 Private Sub txtnumsong_keypress(keyascii As Integer) If KeyAscii = 13 Then cmdsearch_click Private Sub txtrub_change() Dim a As Integer Dim b As Integer a = 0 a = Int(Val(txtrub.Text)) b = Int(Val(lbltongrub.Caption)) If a > b Then

109 'MsgBox " س ÃÍ Ó¹Ç¹ÊÔ¹ éòà Ô¹ ÕèÊÑè «éí ÃØ³Ò ÃÍ éíáùåãëáè éçâ!!!", vbokonly + vbcritical, " Óൠ͹" a = b txtrub.text = Val(lbltongrub.Caption) txtrub.setfocus If txtrub.text = "" Then txtrub.text = "0" txtrub.selstart = 0 txtrub.sellength = Len(txtrub.Text) cmdadd.enabled = True Calculate Private Sub txtpro_id_keypress(keyascii As Integer) 'Dim Character As String ' Character = " " ' KeyAscii = Asc(Chr(KeyAscii)) ' If KeyAscii > 26 Then ' If InStr(Character, Chr(KeyAscii)) = 0 Then ' KeyAscii = 0 ' ' Private Sub ClearText() Dim i As Integer Dim myctl As Control For Each myctl In Controls If TypeOf myctl Is TextBox Then myctl.text = "" Next For Each myctl In Controls If TypeOf myctl Is ComboBox Then myctl.text = "" Next Private Sub ShowID() Dim AllRecord As String Dim i As Integer strsql = "SELECT rec_id,total2 FROM receivers" With rsreceive If.State = adstateopen Then.Close.CursorType = adopenforwardonly

110 .CursorLocation = aduseclient.open strsql If.RecordCount <> 0 Then.MoveLast ' Òà Ó˹ µñçá»ããñº èò AllRecord, RecordA AllRecord =.Fields("rec_id").Value 'RE ' ÒõÑé àå ÕèÍѵâ¹ÁÑµÔ lblrec_id.caption = "Re" & Format(Int(Mid(AllRecord, 3)) + 1, " ") Else: lblrec_id.caption = "Re " Me.dtpPaidDate.Enabled = True Me.cmdSearch.Enabled = True Sub clearsub() txtpro_id.text = "" lblpro_name.caption = "" lblqty.caption = "0" lblprice.caption = "0" txtrub.text = "0" lblpro_instock.caption = "0" lbltotal.caption = "0" lbltongrub.caption = "0" lblremain.caption = "0" ' txtnumsong.text = "" ' txtdc.text = "0" Private Sub Hshflexgrid() With mfgre.textmatrix(0, 0) = " ÃËÑÊÊÔ¹ éò ".ColWidth(0) = 1800.TextMatrix(0, 1) = " ª èíêô¹ éò".colwidth(1) = 2500.TextMatrix(0, 2) = "ÃÒ Ò/˹èÇÂ".ColWidth(2) = 1000.TextMatrix(0, 3) = " ӹǹ".ColWidth(3) = 800.TextMatrix(0, 4) = "ÃÇÁà»ç¹à Ô¹"

111 .ColWidth(4) = 1000.TextMatrix(0, 5) = " ӹǹ ÕèµéÍ ÃѺ".ColWidth(5) = 1200.TextMatrix(0, 6) = "xxx".colwidth(6) = 0.TextMatrix(0, 7) = "xxx".colwidth(7) = 0 Private Sub cmdsave_click() Dim i As Integer Dim sqlsave As String Dim comsave As New ADODB.Command If MsgBox(" سµéÍ Òúѹ Ö ÃÒ Òà ãªèëã ÍäÁè?", vbyesno + vbquestion, " Ó ¹Âѹ") = vbyes Then Conn.BeginTrans sqlsave = "INSERT INTO [Receivers] (Rec_id, Rec_date,Sup_id, Order_id, Paid_date,Vat,Total2,NumberToPaid,Ispaid)" sqlsave = sqlsave & " VALUES('" & lblrec_id.caption & "'," sqlsave = sqlsave & "'" & lblnudrec.caption & "'," ' sqlsave = sqlsave & "'" & Format(DateThaiFormat2(lblDate), "mm/dd/yyyy") & "'," sqlsave = sqlsave & "'" & lblsupid.caption & "'," sqlsave = sqlsave & "'" & txtorderid.text & "'," sqlsave = sqlsave & "'" & Format(DateThaiFormat(dtpPaidDate), "mm/dd/yyyy") & "'," sqlsave = sqlsave & "" & CDbl(lblVat.Caption) & "," ' sqlsave = sqlsave & "" & CInt(lblDc.Caption) & "," sqlsave = sqlsave & "" & CDbl(lblsum.Caption) & "," sqlsave = sqlsave & "" & CDbl(lblsum.Caption) & "," sqlsave = sqlsave & "'0')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute 'ºÑ¹ Ö Å ã¹ãòâåðàíõâ ÒÃÃѺ With mfgreceive For i = 1 To.Rows 2 NumberToReceives =.TextMatrix(i, 5)

112 sqlsave = " INSERT INTO [Receivers_DE] (Rec_id, Pro_id, Pro_name,Pro_cost,Rec_sum,Remainorder, Rec_total)" sqlsave = sqlsave & " VALUES('" & lblrec_id.caption & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 0) & "'," sqlsave = sqlsave & "'" &.TextMatrix(i, 1) & "'," sqlsave = sqlsave & "" & CDbl((.TextMatrix(i, 2))) & "," sqlsave = sqlsave & "" & CInt(.TextMatrix(i, 3)) & "," sqlsave = sqlsave & "" & CInt(.TextMatrix(i, 5)) & "," sqlsave = sqlsave & "" & CLng((.TextMatrix(i, 6))) & ")" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute ' 'ÊÑè Update ã¹µòãò ÊÔ¹ éò '... Dim ProductInOrder As Integer Dim ProductInShop As Integer ' Dim sqlproduct As String ' Dim rsproduct As New ADODB.Recordset ' With mfgreceive ' ' For i = 1 To.Rows 1 ' sqlsave = "INSERT INTO [Products_DE] (Pro_id,Rec_id,Date_MFD,Date_EXP,Rec_qty)" ' sqlsave = sqlsave & " VALUES('" &.TextMatrix(i, 0) & "'," ' sqlsave = sqlsave & "'" & lblrec_id.caption & "'," ' sqlsave = sqlsave & "'" & lbldate.caption & "'," ' sqlsave = sqlsave & "'" & lbldate.caption & "'," ' sqlsave = sqlsave & "'" & CInt(.TextMatrix(i, 3)) & "')" ' ' With comsave ' '.CommandType = adcmdtext '.CommandText = sqlsave '.Execute ' '

113 ' sqlsave = "Update products SET pro_instock = '" &.TextMatrix(i, 4) & "'" ' sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "')" Dim Upproprice As Double Dim priceori As Double priceori = CDbl((CDbl(CDbl(.TextMatrix(i, 2)) * CInt(.TextMatrix(i, 7))) / CInt(.TextMatrix(i, 10))) /.TextMatrix(i, 7)) Upproprice = priceori + (priceori * 0.3) sqlsave = "Update products SET pro_instock = '" &.TextMatrix(i, 4) & "'," sqlsave = sqlsave & " Pro_price = '" & Format(CStr(Upproprice), "#,###0.00") & "'" sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute sqlsave = "Update Supplier_pro SET Pro_cost = '" & CDbl((CDbl(CDbl(.TextMatrix(i, 2)) * CInt(.TextMatrix(i, 7))) / CInt(.TextMatrix(i, 10))) /.TextMatrix(i, 7)) & "'" ' sqlsave = "Update Supplier_pro SET Pro_cost = '" & CDbl(CDbl(.TextMatrix(i, 2)) & "'*'" & CInt(.TextMatrix(i, 7))) & "'/'" & CInt(.TextMatrix(i, 10)) & "'" sqlsave = sqlsave & " WHERE(pro_id = '" &.TextMatrix(i, 0) & "')" With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute 'ÊÑè Update ã¹µòãòâåðàíõâ ÊÑè «éí sqlsave = "Update orders_de SET NumberofReceives= '" &.TextMatrix(i, 5) & "' "

114 sqlsave = sqlsave & " WHERE(order_id = '" & txtorderid.text & "') and (pro_id = '" & mfgreceive.textmatrix(i, 0) & "') " With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute Next sqlsave = "Update orders SET ISNOreceive = '1' " 'sqlsave = sqlsave & "Where (orders_detail.ordersid='" & dcborder_id.text & "')" sqlsave = sqlsave & " WHERE (order_id = '" & txtorderid.text & "') " With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute If Text1.Text = Text2.Text Then sqlsave = "Update orders SET IsReceive = 'Receipt' " 'sqlsave = sqlsave & "Where (orders_detail.ordersid='" & dcborder_id.text & "')" sqlsave = sqlsave & " WHERE (order_id = '" & txtorderid.text & "') " With comsave.commandtype = adcmdtext.commandtext = sqlsave.execute Conn.CommitTrans MsgBox "ºÑ¹ Ö ÃÒ Òà àãõâºãéíâáåéç!!!", vbokonly + vbinformation, "¼Å ÒÃ Ó Ò¹" receiveid = lblrec_id.caption Me.lblnet1.Caption = "0.00" Me.lblVat.Caption = "0.00" Me.lblsum.Caption = "0.00"

115 Me.lblDc.Caption = "0.00" Me.lblsumnet.Caption = "0.00" Me.cmdSearch.Enabled = False Frame3.Enabled = True cmddata.enabled = True cmdsave.enabled = False CmdReport.Enabled = True Check1.Value = Unchecked Check2.Value = Unchecked cmdcancel_click ccc With Me.mfgSearch.clear ' Frame3.Enabled = True ' cmddata.enabled = True ' cmdsave.enabled = False ' cmdreport.enabled = True ' Check1.Value = Unchecked ' Check2.Value = Unchecked ' cmdcancel_click ' ccc Private Sub sumsalescustomer1() Dim newrows As Integer Dim su As Integer Dim i As Integer With mfgreceive For i = 1 To mfgreceive.rows 2 su = su + CInt(mfgreceive.TextMatrix(i, 3)) Next Text2.Text = Format(su, "#,##0.00") Private Sub sumsalescustomer2() Dim newrows As Integer Dim sums As Integer Dim i As Integer With mfgre For i = 1 To mfgre.rows 1

116 ' sums = sums + CInt(mfgre.TextMatrix(i, 5)) sums = sums + CInt(mfgre.TextMatrix(i, 5)) Next Text1.Text = sums ' Text1.Text = Format(sums, "#,##0.00") Private Sub Clearmfgreceive() Dim i As Integer With Me.mfgreceive For i = 1 To.Rows 1 If.Rows > 2 Then.Rows =.Rows 1.clear Next Call ShowID Private Sub Clearmfgre() Dim i As Integer With Me.mfgre For i = 1 To.Rows 1 If.Rows > 2 Then.Rows =.Rows 1.clear Next Private Sub CalculateNet() Dim i As Integer Dim vat As Double Net = 0 With mfgreceive For i = 1 To.Rows 2 Net = Net + Int(.TextMatrix(i, 6)) Next lblnet1.caption = Format(Net, "#,##0.00") vat = CDbl(CInt((Net) * Label23.Caption / 100))

117 lblvat.caption = Format(vat, "#,##0.00") ' lblvat.caption = Format(CInt((net) * OrderVat / 100), "#,##0.00") lblsum.caption = Format(CDbl(Net + vat), "#,##0.00") ' lblsum.caption = Format(CInt(lblnet1.Caption) + CInt(lblVat.Caption), "#,##0.00") ' ÒÃÃÇÁÃÒÂ ÒÃ Private Sub ClearreceiveData() lblsupid.caption = "" lblsup.caption = "" lblnudrec.caption = "" txtorderid.text = "" Me.txtpro_id.Text = "" Me.lblpro_name.Caption = "" Me.lblprice.Caption = "0" Me.lbltongrub.Caption = "0" Me.lblqty.Caption = "0" Me.lblpro_instock.Caption = "0" Me.lblTotal.Caption = "0" Me.lblsum.Caption = "0.00" Me.lblremain.Caption = "0" Me.lblrec_id.Caption = "" Private Sub ClearreceivedetailData() txtpro_id.text = "" lblpro_name.caption = "" lblprice.caption = "0.00" lblqty.caption = "0" lbltotal.caption = "0.00" lbltongrub.caption = "0.00" Private Sub DataFalseEnabled() ' Me.cbosup.Enabled = False ' Me.cbosup.BackColor = &H ' Me.dcborder_date.Enabled = False ' Me.dcborder_date.BackColor = &H ' ' Me.dcbOrder_id.Enabled = False Me.dcbOrder_id.BackColor = &H Me.txtpro_id.Enabled = False Me.txtpro_id.BackColor = &H

118 ' Me.lblprice.Caption = False ' Me.lblprice.BackColor = &H ' Me.lblqty.Caption = False ' Me.lblqty.BackColor = &H Private Sub DataTrueEnabled() ' Me.cbosup.Enabled = True ' Me.cbosup.BackColor = &H ' Me.dcborder_date.Enabled = True ' Me.dcborder_date.BackColor = &H ' ' Me.dcbOrder_id.Enabled = True Me.dcbOrder_id.BackColor = &H Me.txtpro_id.Enabled = True Me.txtpro_id.BackColor = &HC0FFFF 'Me.lblprice.Enabled = True 'Me.lblprice.BackColor = &H 'Me.lblqty.Caption = False 'Me.lblqty.BackColor = &H Private Sub Calculate() Dim cost As Long Dim Quantity As Long Dim Discount As Long Dim Rub As Long Dim Dcsum As Long Dim Total1 As Long Dim total As Long Dim Dcper As Long Dim remain As Integer Dim Receiver As Integer Total1 = CLng(CDbl(lblprice.Caption) * CInt(txtrub.Text)) remain = (CInt(lbltongrub.Caption) CInt(txtrub.Text)) Receiver = (CInt(lblqty.Caption) CInt(lbltongrub.Caption)) txtreceiver.text = Receiver lblremain.caption = remain total = Total1 - Dcsum lbldcsum.caption = Dcsum lbltotal.caption = Format(total, "#,##0.00") Private Sub txtrub_gotfocus() cmdadd.enabled = True Private Sub txtrub_keypress(keyascii As Integer)

119 Dim Character As String Character = " " KeyAscii = Asc(Chr(KeyAscii)) If KeyAscii > 26 Then If InStr(Character, Chr(KeyAscii)) = 0 Then KeyAscii = 0 If KeyAscii = 13 Then Me.txtrub.SetFocus txtrub.text = "0" Private Sub GridSearch() With mfgsearch.textmatrix(0, 0) = "àå ÕèãºÊÑè «éí".textmatrix(0, 1) = "Çѹ¹Ñ ÃѺÊÔ¹ éò".textmatrix(0, 2) = "ÃËÑʵÑÇá ¹ Ó˹èÒÂ".TextMatrix(0, 3) = "ª èíºãôéñ µñçá ¹ Ó˹èÒÂ".ColWidth(0) = 1200.ColWidth(1) = 1200.ColWidth(2) = 0.ColWidth(3) = 2500 Private Sub VerifyOrderDetail() Dim i As Integer Dim ProPprice As Long 'Dim Paidmont As Long 'Dim tmpvalue As Long Dim Netprice As Long 'Dim NetPriceReceived As Long 'Dim datetime1 As Date With mfgre For i = 1 To.Rows 1 ProPprice =.TextMatrix(i, 2)

120 .TextMatrix(i, 2) = Format(ProPprice, "#,##0.00") Netprice =.TextMatrix(i, 4).TextMatrix(i, 4) = Format(Netprice, "#,##0.00") Next

121 บทน าเสนอโครงงานเทคโนโลย สารสนเทศธ รก จ 1 ประจ าภาคเร ยนท 1/2549 ว ชา : โครงงานเทคโนโลย สารสนเทศธ รก จ 1 จ านวน 1 หน วยก ต (0-2-0) ช อโครงงาน : ระบบซ อ-ขาย ร านส ทธ น นท การไฟฟ า รายช อผ ศ กษาโครงงาน : 1. นายว เช ยร บ ตราช รห สประจ าต ว อาจารย ท ปร กษาโครงงาน : อาจารย ประภาภรณ ช บส วรรณ (...) กรรมการท ปร กษา ว นท.../.../... (...) กรรมการคนท 1 ว นท.../.../... (...) กรรมการคนท 2 ว นท.../.../...

ต วอย างการสร างฟอร ม เมน การใช งาน

ต วอย างการสร างฟอร ม เมน การใช งาน ต วอย างการสร างฟอร ม เมน การใช งาน Option Explicit Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim Sql As String Private Sub Command6_Click() Form2.Hide Form3.Show Private Sub Command7_Click()

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara 61 LAMPIRAN 61 Listing Program Form 1 ( Barang ) Dim CnSuzuya As ADODB.Connection Dim CommBar As ADODB.Command Dim rsbar As ADODB.Recordset Dim StrSql As String Dim psn As Byte Private Sub Form_Load()

More information

ว ธ การต ดต ง Symantec Endpoint Protection

ว ธ การต ดต ง Symantec Endpoint Protection ว ธ การต ดต ง Symantec Endpoint Protection 1. Download File ส าหร บการต ดต ง 2. Install Symantec Endpoint Protection Manager 3. Install License 4. Install Symantec Endpoint Protection Client to Server

More information

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is InputBox( ) Function An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is A = InputBox ( Question or Phrase, Window Title, ) Example1: Integer:

More information

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara LAMPIRAN FORM 1 Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = vbkeyreturn Then Set tbladministrator = New ADODB.Recordset With tbladministrator.open "SELECT * FROM Administrator WHERE userid

More information

Rooftop Industries Pvt. Ltd.

Rooftop Industries Pvt. Ltd. Rooftop Industries Pvt. Ltd. Production and inventory management system A level Computing Project Shritesh Bhattarai Little Angels' College 1 Table of Contents Definition, investigation and analysis...

More information

Programming with visual Basic:

Programming with visual Basic: Programming with visual Basic: 1-Introdution to Visual Basics 2-Forms and Control tools. 3-Project explorer, properties and events. 4-make project, save it and its applications. 5- Files projects and exercises.

More information

C Programming

C Programming 204216 -- C Programming Chapter 5 Repetition Adapted/Assembled for 204216 by Areerat Trongratsameethong Objectives Basic Loop Structures The while Statement Computing Sums and Averages Using a while Loop

More information

LAMPIRAN LIST PROGRAM

LAMPIRAN LIST PROGRAM LAMPIRAN LIST PROGRAM 1. Modules Public conn As New ADODB.Connection Public rstb_pendekatan As ADODB.Recordset Public rstb_solusi As ADODB.Recordset Public rstb_alasan As ADODB.Recordset Public rstb_pilihan

More information

Private Sub Command2_Click() End End Sub. Private Sub Command3_Click() frmchangepassword.show End Sub. Private Sub Form_Activate() check_db End Sub

Private Sub Command2_Click() End End Sub. Private Sub Command3_Click() frmchangepassword.show End Sub. Private Sub Form_Activate() check_db End Sub Private Sub Command1_Click() On Error Resume If rs.state = adstateopen Then rs.close rs.open "select * from login where UserName='" & txtusername & "' And Log_Password='" & txtpassword & "'", conn, 1,

More information

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub

LISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub LISTING PROGRAM 1. Form Login Private Sub BATAL_Click() End Sub Bersih() USERNAME.Text = "" PASSWORD.Text = "" Private Sub Form_Load() Bersih Private Sub OK_Click() Sql = "select*from tbl_login where username='"

More information

Verified by Visa Activation Service For Cardholder Manual. November 2016

Verified by Visa Activation Service For Cardholder Manual. November 2016 Verified by Visa Activation Service For Cardholder Manual November 2016 Table of Contents Contents Registration for Card Holder verification on ACS... 3 1. Direct Activation... 4 2. Changing personal information

More information

C Programming

C Programming 204216 -- C Programming Chapter 9 Character Strings Adapted/Assembled for 204216 by Areerat Trongratsameethong A First Book of ANSI C, Fourth Edition Objectives String Fundamentals Library Functions Input

More information

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY

NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY UNESCO-NIGERIA TECHNICAL & VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY OOBASIC/VISUAL BASIC PROGRAMMING COURSE CODE: COM 211 YEAR I SEMESTER II PRACTICAL

More information

22. VB Programming Fundamentals Data Access with Data Objects

22. VB Programming Fundamentals Data Access with Data Objects 22. VB Programming Fundamentals Data Access with Data Objects 22.1 Data Access Object MS Data Access Object (DAO) enables you to use a programming language to access and manipulate data in local or remote

More information

Chapter 9: Virtual-Memory Management Dr. Varin Chouvatut. Operating System Concepts 8 th Edition,

Chapter 9: Virtual-Memory Management Dr. Varin Chouvatut. Operating System Concepts 8 th Edition, Chapter 9: Virtual-Memory Management Dr. Varin Chouvatut, Silberschatz, Galvin and Gagne 2010 Chapter 9: Virtual-Memory Management Background Demand Paging Copy-on-Write Page Replacement Allocation of

More information

ISI Web of Science. SciFinder Scholar. PubMed ส บค นจากฐานข อม ล

ISI Web of Science. SciFinder Scholar. PubMed ส บค นจากฐานข อม ล 2.3.3 Search Chem. Info. in Journal ส บค นจากฐานข อม ล - ฐานข อม ลท รวบรวมข อม ลของ journal จากหลาย ๆ แหล ง ISI http://portal.isiknowledge.com/portal.cgi/ SciFinder ต องต ดต งโปรแกรมพ เศษ และสม ครสมาช

More information

Understanding the MsgBox command in Visual Basic

Understanding the MsgBox command in Visual Basic Understanding the MsgBox command in Visual Basic This VB2008 tutorial explains how to use the MsgBox function in Visual Basic. This also works for VBS MsgBox. The MsgBox function displays a message in

More information

PROGRAM 1: SIMPLE CALCULATOR

PROGRAM 1: SIMPLE CALCULATOR PROGRAM 1: SIMPLE CALCULATOR Option Explicit Dim operand1 As Double, operand2 As Double Dim op1 As Double, op2 As Double Dim operator As String Dim cleardisplay As Boolean Private Sub Cmdclear_Click()

More information

What s Hot & What s New from Microsoft ส มล อน นตธนะสาร Segment Marketing Manager

What s Hot & What s New from Microsoft ส มล อน นตธนะสาร Segment Marketing Manager What s Hot & What s New from Microsoft ส มล อน นตธนะสาร Segment Marketing Manager 1 โปรแกรมท น าสนใจส าหร บไตรมาสน Crisis Turing Point II Oct-Dec 09 Windows 7 งานเป ดต วสาหร บล กค าท วไป, Paragon Hall,

More information

Definition, Investigation and Analysis

Definition, Investigation and Analysis Definition, Investigation and Analysis Introduction and Nature of the Problem Introduction Pradhan Store is a wholesale store located in Nakhipot, Lalitpur. It has been providing its service since the

More information

ก Microsoft Visual Studio 2008

ก Microsoft Visual Studio 2008 ก 58 ก ก ก ก ก 58 59 ก Microsoft Visual Studio 2008 1. DVD ก MSVS2008 ก MSVS2008 ก ก MSVS2008 ก ก 180 DVD DVD ก MSVS2008 ก ก Install Visual Studio 2008 2. ก ก ก ก ก Next 3. ก ก Options Page ก Custom ก

More information

Visual Basic ,

Visual Basic , Visual Basic 6.0..!"# !"# $#%$$"& ( ( 6.0) 2 $, -&, - 1.,. Caption Hello, On O ff. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm. 2/59 !"# $#%$$"& ( ( 6.0) 3 $, -&, - 3/59 !"# $#%$$"&

More information

Chapter 4. Introducing Oracle Database XE 11g R2. Oracle Database XE is a great starter database for:

Chapter 4. Introducing Oracle Database XE 11g R2. Oracle Database XE is a great starter database for: Oracle Database XE is a great starter database for: Chapter 4 Introducing Oracle Database XE 11g R2 Developers working on PHP, Java,.NET, XML, and Open Source applications DBAs who need a free, starter

More information

Fundamentals of Database Systems

Fundamentals of Database Systems 204222 - Fundamentals of Database Systems Chapter 24 Database Security Adapted for 204222 by Areerat Trongratsameethong Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Outline

More information

EMPLOYEE PAYROLL SYSTEM

EMPLOYEE PAYROLL SYSTEM EX.NO:1 DATE: EMPLOYEE PAYROLL SYSTEM AIM: To develop a Employee Payroll System using visual Basic. PROCEDURE: 1. Problem statement Software is to be designed for supporting a computerized employee payroll

More information

Please answer questions in the space provided. Question point values are shown in parentheses.

Please answer questions in the space provided. Question point values are shown in parentheses. IS 320 Spring 99 Page 1 Please answer questions in the space provided. Question point values are shown in parentheses. 1. (15) Assume you have the following variable declarations and assignments: Dim A

More information

Visual Basic , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm.

Visual Basic , ,. Caption Hello, On Off. * + +, -. 1-Arrow, , 2- Cross. - project1.vbp, 4-form1.frm. Visual Basic 6.0 1.,. Caption Hello, On Off. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm...!"# 2/59 3...

More information

Chapter 3 Outline. Relational Model Concepts. The Relational Data Model and Relational Database Constraints Database System 1

Chapter 3 Outline. Relational Model Concepts. The Relational Data Model and Relational Database Constraints Database System 1 Chapter 3 Outline 204321 - Database System 1 Chapter 3 The Relational Data Model and Relational Database Constraints The Relational Data Model and Relational Database Constraints Relational Model Constraints

More information

INPUT Input point Measuring cycle Input type Disconnection detection Input filter

INPUT Input point Measuring cycle Input type Disconnection detection Input filter 2 = TEMPERATURE CONTROLLER PAPERLESS RECORDER หน าจอเป น Touch Sceen 7-Inch LCD เก บข อม ลผ าน SD Card และ USB Memory ร บ Input เป น TC/RTD/DC Voltage/DC Current ร บ Input 6 Channel ช วงเวลาในการอ านส

More information

Fuji Electric Corporation. MICREX-F Series SIO

Fuji Electric Corporation. MICREX-F Series SIO Fuji Electric Corporation MICREX-F Series SIO 1... 3 2 3 ก ก ก ก... 5 ก ก... 6 4 ก... 22 5 ก... 26 6 ก... 38 7 ก... 40 8... 41 1 (GP3000 series) ก ก ก (PLC ) ก 1 ก ก SIO 1 ( 3) 2 ก ก ก ก ก ( ) ก ก 2 ก

More information

โปรแกรมท น าสนใจส าหร บไตรมาสน

โปรแกรมท น าสนใจส าหร บไตรมาสน แคมเปญ และก จกรรมทางการตลาด (ต ลาคม ธ นวาคม 2552) โปรแกรมท น าสนใจส าหร บไตรมาสน Crisis Turing Point II Oct-Dec 09 Windows 7 งานเป ดต วสาหร บล กค าท วไป, Paragon Hall, 31 Oct -1 Nov งานเป ดต วสาหร บล กค

More information

LISTING PROGRAM. Form Splash

LISTING PROGRAM. Form Splash LISTING PROGRAM Form Splash Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblproductname.caption = App.Title lblcopyright.caption = App.LegalCopyright

More information

CPE 426 Computer Networks. Chapter 5: Text Chapter 23: Support Protocols

CPE 426 Computer Networks. Chapter 5: Text Chapter 23: Support Protocols CPE 426 Computer Networks Chapter 5: Text Chapter 23: Support Protocols 1 TOPICS สร ปเร อง IP Address Subnetting Chapter 23: Supporting Protocols ARP: 23.1-23.7 ใช ส าหร บหา HW Address(MAC Address) ICMP:

More information

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function:

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function: Lookup Project frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function: Help About, in a Message Box lookup.vbp programmed by C.Gribble Page 2 Code for

More information

ภาคผนวก ก. Source Code

ภาคผนวก ก. Source Code ภาคผนวก ภาคผนวก ก. Source Code 154 155 Source Code ช อ Empbook Option Explicit On Option Strict On Imports System.data Imports System.Data.OleDb Public Class Empbook Dim Book_status As Integer = 1 'ęğŀşľłŀăăő

More information

L A M P I R A N. Universitas Sumatera Utara

L A M P I R A N. Universitas Sumatera Utara L A M P I R A N A TAMPILAN PROGRAM 1. Form Login 2. Form Menu Utama 3. Form Entry Data Mahasiswa Baru 4. Form Kasir 5. Form Transaksi 6. Laporan cetak mahasiswa 6. Laporan cetak mahasiswa 7. Laporan cetak

More information

บทท 4 ข นตอนการทดลอง

บทท 4 ข นตอนการทดลอง บทท 4 ข นตอนการทดลอง ในบทน จะท าการทดลองในส วนของซ นเซอร ว ดอ ณหภ ม เพ อผลท ได มาใช ในการเข ยน โปรแกรมและท าโครงงานให ได ประส ทธ ภาพข น 4.1 การทดสอบระบบเซ นเซอร ว ตถ ประสงค การทดลอง ว ตถ ประสงค ของการทดลองน

More information

เคร องว ดระยะด วยแสงเลเซอร แบบม อถ อ ย ห อ Leica DISTO ร น D110 (Bluetooth Smart) ประเทศสว ตเซอร แลนด

เคร องว ดระยะด วยแสงเลเซอร แบบม อถ อ ย ห อ Leica DISTO ร น D110 (Bluetooth Smart) ประเทศสว ตเซอร แลนด เคร องว ดระยะด วยแสงเลเซอร แบบม อถ อ ย ห อ Leica DISTO ร น D110 (Bluetooth Smart) ประเทศสว ตเซอร แลนด 1. ค ณล กษณะ 1.1 เป นเคร องว ดระยะทางด วยแสงเลเซอร แบบม อถ อ 1.2 ความถ กต องในการว ดระยะทางไม เก น

More information

L A M P I R A N. Universitas Sumatera Utara

L A M P I R A N. Universitas Sumatera Utara L A M P I R A N LISTING PROGRAM 1. Listing Pembuka Dim strado$ Dim n As Integer Private Sub Close_Click() End Private Sub Command1_Click() If Option1.Value = True Then Search.Show If Option2.Value = True

More information

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6 HARP_VB projet en VB6 Option Explicit Dim Value As Integer Dim i As Integer Dim il As Long Dim LL, L1S, L250µS, L500µS, L1mS, L2mS, L5mS, L10mS As Single Dim offsetdepart As Long Dim police(256, 8) As

More information

Lab 10: Structs and Enumeration

Lab 10: Structs and Enumeration Lab 10: Structs and Enumeration There is one more way to create your own value types in C#. You can use the struct keyword. A struct (short for structure) can have its own fields, methods, and constructors

More information

ONLINE RAILWAY RESERVATION SYSTEM

ONLINE RAILWAY RESERVATION SYSTEM Ex. No: Date: ONLINE RAILWAY RESERVATION SYSTEM AIM: methodologies To develop a software for online railway reservation system project by using software ALGORITHM: Step1: Open a VB project. Step2: Design

More information

LAMPIRAN 1. Kode Program Splash Screen

LAMPIRAN 1. Kode Program Splash Screen LAMPIRAN 1 Kode Program Splash Screen Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblproductname.caption = App.Title lblcopyright.caption

More information

District Institute of Education and Training Lawspet, Puducherry.

District Institute of Education and Training Lawspet, Puducherry. District Institute of Education and Training Lawspet, Puducherry. Educational Computing Record work done by with the Register Number. Submitted for the Internal Assessment examination, April / May 2011,

More information

The New Effective Tool for Data Migration from Old PACS (Rogan) to New PACS (Fuji Synapse) with Integrated Thai Patient Names

The New Effective Tool for Data Migration from Old PACS (Rogan) to New PACS (Fuji Synapse) with Integrated Thai Patient Names The New Effective Tool for Data Migration from Old PACS (Rogan) to New PACS (Fuji Synapse) with Integrated Thai Patient Names Thanongchai Siriapisith MD*, Trongtum Tongdee MD* * Department of Radiology,

More information

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses. IS 320 Spring 96 Page 1 Please use your own paper to answer the following questions. Point values are shown in parentheses. 1. (10) Consider the following segment of code: If txtansicode.text < "0" Or

More information

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software Ex. No.1 Date: ONLINE COURSE RESERVATION AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software PROBLEM STATEMENT As the head of information systems for

More information

Pointers & Arrays. CS2023 Winter 2004

Pointers & Arrays. CS2023 Winter 2004 Pointers & Arrays CS2023 Winter 2004 Outcomes: Pointers & Arrays C for Java Programmers, Chapter 8, section 8.12, and Chapter 10, section 10.2 Other textbooks on C on reserve After the conclusion of this

More information

Financial Functions (all with subtypes: Normal, Stairs, Points, Height, Hollow, Colors, Marks, No Border except where indicated):

Financial Functions (all with subtypes: Normal, Stairs, Points, Height, Hollow, Colors, Marks, No Border except where indicated): Financial Charting in TeeChart Pro TeeChart Pro has always been at the cutting edge of Financial Charting and the ActiveX v6 makes this very clear; with three distinct financial series and fourteen dedicated

More information

SEARCH STRATEGIES KANOKWATT SHIANGJEN COMPUTER SCIENCE SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY UNIVERSITY OF PHAYAO

SEARCH STRATEGIES KANOKWATT SHIANGJEN COMPUTER SCIENCE SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY UNIVERSITY OF PHAYAO SEARCH STRATEGIES KANKWATT SHIANGJEN CMPUTER SCIENCE SCHL F INFRMATIN AND CMMUNICATIN TECHNLGY UNIVERSITY F PHAYA Search Strategies Uninformed Search Strategies (Blind Search): เป นกลย ทธ การ ค นหาเหม

More information

Visual Basic ,

Visual Basic , Visual Basic 6.0 1.,. Caption Hello, On O ff. * + +, -. 1-Arrow, + - 4 +, 2- Cross. - project1.vbp, 4-form1.frm...!"# 2/59 3...

More information

Specifications 14TB 12TB 10TB 8TB 6TB 4TB 3TB 2TB 1TB

Specifications 14TB 12TB 10TB 8TB 6TB 4TB 3TB 2TB 1TB SEAGATE Internal Harddisk Drive Skyhawk : 3.5 ส นค า ร บประก น 3 ป Smart. Safe. Secure. : Seagate Surveillance-Optimized Storage Seagate SkyHawkค ม ครบ เพ อ อนาคต Hard disk ส าหร บกล องวงจรป ดโดยเฉพาะ

More information

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub

End Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub Source Aplikasi Sistem Informasi Akademik GENERAL Dim db As Connection Dim WithEvents adoprimaryrs1 As Recordset Dim WithEvents adoprimaryrs2 As Recordset Dim WithEvents rscaridata As Recordset Dim cekid

More information

LISTING PROGRAM. 1. Menu Utama

LISTING PROGRAM. 1. Menu Utama LISTING PROGRAM 1. Menu Utama Dim rsupdate As Recordset Dim rscari As Recordset Dim strusername As String * 10 Dim Status As String * 1 Dim JumUser As Integer Public system_mon As String Public service_mon

More information

Programming Concepts and Skills. Arrays continued and Functions

Programming Concepts and Skills. Arrays continued and Functions Programming Concepts and Skills Arrays continued and Functions Fixed-Size vs. Dynamic Arrays A fixed-size array has a limited number of spots you can place information in. Dim strcdrack(0 to 2) As String

More information

ภาคผนวก ก Coding VPN IPSec Site-to-Site

ภาคผนวก ก Coding VPN IPSec Site-to-Site ภาคผนวก 30 ภาคผนวก ก Coding VPN IPSec Site-to-Site Router HQ (R-HQ) hostname R-HQ ip dhcp excluded-address 172.16.100.1 172.16.100.99 ip dhcp excluded-address 172.16.100.200 172.16.100.254 ip dhcp excluded-address

More information

IS311. Data Structures and Java Collections

IS311. Data Structures and Java Collections IS311 Data Structures and Java Collections 1 Algorithms and Data Structures Algorithm Sequence of steps used to solve a problem Operates on collection of data Each element of collection -> data structure

More information

The Control Properties

The Control Properties The Control Properties Figure Before writing an event procedure for the control to response to a user's input, you have to set certain properties for the control to determine its appearance and how it

More information

ร จ กก บ MySQL Cluster

ร จ กก บ MySQL Cluster ร จ กก บ MySQL Cluster ก ตต ร กษ ม วงม งส ข (Kittirak Moungmingsuk) kittirak@clusterkit.co.th May 19, 2012 @ossfestival #11 `whoami` A part of team at Cluster Kit Co.,Ltd. Since 2007. Adjacent Lecturer

More information

On Railway Reservation. U G D C A Semester VI. Roll No DA

On Railway Reservation. U G D C A Semester VI. Roll No DA On Railway Reservation U G D C A Semester VI Submitted to: Dr. P. K. Sen (Co-ordinator) Submitted By: (Name of Student) Roll No. 14836DA Contents 1. Acknowledgement 2. Objectives 3. Declaration 4. Analysis

More information

LAMPIRAN A LISTING PROGRAM. Universitas Sumatera Utara

LAMPIRAN A LISTING PROGRAM. Universitas Sumatera Utara LAMPIRAN A LISTING PROGRAM LISTING PROGRAM MENU UTAMA Dim T As String Dim i Private Sub Dafsis_Click() Form5.Show Private Sub Dafwai_Click() Form5.Show Private Sub Dasis_Click() Form2.Show Private Sub

More information

Crystal Report & Crystal Server 2016

Crystal Report & Crystal Server 2016 Crystal Report & Crystal Server 206 Crystal Report เป นเคร องม อในการสร าง Report ท ม จ ดเด นในความสามารถเช อมต อฐานข อม ลท หลากหลาย เพ อนำา เอาข อม ลมาใช สร างรายงานสำาหร บการใช งานท วไปในงานธ รก จ ประจำาว

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. frmmenu.frm Dim CN As Connection Dim rshapus As Recordset Private Sub DfaHasil_Click() Call frmlap.cetak Private Sub Form_Load() Set CN = New ADODB.Connection CN.ConnectionString

More information

I/O. Output. Input. Input ของจาวา จะเป น stream จะอ าน stream ใช คลาส Scanner. standard input. standard output. standard err. command line file.

I/O. Output. Input. Input ของจาวา จะเป น stream จะอ าน stream ใช คลาส Scanner. standard input. standard output. standard err. command line file. I/O and Exceptions I/O Input standard input keyboard (System.in) command line file Output standard output Screen (System.out) standard err file System.err Input ของจาวา จะเป น stream จะอ าน stream ใช คลาส

More information

Example: How to create a shape from SpecialShapeFactory.

Example: How to create a shape from SpecialShapeFactory. Example: How to create a shape from SpecialShapeFactory. // Create the Cross Shape ArrayList linelist = new ArrayList(); pointlist.add(new Point2D.Double(420.0,152.0)); pointlist.add(new

More information

A Back-End Link Checker for Your Access Database

A Back-End Link Checker for Your Access Database A Back-End for Your Access Database Published: 30 September 2018 Author: Martin Green Screenshots: Access 2016, Windows 10 For Access Versions: 2007, 2010, 2013, 2016 Working with Split Databases When

More information

Excel & Visual Basic for Applications (VBA)

Excel & Visual Basic for Applications (VBA) Class meeting #18 Monday, Oct. 26 th GEEN 1300 Introduction to Engineering Computing Excel & Visual Basic for Applications (VBA) user interfaces o on-sheet buttons o InputBox and MsgBox functions o userforms

More information

JavaScript Framework: AngularJS

JavaScript Framework: AngularJS บทท 8 JavaScript Framework: AngularJS ว ชา เทคโนโลย เว บ (รห สว ชา 04-06-204) ว ตถ ประสงค การเร ยนร เพ อให ผ เร ยนม ความร ความเข าใจเก ยวก บ JavaScript Framework: AngularJS เพ อให ผ เร ยนสามารถนาเสนอการดาเน

More information

This file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version 3.0.

This file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version 3.0. Range: This file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version.. isclaimer The shapes of the reference glyphs used in these code charts

More information

จาวา : Threads สมชาย ประส ทธ จ ตระก ล

จาวา : Threads สมชาย ประส ทธ จ ตระก ล จาวา : Threads สมชาย ประส ทธ จ ตระก ล Threads A thread == A virtual CPU Threads == Virtual CPUs sharing the same memory space running virtually at the same time Java supports multithreading Typically used

More information

Source Code ช อ frmcar

Source Code ช อ frmcar 122 Source Code ช อ frmcar Imports System.Data Imports System.Data.SqlClient Imports System.Globalization Public Class frmcar Dim ds, ds1, dsc As New DataSet Dim hit As DataGridView.HitTestInfo Dim N As

More information

Control Properties. Example: Program to change background color

Control Properties. Example: Program to change background color Control Properties Before writing an event procedure for the control to response to an event, you have to set certain properties for the control to determine its appearance and how will it work with the

More information

Second Year March 2017

Second Year March 2017 Reg. No. :... Code No. 5052 Name :... Second Year March 2017 Time : 2 Hours Cool-off time : 15 Minutes Part III COMPUTER APPLICATION (Commerce) Maximum : 60 Scores General Instructions to Candidates :

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara 67 LAMPIRAN Lampiran A-1 Listing Program Visual Basic Private Sub mn_isidata_click() frm_isi_data.show Me.Hide Private Sub mn_koneksiport_click() frm_koneksi_port.show Me.Hide Private Sub mn_tentang_click()

More information

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples: VBA program units: Subroutines and Functions Subs: a chunk of VBA code that can be executed by running it from Excel, from the VBE, or by being called by another VBA subprogram can be created with the

More information

variables programming statements

variables programming statements 1 VB PROGRAMMERS GUIDE LESSON 1 File: VbGuideL1.doc Date Started: May 24, 2002 Last Update: Dec 27, 2002 ISBN: 0-9730824-9-6 Version: 0.0 INTRODUCTION TO VB PROGRAMMING VB stands for Visual Basic. Visual

More information

LAMPIRAN : LISTING PROGRAM

LAMPIRAN : LISTING PROGRAM LAMPIRAN : LISTING PROGRAM Kode Program Form Login Private Sub cbolevel_click() If cbolevel.text = "Pengguna" Then txtlogin.enabled = False txtpass.enabled = False txtlogin.visible = False txtpass.visible

More information

Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer

Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer (9) Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer. (9). Abstract This research aims to propose a mathematical formula

More information

Angel International School - Manipay 1 st Term Examination November, 2015

Angel International School - Manipay 1 st Term Examination November, 2015 Grade 10 Angel International School - Manipay 1 st Term Examination November, 2015 Information & Communication Technology Duration: 3.00 Hours Part 1 Choose the appropriate answer 1) Find the correct type

More information

กองว ชาประว ต ศาสตร ส วนการศ กษา โรงเร ยนนายร อยพระจ ลจอมเกล า 18 ต ลาคม พ.ศ. 2549

กองว ชาประว ต ศาสตร ส วนการศ กษา โรงเร ยนนายร อยพระจ ลจอมเกล า 18 ต ลาคม พ.ศ. 2549 บ ญช ด ชน เอกสารเก ยวก บประเทศไทยจากส าน กหอจดหมายเหต แห งชาต สหร ฐอเมร กา RG 226 Entry 153 A Records of the Office of Strategic Services: Washington Director's Office พ.ท.ผศ.ดร. ศรศ กร ช สว สด ผ รวบรวม

More information

Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut

Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut Part I: Overview Part II: Process Management Part III : Storage Management Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut, Silberschatz, Galvin and Gagne 2010 Chapter 8: Memory Management

More information

LED TV & SMART TV 3D FULL HD SLIM LED TV & SMART TV. SUGGESTED RETAIL PRICE : April InFocus Mondopad. InFocus Mondopad 55

LED TV & SMART TV 3D FULL HD SLIM LED TV & SMART TV. SUGGESTED RETAIL PRICE : April InFocus Mondopad. InFocus Mondopad 55 3D FULL HD SLIM InFocus Mondopad InFocus Mondopad 55 IFC-INF5520 : 399,000.- (exc.vat) - Multi touch screen 55, LCD - : USB Type-A x 6, HDMI 1.3 x 2, VGA (HD15 VESA), Component, S-Video, Composite, RS232,

More information

ภาคผนวก ก การต ดต งโปรแกรม

ภาคผนวก ก การต ดต งโปรแกรม ภาคผนวก ภาคผนวก ก การต ดต งโปรแกรม โปรแกรม Visual Basic.Net ข นตอนการต ดต งโปรแกรม Visual Basic.Net (Visual Studio.net 2008) 1. ใส แผ นโปรแกรม Visual Studio.net 2008 ลงใน CD-Rom Drive 2. รอให โปรแกรมท

More information

LED TV & SMART TV 3D FULL HD SLIM LED TV & SMART TV. SUGGESTED RETAIL PRICE : August InFocus Mondopad. InFocus Mondopad 55

LED TV & SMART TV 3D FULL HD SLIM LED TV & SMART TV. SUGGESTED RETAIL PRICE : August InFocus Mondopad. InFocus Mondopad 55 3D FULL HD SLIM InFocus Mondopad InFocus Mondopad 55 IFC-INF5520 : 399,000.- (exc.vat) - Multi touch screen 55, LCD - : USB Type-A x 6, HDMI 1.3 x 2, VGA (HD15 VESA), Component, S-Video, Composite, RS232,

More information

How-To Guide. SigIDp (With Microsoft Access) Demo. Copyright Topaz Systems Inc. All rights reserved.

How-To Guide. SigIDp (With Microsoft Access) Demo. Copyright Topaz Systems Inc. All rights reserved. How-To Guide SigIDp (With Microsoft Access) Demo Copyright Topaz Systems Inc. All rights reserved. For Topaz Systems, Inc. trademarks and patents, visit www.topazsystems.com/legal. Table of Contents Overview...

More information

File Organization and Management

File Organization and Management 1 UNESCO-NIGERIA TECHNICAL & VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY File Organization and Management YEAR II- SE MESTER I PRACTICAL Version 1: December

More information

2-26 Learn Visual Basic 6.0

2-26 Learn Visual Basic 6.0 2-26 Learn Visual Basic 6.0 cmdcompute Click Event: Private Sub cmdcompute_click() Dim Mean As Single Dim StdDev As Single txtinput.setfocus Make sure there are at least two values If NumValues < 2 Then

More information

Revisions: jee Initial jee SW Version 1.1 now includes the leave type Other

Revisions: jee Initial jee SW Version 1.1 now includes the leave type Other Memorandum To: From: File John Effland Date: 2005-03-10 Revisions: 2005-03-10 jee Initial 2006-02-24 jee SW Version 1.1 now includes the leave type Other Subject: Leave Calendar Program Architecture and

More information

Collections IS311. The Collections Framework. Type Trees for Collections. Java Collections Framework (ต อ)

Collections IS311. The Collections Framework. Type Trees for Collections. Java Collections Framework (ต อ) IS311 Java Collections Framework (ต อ) Collections Collections are holders that let you store and organize objects in useful ways for efficient access. In the package java.util, there are interfaces and

More information

IS311. Java Collections Framework (ต อ)

IS311. Java Collections Framework (ต อ) IS311 Java Collections Framework (ต อ) 1 Collections Collections are holders that let you store and organize objects in useful ways for efficient access. In the package java.util, there are interfaces

More information

NEAR EAST UNIVERSITY FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCE DEPARTMENT OF COMPUTER INFORMATION SYSTEMS

NEAR EAST UNIVERSITY FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCE DEPARTMENT OF COMPUTER INFORMATION SYSTEMS EAR EAST UVERSTY FACULTY OF ECOOMCS AD ADMSTRATVE SCECE DEPARTMET OF COMPUTER FORMATO SYSTEMS 2002/2003 SUMMER TERM CS 400 (Graduation Project) CE,MET CO. PROCESS SYSTEM Submitted To Dr, Yalcm Akcah Miss,adire

More information

Lecture 6 Register Transfer Methodology. Pinit Kumhom

Lecture 6 Register Transfer Methodology. Pinit Kumhom Lecture 6 Register Transfer Methodology Pinit Kumhom VLSI Laboratory Dept. of Electronic and Telecommunication Engineering (KMUTT) Faculty of Engineering King Mongkut s University of Technology Thonburi

More information

Chapter 1. Block Diagram. Text .. 1

Chapter 1. Block Diagram. Text .. 1 Chapter 1 ก Visual Basic Scilab ก ก Visual Basic Scilab ก ก (Temporary File) ก ก ก ก ก ก Visual Basic ก (Interface) ก Scilab Text File ก Visual Basic ก ก ก ก Block Diagram ก ก Visual Basic ก Scilab ก.sce

More information

Visual Basic 6 Lecture 7. The List Box:

Visual Basic 6 Lecture 7. The List Box: The List Box: The function of the List Box is to present a list of items where the user can click and select the items from the list or we can use the List Box control as a simple memory to save data.

More information

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB Visual Programming 1. What is Visual Basic? Visual Basic is a powerful application development toolkit developed by John Kemeny and Thomas Kurtz. It is a Microsoft Windows Programming language. Visual

More information

Pointers. CS2023 Winter 2004

Pointers. CS2023 Winter 2004 Pointers CS2023 Winter 2004 Outcomes: Introduction to Pointers C for Java Programmers, Chapter 8, sections 8.1-8.8 Other textbooks on C on reserve After the conclusion of this section you should be able

More information

TABLE OF CONTENTS ADVANCED VISUAL BASIC

TABLE OF CONTENTS ADVANCED VISUAL BASIC TABLE OF CONTENTS ADVANCED VISUAL BASIC TABLE OF CONTENTS ADVANCED VISUAL BASIC...1 REVIEW OF IMPORTANT PROGRAMMING CONCEPTS...4 OVERVIEW...4 EXCERPT FROM WIKIPEDIA ARTICLE ON CAMELCASE...5 REVIEW QUESTIONS...6

More information

Ethernet'Basics. Topics

Ethernet'Basics. Topics 'Basics ผศ.ดร.ส ร นทร ก ตต ธรก ล และ อ.สรย ทธ กลมกล อม ภาคว ชาว ศวกรรมคอมพ วเตอร คณะว ศวกรรมศาสตร สถาบ นเทคโนโลย พระจอมเกล าเจ าค ณทหารลาดกระบ ง Topics History,)Standards,)Terminologies Transmission)media

More information

2Practicals Visual Basic 6.0

2Practicals Visual Basic 6.0 2Practicals Visual Basic 6.0 Practical 1: 1. Navigation of Visual Basic Integrated Development Environment The Visual Basic IDE is made up of a number of components Menu Bar Tool Bar Project Explorer Properties

More information