943,800 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 851
  • ASP.NET RSS
Sep 15th, 2008
0

adding a line to an invoice form

Expand Post »
hi to all,

i am new in asp.net.then i have a form in asp.net(vb) for an invoice bill.
i want to add the invoice
item row by row...each row containing item name,quatity,cost,tax,price..
in table i used a combo box for item name,tax,a textboxes for remaining fields..
first when i load the form i have 3 rows...
after that when user clicks an add button...i need to create new rows...at last when user press the submit button..i want to save the values
to databse...can u help me as aearly as possible.

her i just paste my html code...

aspnet Syntax (Toggle Plain Text)
  1. <asp:Table runat ="server" ID="tbl_inv" HorizontalAlign ="Center" cellspacing="0" cellpadding="2" style="width: 85%; height: 100%;">
  2. <asp:TableRow >
  3. <asp:TableCell height="101">
  4. <div style="margin-top:10px;">
  5. <asp:Table runat ="server" width="100%" cellspacing="0" cellpadding="2" >
  6. <asp:TableRow >
  7. <asp:TableCell CssClass="bluebrd"><h1>New Invoice</h1></asp:TableCell>
  8. </asp:TableRow>
  9. <asp:TableRow>
  10. <asp:TableCell height="101" >
  11. <asp:table runat ="server" width="100%" cellspacing="3" cellpadding="0" style="height :100%; table-layout: auto;" >
  12. <asp:TableRow>
  13. <asp:TableCell style ="width :25%"><strong>Client</strong> :</asp:TableCell>
  14. <asp:TableCell style ="width :25%">
  15. <asp:TextBox ID="TextBox1" runat="server" Width="192px"></asp:TextBox></asp:TableCell>
  16. <asp:TableCell style ="width :25%"><strong>Invoice number</strong> :</asp:TableCell>
  17. <asp:TableCell style ="width :25%">
  18. <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></asp:TableCell>
  19. </asp:TableRow>
  20. <asp:TableRow>
  21. <asp:TableCell style ="width :25%"><strong>Address</strong> :</asp:TableCell>
  22. <asp:TableCell rowspan="2" style ="width :25%">
  23. &nbsp;<asp:TextBox ID="TextBox2" runat="server" Height="40px" TextMode="MultiLine"
  24. Width="192px"></asp:TextBox>
  25. </asp:TableCell>
  26. <asp:TableCell style ="width :25%"><strong>Date</strong> :</asp:TableCell>
  27. <asp:TableCell style ="width :25%">
  28. <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox></asp:TableCell>
  29. </asp:TableRow>
  30. <asp:TableRow >
  31. <asp:TableCell style ="width :25%">
  32. <asp:LinkButton ID="LinkButton1" runat="server">edit</asp:LinkButton><a href="#"></a></asp:TableCell>
  33. <asp:TableCell style ="width :25%"><strong>Discount</strong> :</asp:TableCell>
  34. <asp:TableCell style ="width :25%">
  35. <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox></asp:TableCell>
  36. </asp:TableRow>
  37. </asp:Table>
  38. </asp:TableCell>
  39. </asp:TableRow>
  40.  
  41. <asp:TableRow>
  42. <asp:TableCell style="height: 190px">
  43. <asp:Table runat ="server" width="100%" cellspacing="0" cellpadding="0">
  44. <asp:TableRow>
  45. <asp:TableCell cssclass="bluebg whitefont" style="width :169px; height: 19px;" >Item Name</asp:TableCell>
  46. <asp:TableCell style="width :214px; height: 19px;" cssclass="bluebg whitefont">Description</asp:TableCell>
  47. <asp:TableCell style="width :10%; height: 19px;" cssclass="bluebg whitefont">Unit cost</asp:TableCell>
  48. <asp:TableCell style="width :10%; height: 19px;" cssclass="bluebg whitefont">Qty</asp:TableCell>
  49. <asp:TableCell style="width :10%; height: 19px;" cssclass="bluebg whitefont">Tax</asp:TableCell>
  50. <asp:TableCell style="width :20%; height: 19px;" cssclass="bluebg whitefont">Price</asp:TableCell>
  51. </asp:TableRow>
  52. <asp:TableRow>
  53. <asp:TableCell style="height: 67px; width: 169px;">
  54. <asp:DropDownList ID="DropDownList2" runat="server">
  55. </asp:DropDownList>
  56. </asp:TableCell>
  57. <asp:TableCell style="height: 67px; width: 214px;">
  58. <asp:TextBox ID="TextBox13" runat="server" TextMode="MultiLine"></asp:TextBox>&nbsp;<br />
  59. </asp:TableCell>
  60. <asp:TableCell style="width: 70px; height:67px;">
  61. <asp:TextBox ID="TextBox10" runat="server" Width="64px" Height="24px"></asp:TextBox></asp:TableCell>
  62. <asp:TableCell style="height: 38px">
  63. <asp:TextBox ID="TextBox7" runat="server" Width="64px"></asp:TextBox></asp:TableCell>
  64. <asp:TableCell style="height: 67px">
  65. <asp:DropDownList ID="DropDownList5" runat="server">
  66. </asp:DropDownList></asp:TableCell>
  67. <asp:TableCell style="height:67px">0.00</asp:TableCell>
  68. </asp:TableRow>
  69. <asp:TableRow>
  70. <asp:TableCell style="width: 169px; height: 67px;">
  71. <asp:DropDownList ID="DropDownList3" runat="server">
  72. </asp:DropDownList></asp:TableCell>
  73. <asp:TableCell style="width: 214px; height:67px;">
  74. <asp:TextBox ID="TextBox12" runat="server" TextMode="MultiLine"></asp:TextBox><br />
  75. </asp:TableCell>
  76. <asp:TableCell style="width: 70px; height: 67px;">
  77. <asp:TextBox ID="TextBox11" runat="server" Width="64px" Height="24px"></asp:TextBox></asp:TableCell>
  78. <asp:TableCell style="height: 67px">
  79. <asp:TextBox ID="TextBox8" runat="server" Width="64px"></asp:TextBox></asp:TableCell>
  80. <asp:TableCell style="height: 67px">
  81. <asp:DropDownList ID="DropDownList6" runat="server">
  82. </asp:DropDownList></asp:TableCell>
  83. <asp:TableCell style="height: 67px">0.00</asp:TableCell>
  84. </asp:TableRow>
  85. </asp:Table>
  86. </asp:TableCell>
  87. </asp:TableRow>
  88. </asp:Table>
  89. </div>
  90. </asp:TableCell>
  91. </asp:TableRow>
  92.  
  93. </asp:Table>
  94.  
  95. <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/imagez/plus1.jpg" />
  96. <asp:LinkButton ID="lbtn_addline" runat="server">Addline</asp:LinkButton>




thanks a lot
Last edited by cscgal; Sep 15th, 2008 at 11:23 am. Reason: Added code tags
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zinu is offline Offline
3 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Using ASP.NET with MySQL tutorial?
Next Thread in ASP.NET Forum Timeline: Export from Database to Excel





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC