alisan94
New Member
hi to all
i have project by sql server and customlist view?
please help me on this:
can define 2 tag to send for button click rom clv?
i have no problem with btn.tag.
but the text of edittext is big problem.
tnx all
i have project by sql server and customlist view?
please help me on this:
can define 2 tag to send for button click rom clv?
i have no problem with btn.tag.
but the text of edittext is big problem.
tnx all
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("spin")
Dim rs As JdbcResultSet
rs = cntmod.sql1.ExecQuery("SELECT dbo.FCustomer.customerCode,dbo.FCustomer.customerName,dbo.FCustomer.etebar,dbo.Person.phoneNo1,dbo.Person.address FROM dbo.FCustomer INNER JOIN dbo.Person ON dbo.FCustomer.person_ID = dbo.Person.id; ")
Do While rs.NextRow
Dim p As B4XView = xui.CreatePanel("")
p.LoadLayout("itemlable")
p.SetLayoutAnimated(0,0,0,CustomListView1.AsView.Width,200dip)
.
.
.
.
Label7.Text = (rs.GetString("phoneNo1"))
Button1.Tag = (rs.GetString("customerCode"))
EditText1.Tag = EditText1.Text
CustomListView1.Add(p,"")
Loop
rs.Close
End Sub
Private Sub Button1_Click
Dim btn As Label = Sender
Dim text As EditText = Sender
cntmod.sql1.ExecNonQuery(" UPDATE dbo.FCustomer SET etebar = '" & text.Tag &"' WHERE customerCode = '" & btn.Tag & "'")
'Msgbox("حذف سند با موفقیت انجام شد","حذف")
ToastMessageShow(text.Tag,False)
End Sub
Last edited: