adding a line to an invoice form

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Sep 2008
Posts: 3
Reputation: zinu is an unknown quantity at this point 
Solved Threads: 0
zinu zinu is offline Offline
Newbie Poster

adding a line to an invoice form

 
0
  #1
Sep 15th, 2008
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...

  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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC