marangajared 0 Newbie Poster

Hi Gyyz
I am new in ASP.NET and i am trynig to make my interface dynamic.
Is there someone that can help me do it?
this is the scenario

I have two sets of fields on the interface. One is STATIC while the other needs to be changed. I need to make the dynamic fields to be RE_Produced under others if the client clicks a button I called ADDLINE.

ON SAVING, I want that every added line is saved together with the static data on its own line in the database (SQL Server 2005). this means that if the user doesn't addLIne, then a single transaction is saved but if he adds a single line the data is saved as if two transactions were saved etc.
This is the code BUT I WISH i COULD BE ABLE TO ATTACH THE SCREEN-SHOT OF THE INTERFACE.

I beg for your support

I attach the image below. Please have a look at it. I need to duplicate the fields from Business Type to Amount up to a maximum of 10. Total Amount should be maintained as it is but the idividual amounts entered in the addline in total should not exceed the [B][B]Total Amount[/B][/B]

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" EnableSessionState="True" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>.::Old Mutual::.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="images/Envision.css" type="text/css" />
<style type="text/css">
<!--
.style4 {font-size: 14px}
-->
</style>

</head>
<body bgcolor="#00FF33" >
<div id="wrap">
  <div id="header">
    <h1 id="logo-text">Old Mutual </h1>
    <div id="header-links">
      <p> <a href="http://www.free-css.com/">Home</a> | <a href="http://www.free-css.com/">Contact</a> | <a href="http://www.free-css.com/">Site Map</a> </p>
    </div>
  </div>
  <div  id="menu">

    <ul>
      <li id="current">
      <a href="#">Receipting</a>    </li>

      <li><a href="#">Bulk Receipting </a></li>
      <li><a href="#">Security</a></li>
      <li><a href="#" onclick="logout()">Log Out. </a></li>
      <li></li>
      <li class="last"></li>
    </ul>
  </div>
  <div id="content-wrap">
    <div id="main" >
      <form id="info_form" runat="server" >
      <table width="711" height="461" border="0" align="center" cellpadding="2" cellspacing="3" bgcolor="#CCFF99" id="policnfa_loany_number" runat="server">
            <tr>
              <td width="348"><span class="style4">Policy Number:
                        <br/>
                          <asp:TextBox ID="policy_number" runat="server" OnTextChanged="policy_number_TextChanged"  />
              </span>              </td>
              <td width="374"><span class="style4">Status:<br />
&nbsp;<asp:TextBox ID="status" runat="server" ReadOnly="true" />                  
              </span></td>
              <td style="width: 355px"><span class="style4">Receipt Number:
                  <asp:TextBox ID="receipt_number" runat="server" 
                      ReadOnly="True" />                  
              </span></td>
          </tr>
            <tr>
              <td style="height: 39px"><span class="style4">NFA loan:
                  <asp:TextBox ID="nfa_loan" runat="server" Width="162px" 
                      ReadOnly="True" />                  
              </span></td>
              <td style="height: 39px"><span class="style4">Cash Loan:
                  <asp:TextBox ID="cash_loan" runat="server" Width="222px" 
                      ReadOnly="True" />                  
              </span></td>
              <td style="height: 39px; width: 355px;"><span class="style4">Date:<br />
