Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
make sales and procurement system and when I work a query, or search the invoice number, the results appear in palm leaves View, but appears only in a row while the bill by no more than one row And this was used by code i.m used vb.net and database sql and b yway linq to sql
VB
Try
           Dim data = (From d In DBVariable.Data.masterfatoras From f In DBVariable.Data.fatoras From na In DBVariable.Data.asnafs From sup In DBVariable.Data.suppliers
      Where d.ID = f.mid Where d.num.Contains(txt)
                 Select d, f, na, sup).FirstOrDefault
           TextBoxX1.Text = data.d.num


           nammord.Text = (From supp In DBVariable.Data.suppliers Where data.d.idmord = supp.ID Select supp.Name).Single()
           txtmord.Text = (From supp In DBVariable.Data.suppliers Where data.d.idmord = supp.ID Select supp.Code).Single()
           adrmord.Text = (From supp In DBVariable.Data.suppliers Where data.d.idmord = supp.ID Select supp.Address).Single()
           nodaf.Text = data.d.nodfa
           ' ''نفاصيل الفاتورة


           For p As Integer = 0 To gridshraa.Rows.Count - 1

               gridshraa.Rows(p).Cells(2).Value = (From asna In DBVariable.Data.asnafs Where data.f.idname = asna.ID Select asna.Name).Single()
               gridshraa.Rows(p).Cells(1).Value = (From asna In DBVariable.Data.asnafs Where data.f.idname = asna.ID Select asna.code).Single()
               gridshraa.Rows(p).Cells(3).Value = (From asna In DBVariable.Data.asnafs Where data.f.idname = asna.ID Select asna.unit).Single()
               gridshraa.Rows(p).Cells(4).Value = data.f.qty
               gridshraa.Rows(p).Cells(5).Value = data.f.price
               gridshraa.Rows(p).Cells(6).Value = data.f.totprice
           Next

       Catch

       End Try
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900