&nbsp;<input name="date" type="text"  id="date" 
          value="<%= System.DateTime.Now.ToShortDateString() %>" 
          disabled="disabled" style="width: 164px" readonly="readonly"  />
          </span>          </td>
            </tr>
            <tr>
              <td style="height: 20px">
              <span class="style4">&nbsp;Premium Balance/Surplus:<br />
                  <asp:TextBox ID="prem_bal" runat="server" ReadOnly="True" />                  
                  <br />

              </span></td>
              <td style="height: 20px">
              <span class="style4">Payer Name:<br />
                  <asp:TextBox ID="payer_name" runat="server" Width="222px" 
                      ReadOnly="True" />                  
              </span>
              </td>
              <td style="height: 20px; width: 355px;">
              <span class="style4">Monthly Premium:<br />
                <asp:TextBox ID="m_premium" runat="server" />                
              </span>
              </td>
            </tr>
            <tr>
              <td height="54">
              <span class="style4">Type of Payment:
              <br/>
                 <asp:DropDownList ID="payment_type" runat="server" Width="146px" 
                      DataSourceID="paymentType" DataTextField="description" 
                      DataValueField="lineTypeID"></asp:DropDownList>
                  <asp:SqlDataSource ID="paymentType" runat="server" 
                      ConnectionString="<%$ ConnectionStrings:OMCMS_ApplicationConnectionString %>" 
                      SelectCommand="SELECT [description], [lineTypeID] FROM [LineType]">
                  </asp:SqlDataSource>
              </span>              
              </td>

             <td>
              <span class="style4">Payment Frequency:
                  <asp:TextBox ID="payment_freq" runat="server" 
                     ReadOnly="True" />                  
                </span>
              </td>
              <td style="width: 355px">
                  <span class="style4">Address:<br />
                    <asp:TextBox ID="address" runat="server" Width="235px" ReadOnly="True" />
                   </span>             
             </td>
            </tr>
        <tr bgcolor="#FFFFFF" bordercolor="#FFFFFF" >
         <td height="34" colspan="3"></td>
          </tr>
          <tr>
            <td width="348" height="59"><span class="style4">Business Type:
               <asp:DropDownList ID="business_type" runat="server" Width="146px" 
                    AutoPostBack="True" DataSourceID="BusinessType_DS" DataTextField="description" 
                    DataValueField="businessTypeID" ></asp:DropDownList>
                <asp:SqlDataSource ID="BusinessType_DS" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:OMCMS_ApplicationConnectionString %>" 
                    SelectCommand="SELECT [businessTypeID], [description] FROM [BusinessType]">
                </asp:SqlDataSource>
            </span></td>
            <td width="374"><span class="style4">Pay Code:
                <br />
                 <asp:DropDownList ID="pay_code" runat="server" Width="129px" 
                    DataSourceID="payCode_DS" DataTextField="payCode" 
                    DataValueField="payCodeID" 

                    ontextchanged="pay_code_TextChanged" AutoPostBack="True" onselectedindexchanged="pay_code_SelectedIndexChanged" 
                    ></asp:DropDownList>                
                <asp:SqlDataSource ID="payCode_DS" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:OMCMS_ApplicationConnectionString %>" 

                    SelectCommand="SELECT [payCode], [businessTypeID], [payCodeID] FROM [PayCode] WHERE ([businessTypeID] = @businessTypeID)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="business_type" Name="businessTypeID" 
                            PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </span></td>
            <td style="width: 355px"><span class="style4">Comment:
                <br />

              <asp:TextBox ID="comment" runat="server" />  
            </span></td>
          </tr>
          <tr>
            <td height="46"><span class="style4">Ledger Account Name:
                <asp:TextBox ID="ledger_ac_name" runat="server" 
                    ReadOnly="True" />                
            </span></td>
            <td><span class="style4">Bank Account:
                <asp:DropDownList ID="BankAccount" runat="server" Width="205px" Height="26px" 
                    AutoPostBack="True" DataSourceID="BankAcount_DS" DataTextField="Description" 
                    DataValueField="bankId"  ></asp:DropDownList>             
                <asp:SqlDataSource ID="BankAcount_DS" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:OMCMS_ApplicationConnectionString %>" 
                    SelectCommand="SELECT [bankId], [bankAccount], [Description] FROM [BankAccount]">
                </asp:SqlDataSource>
            </span></td>
            <td style="width: 355px"><span class="style4">Received From:
                <asp:TextBox ID="received_frm" runat="server" />                
            </span></td>
          </tr>
          <tr>
            <td height="53"><span class="style4">Reference:
                <asp:TextBox ID="reference" runat="server" />                
            </span></td>
            <td class="style4">Amount:<br />
&nbsp;<asp:TextBox ID="amount" runat="server" />
                        </td>
            <td style="width: 355px"><div align="center">
                <asp:Button id="add_line" Text="Add Line." runat="server" CssClass="button"   />
            </div></td>
          </tr>
          <tr>
            <td height="47">&nbsp;</td>
            <td><div align="center"><span class="style4">
              <asp:Button id="save_receipt" Text="Save and Print Receipt." runat="server" CssClass="button" OnClick="save_receipt_Click" Enabled="False" />
            </span></div></td>
            <td style="width: 355px"><span class="style4">Total Amount:
                <asp:TextBox ID="total_amount" runat="server" />                
            </span></td>
          </tr>
      </table></form>
    </div>
  </div>
  <div id="footer">
    <p> &copy; 2009 <strong>Old Mutual </strong>| Design by: Jared | &nbsp;&nbsp;&nbsp;&nbsp;</p>
  </div>
</div>
</body>
</html>