The entire code below has several parts put together.
Individually, each part works as intended.
For instance, there is a piece that calculates total of data being entered as they are entered.
This works.
There is a piece that automatically populates registration from Gridview box to Repeater box and can do so for as manager registration numbers as possible.
This works.
There is a piece that takes data entered in Repeater control and displays the results in preview page.
This works.
My insert into the database (code not included) works as well.
When all of these pieces areput together as the code below shows, when you click to go to preview page, data does not display on preview page.
I have spent entire weekend struggling with this and I am scheduled to show progress on this tomorrow.
I have used the debugger but still could not resolve the problem.
As usual, I would really appreciate your expertise once more.
I am so stumped it is frustrating.
Please comment out code that queries the database.
I am just interested in why data is not show on preview page.
Markup
<%@ Page Language="C#" AutoEventWireup="true" MaintainScrollPositionOnPostback="true" CodeFile="AircraftPPTR.aspx.cs" Inherits="AircraftPPTR" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Aircraft Personal Property Tax Return</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, IE=8, IE=9, IE=10, IE11,chrome=1" />
<%-- Including CSS for different screen sizes--%>
<link rel="stylesheet" type="text/css" href="styles/responsiveform.css" />
<link rel="stylesheet" media="screen and (max-width: 1200px) and (min-width: 601px)" href="styles/responsiveform1.css" />
<link rel="stylesheet" media="screen and (max-width: 600px) and (min-width: 351px)" href="styles/responsiveform2.css" />
<link rel="stylesheet" media="screen and (max-width: 350px)" href="styles/responsiveform3.css" />
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet" />
<link href="styles/boxformats.css" rel="stylesheet" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="js/jquery.easing.min.js" type="text/javascript"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script type ="text/javascript" >
$(document).ready(function () {
$("#msform").validate({
rules: {
<%=accountnumber.UniqueID %>: {
required:true,
digits:true,
minlength:7,
maxlength:7,
},
<%=rblsitus.UniqueID %>: {
required: true,
},
<%=txtOwnerPhone.UniqueID %>: {
required: true,
},
<%=txtfname.UniqueID %>: {
required: true,
},
<%=txtfaddress.UniqueID %>: {
required: true,
},
<%=txtfcity.UniqueID %>: {
required: true,
},
<%=ddlstates.UniqueID %>: {
required: true,
},
<%=txtfzip.UniqueID %>: {
required: true,
},
},
messages: {
//This section we need to place our custom validation message for each control.
<%=accountnumber.UniqueID %>: {
required: "Account number is required." ,
},
<%=rblsitus.UniqueID %>: {
required: "Please select either UNINCORPORATED AREA or CITY OF option.",
},
<%=txtOwnerPhone.UniqueID %>: {
required: "Please select a state."
},
<%=txtfname.UniqueID %>: {
required: "Please enter your name."
},
<%=txtfaddress.UniqueID %>: {
required: "Please enter your address."
},
<%=txtfcity.UniqueID %>: {
required: "Please enter city."
},
<%=ddlstates.UniqueID %>: {
required: "Please select a state."
},
<%=txtfzip.UniqueID %>: {
required: "Please enter zip code."
},
},
});
});
</script>
<style type ="text/css" >
label.error {
color: red;
display:inline-flex ;
}
</style>
<%-- <script type="text/javascript">
$(document).ready(function () {
$('#rblsitus input').click(function () {
$("#rblsitus input:radio:checked").val();
if ($("#rblsitus input:radio:checked").val() == "cityof") {
document.getElementById('divcitylist').style.display = "block";
}
else {
document.getElementById('divcitylist').style.display = "none";
}
});
$('#rdlsitus input').click(function () {
$("#rdlsitus input:radio:checked").val();
if ($("#rdlsitus input:radio:checked").val() == "citylist") {
document.getElementById('dvcity').style.display = "block";
}
else {
document.getElementById('dvcity').style.display = "none";
}
});
});
</script>--%>
<%-- <script type="text/javascript">
$(document).on("click", "input:radio[name$='rblPurchaseType']", function(){
var selectedItems = $("input:radio[name$='rblPurchaseType'][value='Used']:checked");
$("#purchaseNewUsed").prop("disabled", selectedItems.length === 0);
});
</script>--%>
<%--<script type="text/javascript">
$('.purchaseNewUsed input[type="radio"]').change(function () {
if ($(this).val() == "New") {
$(this).closest('div').children('input[type="text"]').prop("disabled", true);
}
else {
$(this).closest('div').children('input[type="text"]').prop("disabled", false);
}
});
</script>--%>
<script type="text/javascript">
$(document).ready(function() {
$('#rblIssues input').change(function () {
if ($(this).val() == "Yes") {
$("#functionalIsses").prop("disabled", false);
}
else {
$("#functionalIsses").prop("disabled", true);
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$("#accountnumber").focus();
});
</script>
<style type="text/css">
body {
background-image: url("images/bg.png");
background-color: #fff;
}
.auto-style1 {
width: 45%;
text-align:center;
}
.auto-style2 {
width: 47%;
}
</style>
<style type="text/css">
/*form styles*/
#msform {
margin: 50px 0px 50px auto;
text-align: center;
position: relative;
}
#msform fieldset {
background: white;
margin-left:1px !important;
border: 0 none;
border-radius: 3px;
box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
padding: 70px 30px;
box-sizing: border-box;
width: 100% !important;
margin: 0 10%;
/*stacking fieldsets above each other*/
position: absolute;
}
legend {
font-weight:bold;
background: orange;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/*progressbar*/
#progressbar {
margin-bottom: 10px;
overflow: hidden;
/*CSS counters to number the steps*/
counter-reset: step;
}
#progressbar li {
list-style-type: none;
color: #0093B2;
text-transform: uppercase;
font-size: 0.5625em;
width: 20%;
float: left;
position: relative;
}
#progressbar li:before {
content: counter(step);
counter-increment: step;
width: 20px;
line-height: 20px;
display: block;
font-size: 0.625em;
color: #333;
background: white;
border-radius: 3px;
margin: 0 auto 5px auto;
}
/*progressbar connectors*/
#progressbar li:after {
content: '';
width: 100%;
height: 2px;
background: #0093B2;
position: absolute;
left: -50%;
top: 9px;
z-index: -1; /*put it behind the numbers*/
}
#progressbar li:first-child:after {
/*connector not needed before the first step*/
content: none;
}
/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#progressbar li.active:before, #progressbar li.active:after {
background: #27AE60;
color: white;
}
.gridview {
width: 90%;
word-wrap:break-word;
table-layout: fixed;
}
</style>
<style type="text/css">
body
{
padding: 10px;
font-family:Calibri;
font-size:12pt;
}
td
{
padding:5px;
}
input
{
font-family:Calibri;
font-size:12pt;
}
span
{
font-family:Calibri;
font-size:9pt;
color:#0093B2;
}
.grvAddButton
{
border: 1px solid #6E6E6E;
font-family: 'Arial Unicode MS';
background-color: #0093B2;
color: #FFFFFF;
font-style: normal;
text-align: center;
padding-right: 10px;
padding-left: 10px;
}
.grvDelButton
{
border: 1px solid #6E6E6E;
font-family: 'Arial Unicode MS';
background-color: #0093B2;
color: #FFFFFF;
font-style: normal;
text-align: center;
padding-right: 10px;
padding-left: 10px;
}
.btnclass
{
color: #FFF;
background-color: #204D74;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0px;
font-size: 14px;
font-weight: 400;
line-height: .5;
text-align: justify;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
-moz-user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
var activeViewIndex = <%=myMultiView.ActiveViewIndex %>;
$("#progressbar li").each(function(){
$("#progressbar li").removeClass("active");
})
$("#progressbar li").eq(activeViewIndex).addClass("active");
})
</script>
<script type = "text/javascript">
function ValidateCheckBox(sender, args) {
if (document.getElementById("<%=same_as_Payeraddr.ClientID %>").checked == true) {
args.IsValid = true;
} else {
args.IsValid = false;
}
}
</script>
<style type="text/css">
.style-1 input[type="text"] {
padding: 10px;
border: solid 1px #dcdcdc;
transition: box-shadow 0.3s, border 0.3s;
}
.style-1 input[type="text"]:focus,
.style-1 input[type="text"].focus {
border: solid 1px #707070;
box-shadow: 0 0 5px 1px #969696;
}
.auto-style5 {
width: 31%;
}
.auto-style7 {
margin: auto;
width: 86%;
padding: 10px;
}
</style>
<style type="text/css">
.RBL label
{
display: block;
}
.RBL td
{
text-align: center;
width: 20px;
}
</style>
<style type="text/css">
.dropdownlist {
background-color: cornsilk;
font-weight: bold;
}
</style>
<script type="text/javascript">
$(function () {
$('[id*=txtboatregNum]').change(function () {
var value = $(this).val();
index = $(this).closest('tr').index();
var tr = $('[id*=repeaterTable]').find('tr')[index - 1];
$(tr).find("[id*=txtARegNo]").val(value);
});
});
</script>
<script type="text/javascript">
$('.repeaterItem input[type="radio"]').change(function () {
if ($(this).val() == "New") {
$(this).closest('div').children('input[type="text"]').prop("disabled", true);
}
else {
$(this).closest('div').children('input[type="text"]').prop("disabled", false);
}
});
</script>
<%-- <style type="text/css">
table {
table-layout : fixed;
}
</style>--%>
<style type="text/css">
.myForm {
border: 0px solid #ccc;
border-spacing: 0;
text-align: left;
}
.myForm td {
border: 1px solid #ccc
}
</style>
</head>
<body>
<div>
<form id="msform" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<header style="background-color:#0093B2;">
<span style="color:#faffff;"><h2>Aircraft Personal Property Tax Return with Base Data</h2></span><br /><br />
</header><br />
<!-- progressbar -->
<ul id="progressbar">
<li>Payer Account Info</li>
<li>Aircraft Info</li>
<li>Schedule E</li>
<li>Review/Sign/Submit</li>
</ul>
<br />
<br />
<br />
<asp:MultiView ID="myMultiView" ActiveViewIndex="0" runat="server">
<asp:View ID="vwPayerInfo" runat="server">
<h2 style="color:#0093B2;font-weight:bold; width: 1421px;">Step 1: Payer Account Info</h2><br />
<%-- All user textboxes for input here--%>
<table border="1" style="width:75%; text-align:left">
<tr>
<td style="width:70%;" colspan="2"><div style="margin: auto;padding: 10px;">
<span style="font-weight:bold;color:#27AE60;">AIRCRAFT PERSONAL PROPERTY TAX RETURN</span><br />
THIS RETURN WILL BE CONSIDERED PUBLIC INFORMATION
AND WILL BE OPEN FOR PUBLIC INSPECTION
RETURN COMPLETED FORM TO ADDRESS LISTED BELOW</div>
</td>
</tr>
<tr>
<td style="vertical-align: text-top;" class="auto-style25">
<table border="1" class="nav-justified">
<tr>
<td class="auto-style5">TAX YEAR</td>
<td rowspan="2" class="auto-style2"><span style="margin-left:5px;color:#000;">IF ASSISTANCE NEEDED </span><br /><span style="margin-left:5px;color:#000;">CALL</span> 111-111-1111</td>
<td class="auto-style1">ACCOUNT NUMBER</td>
</tr>
<tr>
<td class="auto-style5"><asp:Label ID="txtTaxYr" runat="server"></asp:Label></td>
<td class="auto-style1"><div class="input text"><span style="color:red;">*</span><asp:TextBox ID="accountnumber" AutoPostBack="true" ontextchanged="accountnumber_TextChanged" MaxLength="7" style="width:120px;" runat="server"></asp:TextBox>
</div></td>
<td>
<div id="checkusername" runat="server" Visible="false">
<asp:Image ID="imgstatus" runat="server" Width="17px" Height="17px"/>
<asp:Label ID="lblStatus" runat="server"></asp:Label>
</div>
</td>
</tr>
<tr>
<td class="auto-style5"><span style="color:red;">DUE DATE</span></td>
<td colspan="2" >OWNER'S PHONE NUMBER (LIST)</td>
</tr>
<tr>
<td class="auto-style5"><asp:Label ID="txtDueDate" runat="server"></asp:Label></td>
<td colspan="2" ><span style="color:red;">*</span><asp:TextBox ID="txtOwnerPhone" runat="server"></asp:TextBox></td>
</tr>
</table>
<table style="width:99%">
<tr>
<td style="text-align:center" class="auto-style19"><br />Payer NAME AND ADDRESS</td>
</tr>
<tr><td style="border-collapse: collapse;border: 0px solid black;" class="auto-style19"> </td></tr>
<tr>
<td class="auto-style19">
<table border="0">
<tr>
<td>NAME:</td><td><div class="input text"><span style="color:red;">*</span> <asp:TextBox ID="txtfname" style="width:430px;" runat="server"></asp:TextBox></div></td>
</tr>
<tr>
<td>ADDRESS:</td><td><div class="input text"><span style="color:red;">*</span> <asp:TextBox ID="txtfaddress" style="width:430px;" runat="server"></asp:TextBox></div></td>
</tr>
</table>
<table border="0">
<tr>
<td><span style="margin-left:32px;color:#000;">CITY:</span></td><td><div class="input text"> <asp:TextBox ID="txtfcity" style="width:150px;" runat="server"></asp:TextBox></div></td><td><span style="margin-left:5px;color:#000;">STATE:</span></td><td><div class="input select">
<asp:DropDownList ID="ddlstates" runat="server" placeholder="Please select a state..." AppendDataBoundItems="True">
<asp:ListItem Value="" Selected="True"></asp:ListItem>
</asp:DropDownList>
</div></td><td><span style="margin-left:5px;color:#000;">ZIP:</span></td><td><div class="input text"> <asp:TextBox ID="txtfzip" style="width:60px;" runat="server"></asp:TextBox></div></td>
</tr>
</table>
</td>
</tr>
<tr><td style="border-collapse: collapse;border: 0px solid black;" class="auto-style19"> </td></tr><tr><td style="border-collapse: collapse;border: 0px solid black;" class="auto-style19"> </td></tr>
<tr>
<td style="border-collapse: collapse;border-top: 1px solid black;border-bottom: 1px solid black;" class="auto-style19"><span style="color:red">To avoid a 10% penalty on boats and motors not previously
returned, file this no later than the due date listed above.
This return is provided to you so you may return the fair
market value of your boat and motor for this tax year.
The return and supporting schedule must be completed
and returned in order for the boat and motor to be properly
returned. Department of Revenue Rule 560-11-10-.08 (3) (C).</span><br /></td>
</tr>
<tr>
<td style="text-align:center" class="auto-style19"><br />PERSONAL PROPERTY STRATA<br /><br /></td>
</tr>
</table>
</td>
<td style="vertical-align: text-top;width:50%;">
<table border="0">
<tr>
<td style="border-collapse: collapse;border-bottom: 1px solid black;" class="auto-style14"><div class="auto-style7" width="50%">NAME AND RETURN ADDRESS</div></td>
</tr>
<tr>
<td class="auto-style14"><div class="auto-style7">Test<br />
Test1.<br />
Test2,<br />
Test3</div></td>
</tr>
<tr>
<td style="border-collapse: collapse;border: 1px solid black;" class="auto-style14">TAX SITUS (WHERE YOU LIVE) CHECK ONE:</td>
</tr>
<tr>
<td class="auto-style14">
<asp:RadioButtonList ID="rblsitus" runat="server" style="width:90%;height:70px;" onselectedindexchanged="rblsitus_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text ="UNINCORPORATED AREA" Value="UNINCORPORATED" />
<asp:ListItem Text ="CITY OF" Value="cityof" />
</asp:RadioButtonList>
<div id="divcitylist" style="margin-top:-45px;margin-left:110px;"><asp:TextBox ID="citylist" class="form-control" style="width:400px;" Enabled="false" placeholder="(List here...)" runat="server" /></div>
</td>
</tr>
<tr>
<td style="border-collapse: collapse;border: 1px solid black;" class="auto-style14"><div class="auto-style7"><asp:CheckBox ID="same_as_Payeraddr" runat="server" /> CHECK BOX IF MAILING ADDRESS OR NAME IS SAME<br />
OTHERWISE, PLEASE CORRECT IN SPACE PROVIDED BELOW</div></td>
</tr>
</table>
<table border="0">
<tr>
<td class="auto-style12">NAME:</td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:TextBox ID="txtfullname" style="width:543px;" runat="server"></asp:TextBox></div></td>
</tr>
<tr>
<td class="auto-style12">ADDRESS:</td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:TextBox ID="txtaddress" style="width:543px;" runat="server"></asp:TextBox></div></td>
</tr>
</table>
<table border="0">
<tr>
<td class="auto-style13"><span style="margin-left:32px;color:#000;">CITY:</span></td><td style="border-collapse: collapse;border: 1px solid black;" class="auto-style21"><div class="input text"> <asp:TextBox ID="txtcity" style="width:150px;" runat="server"></asp:TextBox></div></td><td class="auto-style21"> STATE:</td><td style="border-collapse: collapse;border: 1px solid black;" class="auto-style21"><div class="input select">
<asp:DropDownList ID="ddlfillstates" runat="server" style="width:150px;" AppendDataBoundItems="True">
<asp:ListItem Value="" Selected="True"></asp:ListItem>
</asp:DropDownList>
</div></td><td class="auto-style22"><span style="margin-left:18px;color:#000;">ZIP:</span></td><td style="border-collapse: collapse;border: 1px solid black;" class="auto-style23"><div class="input text"> <asp:TextBox ID="txtzip" style="width:93px;" runat="server"></asp:TextBox></div></td>
</tr>
</table>
<table border="0" style="width:100%">
<tr>
<td style="border-collapse: collapse;border-top: 1px solid black;"><br /><span style="color:red;">BOATS SHALL BE RETURNED TO THE OFFICE WHERE LOCATED<br />
184 DAYS A YEAR OR MORE. LIST THE FAIR MARKET VALUE OF ALL<br />
BOATS AND MOTORS BELOW (EXCLUDE TRAILER).</span></td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
$("#<%= same_as_Payeraddr.ClientID %>").on("change", function () {
if (this.checked) {
$("#<%= txtfullname.ClientID %>").val($("#txtfname").val());
$("#<%= txtaddress.ClientID %>").val($("#<%= txtfaddress.ClientID %>").val());
$("#<%= txtcity.ClientID %>").val($("#<%= txtfcity.ClientID %>").val());
$("#<%= ddlfillstates.ClientID %>").val($("#<%= ddlstates.ClientID %>").val());
$("#<%= txtzip.ClientID %>").val($("#<%= txtfzip.ClientID %>").val());
}
});
</script>
</asp:View>
<asp:View ID="vwAirportInfo" runat="server">
<h2 style="color:#0093B2;">Step 2: Aircraft Info</h2><br />
<table border="1" style="width: 100%; text-align: center;">
<tr>
<td style="vertical-align: text-top;" class="auto-style9">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="Gridview1" runat="server" ShowFooter="true"
AutoGenerateColumns="false" OnRowDeleting="Gridview1_RowDeleting">
<Columns>
<asp:BoundField DataField="RowNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Airport Registration #:">
<HeaderStyle HorizontalAlign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtboatregNum" runat="server" Style="width: 450px;" class="form-control"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Payer Returned Value <br />As of Jan This Year">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtPayerret" runat="server" Style="width: 400px;" class="form-control txtPayerret"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<HeaderStyle Width="70" />
<ItemStyle Width="70" />
<ItemTemplate>
<asp:Button ID="BtnAdd" runat="server" Text="Add" OnClick="BtnAdd_Click" CssClass="grvDelButton" />
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True">
</asp:CommandField>
</Columns>
</asp:GridView>
<table border="1" style="width: 70%; text-align: center">
<tr>
<td class="auto-style15">
TOTAL<span style="margin-left: 208px; color: #000000; font-weight: bold;">></span>
</td>
<td class="auto-style10">
$<asp:Label ID="lblTotal" runat="server"></asp:Label>
<asp:HiddenField ID="hfvalue" runat="server" />
</td>
<td class="auto-style16">
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="vwScheduleE" runat="server">
<h2 style="color:#0093B2;">Step 3: Schedule E</h2><br />
<asp:Repeater ID="Repeater2" runat="server" OnItemDataBound="repeater_ItemDataBound">
<ItemTemplate>
<table style="width: 100%;" class="myForm">
<tr>
<td style="white-space: nowrap;" colspan=2>
Airport where aircraft primary home based city:
<asp:TextBox ID="aircraftCity" Style="width: 150px;" runat="server"></asp:TextBox>
Country:<asp:TextBox ID="aircraftcnty" Style="width: 150px;" runat="server"></asp:TextBox>
State:
<asp:DropDownList ID="aircraftstate" runat="server" Style="width: 150px;height:50px;" AppendDataBoundItems="True">
<asp:ListItem Value="" Selected="True"></asp:ListItem>
</asp:DropDownList>
</td>
<tr>
<tr>
<td>
Registration "N" #:<asp:TextBox ID="aRegNo" Text='<%#Eval("aRegNo")%>' Style="width: 270px;
margin-left: 195px;" runat="server"></asp:TextBox>
</td>
<td>
AVIONICS: <asp:TextBox ID="txtavionics" Style="width: 270px; margin-left: 237px;" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap;">
MFG. Name: (make):<asp:TextBox ID="aMake" Style="width: 270px; margin-left: 175px;"
runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Model Name OR #::<asp:TextBox ID="aModelNo" Style="width: 270px; margin-left: 184px;"
runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Year Built:<asp:TextBox ID="aYRBuilt" Style="width: 270px; margin-left: 252px;" runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Serial Number:<asp:TextBox ID="aSN" Style="width: 270px; margin-left: 219px;" runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Date Purchased:<asp:TextBox ID="txtdatePurchased" Style="width: 270px; margin-left: 205px;"
runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td>
Purchased:<asp:RadioButtonList ID="rblPurchaseType" runat="server" ValidationGroup ="stype" RepeatDirection="Horizontal" TextAlign="Right" style="display:inline;">
<asp:ListItem Text="New" />
<asp:ListItem Text="Used" />
</asp:RadioButtonList><br />
<asp:RequiredFieldValidator style="color:#ff0000;" id="RequiredFieldValidator1"
ControlToValidate="rblPurchaseType"
ErrorMessage="Please choose New or Used"
ValidationGroup ="stype"
runat="server"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2">
<span style="text-align:left;"> If purchased used this year, write the name and address of the
previous owner.</span>
<br />
<div class="input text select"> NAME: <asp:TextBox ID="txtPrevOnwerName" style="width:200px;" runat="server"></asp:TextBox>
ADDRESS: <asp:TextBox ID="txtprevAddr" style="width:200px;" runat="server"></asp:TextBox>
<span style="white-space:nowrap;">CITY:<asp:TextBox ID="txtprevCity" style="width:100px; margin-left:15px;" runat="server"></asp:TextBox>STATE:
<asp:DropDownList ID="ddlPrevState" runat="server" AppendDataBoundItems="True">
<asp:ListItem Value="" Selected="False"></asp:ListItem>
</asp:DropDownList>
ZIP:<asp:TextBox ID="txtprevzip" runat="server"></asp:TextBox></div></span></td>
</tr>
<tr>
<td style="white-space:nowrap;">
Cost:<asp:TextBox ID="aircraftCost" style="width:270px;margin-left:287px;" runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
</tr>
<td style="white-space:nowrap;">
Hours Between Overhauls(TBO):<asp:TextBox ID="hrsBtwnTBO" style="width:270px;margin-left:90px;" runat="server"></asp:TextBox></td>
<td></td>
</tr>
<tr>
<td style="white-space:nowrap;">
Hours Since Last OVerhaul:<asp:TextBox ID="hrsOverhaul" style="width:270px;margin-left:127px;" runat="server"></asp:TextBox></td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Last Overhaul:<asp:RadioButtonList ID="rbllastOverHaul" ValidationGroup="stype" runat="server"
RepeatDirection="Horizontal" TextAlign="Right" Style="display: inline;">
<asp:ListItem Text="Major" />
<asp:ListItem Text="Top" />
</asp:RadioButtonList>
<br />
<asp:RequiredFieldValidator Style="color: #ff0000;" ID="RequiredFieldValidator2"
ControlToValidate="rbllastOverHaul" ErrorMessage="Please choose Major or Top"
ValidationGroup="stype" runat="server" />
</td>
<td></td>
</tr>
<tr>
<td style="white-space: nowrap;">
Total Hours On Airframe As of Jan. 1:<asp:TextBox ID="TotOnAirFrm" Style="width: 270px;
margin-left: 58px;" runat="server"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td>
NOTE: Please submit a copy of your log book to substantiate T.B.O. and
airframe hours.
</td>
<td></td>
</tr>
<tr>
<td style="border-collapse: collapse;" colspan="2">
If you sold or traded your aircraft and did not own on January 1
this year, provide details of the new buyer below in order for the items
to be removed from your account.<br />
<div class="input text select"> NAME:<asp:TextBox ID="txtbuyername" style="width:200px;" runat="server"></asp:TextBox>
ADDRESS:<asp:TextBox ID="txtbuyeraddress" style="width:200px;" runat="server"></asp:TextBox>
<span style="margin-left:32px;color:#000;">CITY:<asp:TextBox ID="txtbuyercity" style="width:150px;" runat="server"></asp:TextBox>STATE:
<asp:DropDownList ID="lblbuyerstate" runat="server" AppendDataBoundItems="True">
<asp:ListItem Value="" Selected="True"></asp:ListItem>
</asp:DropDownList>
ZIP:<asp:TextBox ID="txtbuyerzip" style="width:50px;" runat="server"></asp:TextBox></div></td>
</tr>
<tr>
<td colspan="2"><div class="input text">Date Sold:<asp:TextBox ID="txtdatesold" runat="server"></asp:TextBox><span style="margin-left:220px;color:#333;">Sale Price:<asp:TextBox ID="txtsalePrice" runat="server"></asp:TextBox></span></div></td>
</tr>
<tr>
<td colspan="2" align="center"> Description:<br /><div class="input textarea"><asp:TextBox ID="txtDescription" TextMode="MultiLine" style="width:750px;" runat="server"></asp:TextBox></div></td>
</tr>
<tr>
<td colspan="2" align="center">
Is there anything functionally wrong with your aircraft?<br />
<asp:RadioButtonList ID="rblIssues" runat="server" ValidationGroup ="stype" RepeatDirection="Horizontal" TextAlign="Right" style="display:inline;">
<asp:ListItem Text="Yes" />
<asp:ListItem Text="No" />
</asp:RadioButtonList><br />
<asp:RequiredFieldValidator style="color:#ff0000;" id="RequiredFieldValidator3"
ControlToValidate="rblIssues"
ErrorMessage="Please Yes or No"
ValidationGroup ="stype" runat="server"/><br />
If yes please provide the Board of Assessors with
documentation in order for them to make a proper assessment.<br /><br />
<br />
List anything functionally wrong with your aircraft:
<div class="input textarea"> <asp:TextBox ID="functionalIsses" style="width:800px;" TextMode="MultiLine" runat="server"></asp:TextBox></div>
</td>
</tr>
</table>
<table>
<tr>
<td colspan="2">
<asp:Button ID="BtnAdd2" Style="width: 150px;" runat="server" Text="Next Aircraft"
OnClick="ButtonAdd2_Click" CssClass="btnclass" />
<asp:Button ID="btnDelete" Style="width: 120px;" runat="server" Text="Remove a row"
OnClick="btnDelete_Click" CssClass="btnclass" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
</asp:View>
<asp:View ID="vwPreview" runat="server">
<table border="1" style="width:90%; text-align:left">
<tr>
<td style="width:30%;vertical-align: text-top;font-weight:normal;text-align:center;color:gainsboro">FOR OFFICE ONLY</td>
<td style="width:70%;"><div class="auto-style7"><span style="font-weight:bold;color:#4b4b4b;">AIRCRAFT PERSONAL PROPERTY TAX RETURN</span><br />
<span style="color:#4b4b4b;">This Return will be considered Public Information and Open for Public Inspection<br />
Return completed form to address listed below.</span></div></td>
</tr>
<tr>
<td style="vertical-align: text-top;width:45%;">
<table border="1" class="nav-justified">
<tr>
<td class="auto-style5">TAX YEAR</td>
<td rowspan="2" class="auto-style2"><span style="margin-left:7px;color:#000;">IF ASSISTANCE NEEDED CALL</span><br /> <span style="margin-left:32px;color:#000;">111-111-1111</span></td>
<td class="auto-style1">ACCOUNT NUMBER</td>
</tr>
<tr>
<td class="auto-style5"><asp:Label ID="lblTaxYr" style="color: #0093B2;font-weight:bold;" runat="server" /></td>
<td class="auto-style1"><div class="input text"> <asp:Label ID="lblAcctNo" disabled="disabled" style="width:155px; color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td class="auto-style5"><span style="color:red;">DUE DATE</span></td>
<td colspan="2" >OWNER'S PHONE NUMBER (LIST)</td>
</tr>
<tr>
<td class="auto-style5"><asp:Label ID="lblDueDate" style="color: #0093B2;font-weight:bold;" runat="server" /></td>
<td colspan="2" ><asp:Label ID="lblOwnerPhone" style="color: #0093B2;font-weight:bold;" runat="server" /></td>
</tr>
</table>
<table style="width:60%">
<tr>
<td style="text-align:center"><br />Payer NAME AND ADDRESS</td>
</tr>
<tr><td style="border-collapse: collapse;border: 0px solid black;"> </td></tr>
<tr>
<td>
<table border="0">
<tr>
<td>NAME:</td><td><div class="input text"> <asp:Label ID="lblfName" style="width:459px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td>ADDRESS:</td><td><div class="input text"> <asp:Label ID="lblfAddress" style="width:459px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
</table>
<table border="0">
<tr>
<td><span style="margin-left:2px;color:#000;">CITY:</span> </td><td><div class="input text"> <asp:Label ID="lblfCity" style="width:150px; color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td><td> STATE:</td><td><div class="input select">
<asp:Label ID="lblfStates" CssClass="Label" disabled="disabled" runat="server">
</asp:Label>
</div></td><td> ZIP:</td><td><div class="input text"> <asp:Label ID="lblfZip" style="width:57px; color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
</table>
</td>
</tr>
<tr><td style="border-collapse: collapse;border: 0px solid black;"> </td></tr><tr><td style="border-collapse: collapse;border: 0px solid black;"> </td></tr>
<tr>
<td style="border-collapse: collapse;border-top: 1px solid black;border-bottom: 1px solid black;width:100%;"><span style="color:red">The last day for filing this application to receive full exemption<br />
is listed in the DUE DATE column above.</span> Note: Most counties do not accept metered mail dates as filing date unless counter<br />
stamped by the post office. Be sure that the date of deposit and the postmark date are the same if mailing is close to the deadline.<br /></td>
</tr>
</table>
</td>
<td style="vertical-align: text-top;width:55%;">
<table border="0" style="width:100%">
<tr>
<td style="border-collapse: collapse;border-bottom: 1px solid black;"><div class="auto-style7">NAME AND RETURN ADDRESS</div></td>
</tr>
<tr>
<td style="border-collapse: collapse;border-bottom: 1px solid black;"><div class="auto-style7">Test<br />
Test1.<br />
Test2,<br />
Test3</div></td>
</tr>
<tr>
<td style="border-collapse: collapse;border: 1px solid black;">TAX SITUS (WHERE YOU LIVE):</td>
</tr>
<tr><td> </td></tr>
<tr>
<td>
<asp:Label ID="lblsitus" runat="server" style="width:90%;height:70px;width:257px;color: #0093B2;font-weight:bold;" disabled="disabled">
</asp:Label>
<div id="divcitylistprev" style="margin-top:-45px;margin-left:110px;"><asp:Label ID="lblcitylist" class="form-control" style="width:400px; color: #0093B2;font-weight:bold;" placeholder="(List here...)" runat="server" /></div>
</td>
</tr>
<tr>
<td style="border-collapse: collapse;border: 1px solid black;"><div class="auto-style7"><asp:CheckBox ID="chksameAddr" style="color: #0093B2;font-weight:bold;" runat="server" />CHECK BOX IF MAILING ADDRESS OR NAME IS SAME<br />
OTHERWISE, PLEASE CORRECT IN SPACE PROVIDED BELOW</div></td>
</tr>
</table>
<table border="0">
<tr>
<td>NAME:</td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:Label ID="lblfullName" style=" color: #0093B2;font-weight:bold;width:600px;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td>ADDRESS:</td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:Label ID="lblAddress" style="width:600px; color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
</table>
<table border="0">
<tr>
<td>CITY:<span style="margin-left:32px;color:#000;"></span></td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:Label ID="lblCity" style="color: #0093B2;font-weight:bold;width:100px;" runat="server"></asp:Label></div></td><td><span style="margin-left:7px;color:#000;">STATE:</span></td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input select">
<asp:Label ID="lblStates" CssClass="Label" disabled="disabled" runat="server" style="width:150px;">
</asp:Label>
</div></td><td><span style="margin-left:30px;color:#000;">ZIP:</span></td><td style="border-collapse: collapse;border: 1px solid black;"><div class="input text"> <asp:Label ID="lblZip" style="color: #0093B2;font-weight:bold;width:100px;" runat="server"></asp:Label></div></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="1" style="width:100%;text-align:center;">
<tr>
<td style="width:100%;vertical-align: text-top;">
<table cellspacing="0" rules="all" border="1" width="100%" style="border-collapse:collapse;table-layout: fixed;">
<tr>
<th align="left" scope="col">Aircraft Registration #:</th>
<th scope="col">Payer Returned Value <br />As of Jan This Year</th>
<th scope="col"><span style="color:gainsboro;margin-left:50px;">For Tax Office use Only</span> <br /><span style="color:gainsboro;margin-left:50px;"> (Tax Assessirs Value)</span></th>
</tr>
<%foreach (System.Data.DataRow row in dtAirInfoTable.Rows)
{%>
<tr>
<td>
<span class="form-control" style="width: 493px; color: #0093B2;font-weight: bold;"> <%=row.ItemArray[1].ToString()%></span>
</td>
<td align="left">
<span class="form-control txtPayerret" style="width: 326px;color: #0093B2; font-weight: bold;"><%=row.ItemArray[2].ToString()%></span>
</td>
</tr>
<% } %>
</table>
</td>
</tr>
</table>
<table border="1" style="width:90%;text-align:center">
<tr>
<td width="24.2%">TOTAL<span style="margin-left:200px;color:#000000;font-weight:bold;">></span></td>
<td style="width:23%">
<asp:Label ID="lblTotalPrev" style="color: #0093B2;font-weight: bold;" runat="server"></asp:Label></td>
<td style="width:62.8%"></td>
</tr>
</table>
<table style="width:100%;border: 1px solid black;">
<tr>
<td style="width:33.3%;border-collapse: collapse;white-space:nowrap;">
Airport where aircraft primary home based city: <asp:Label ID="lblAircraftCity" style="width:270px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></td>
<td style="text-align:center;">
</td>
<td style="width:33.3%;border-collapse: collapse;white-space:nowrap;">
Country: <asp:Label ID="lblAircraftcnty" style="width:270px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></td>
<td style="text-align:center;">
</td>
<td style="width:33.3%;border-collapse: collapse;white-space:nowrap;">
State: <asp:Label ID="lAblircraftstate" AppendDataBoundItems="True" runat="server" /> </td>
<td style="text-align:center;">
</td>
</tr>
</table>
<table style="width: 100%; border: 1px solid black;">
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Registration "N" #:<asp:Label ID="lblARegNo" Text="" Style="width: 270px; margin-left: 195px;"
runat="server"></asp:Label>
</td>
<td style="text-align: center; border: 1px solid black;">
AVIONICS AND EXTRA EQUIPMENT
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
MFG. Name: (make):<asp:Label ID="lblAMake" Style="width: 270px; margin-left: 175px;"
runat="server"></asp:Label>
</td>
<td style="width: 50%; text-align: center; border: 1px solid black;" rowspan="10">
<asp:Label ID="lblavionics" runat="server" TextMode="MultiLine" Style="width: 100%;
height: 700px;" class="form-control"></asp:Label>
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Model Name OR #::<asp:Label ID="lblAModelNo" Style="width: 270px; margin-left: 184px;"
runat="server"></asp:Label>
</td>
<td style="width: 50%; text-align: center; border: 0px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Year Built:<asp:Label ID="lblAYRBuilt" Style="width: 270px; margin-left: 252px;"
runat="server"></asp:Label>
</td>
<td style="width: 50%; text-align: center; border: 0px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Serial Number:<asp:Label ID="lblASN" Style="width: 270px; margin-left: 219px;" runat="server"></asp:Label>
</td>
<td style="width: 50%; text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Date Purchased:<asp:Label ID="lblDatePurchased" Style="width: 270px; margin-left: 205px;" runat="server"></asp:Label>
</td>
<td style="width: 50%; text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black;">
Purchased:<asp:Label ID="lblPurchType" Text="text" runat="server" />
<br />
</td>
<td style="text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Cost:<asp:Label ID="lblAircraftCost" Style="width: 270px; margin-left: 287px;" runat="server"></asp:Label>
</td>
<td style="text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Hours Between Overhauls(TBO):<asp:Label ID="lblHrsBtwnTBO" Style="width: 270px; margin-left: 90px;"
runat="server"></asp:Label>
</td>
<td style="text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Hours Since Last OVerhaul:<asp:Label ID="lblHrsOverhaul" Style="width: 270px; margin-left: 127px;"
runat="server"></asp:Label>
</td>
<td style="text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Last Overhaul:<asp:Label ID="lblOverhaul" Text="text" runat="server" />
<br />
</td>
<td style="text-align: center; border: 1px solid black;">
</td>
</tr>
<tr>
<td style="width: 50%; border-collapse: collapse; border: 1px solid black; white-space: nowrap;">
Total Hours On Airframe As of Jan. 1:<asp:Label ID="lblTotOnAirFrm" Style="width: 270px;
margin-left: 58px;" runat="server"></asp:Label>
</td>
<td style="border: 1px solid black;">
NOTE: Please submit a copy of your log book to substantiate T.B.O. and<br />
airframe hours.
</td>
</tr>
</table>
<table border="0" width="90%">
<tr>
<td colspan="2">
<span style="text-align:left;"> If purchased used this year, write the name and address of the
previous owner.</span></td>
</tr>
<tr>
<td>NAME: </td><td><div class="input text"> <asp:Label ID="lblFNamePrev" style="width:450px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td>ADDRESS: </td><td><div class="input text"> <asp:Label ID="lblAddrPrev" style="width:450px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td><span style="margin-left:5px;color:#000;">CITY:</span> </td><td><div class="input text"> <asp:Label ID="lblCityPrev" style="width:150px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td><td> STATE:</td><td><div class="input select">
<asp:Label ID="Label1" runat="server" style="color: #0093B2;font-weight:bold;">
</asp:Label>
</div></td><td> ZIP:</td><td><div class="input text"> <asp:Label ID="lblZipPrev" style="width:50px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td style="white-space:nowrap;"> Date Sold:</td><td><div class="input text"><asp:Label ID="lblDdatesold" style="width:150px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
<td style="white-space:nowrap;"> Sale Price:</td><td><div class="input text"><asp:Label ID="lblSalePrice" style="width:150px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td style="white-space:nowrap;"> Description:</td><td><div class="input textarea"><asp:Label ID="lblDescription" TextMode="MultiLine" style="width:750px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
</table>
<table style="width:90%; text-align:left;border-left:solid;border-right:solid;border-bottom:solid">
<tr>
<td border="0">
<table border="0" >
<tr>
<th>
If you sold or traded your aircraft and did not own on January 1
this year, this section should be completed in order for the items
to be removed from your account.<br />
</th>
</tr>
</table>
</td>
<td border="0" width="50%" style="margin-left:400px;">
<table border="0">
<tr>
<td>
<table border="0" width="90%">
<tr>
<td>NAME:</td><td><div class="input text"> <asp:Label ID="lblPurchOnwer" style="width:450px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td>ADDRESS:</td><td><div class="input text"> <asp:Label ID="lblPurcAddr" style="width:450px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
<tr>
<td><span style="margin-left:2px;color:#000;">CITY:</span></td><td><div class="input text"> <asp:Label ID="lblPurcCity" style="width:150px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td><td> STATE:</td><td><div class="input select">
<asp:Label ID="Label4" runat="server" AppendDataBoundItems="True" style="width:150px;color: #0093B2;font-weight:bold;">
</asp:Label>
</div></td><td> ZIP:</td><td><div class="input text"> <asp:Label ID="lblPurcZip" style="width:50px;color: #0093B2;font-weight:bold;" runat="server"></asp:Label></div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table style="border-collapse: collapse;width:90%; border: 1px solid black;">
<tr>
<td>
Is there anything functionally wrong with your aircraft?<br />
<asp:Label ID="Label3" runat="server" style="color: #0093B2;font-weight:bold;">
</asp:Label><br />
List anything functionally wrong with your aircraft:
<div class="input textarea"> <asp:Label ID="lblfunctionalIsses" style="width:800px;color: #0093B2;font-weight:bold;" TextMode="MultiLine" runat="server"></asp:Label></div>
</td>
</tr>
</table>
<br /><br />
<table border="1" style="width:90%; text-align:left">
<tr>
<td>
<br /><span style="font-size:5em;margin-left:400px;font-weight:bold;">Payer'S DECLARATION</span><br />
“I do solemnly swear, or affirm, that I have carefully read (or have heard read) and have duly considered the questions propounded in the foregoing tax list, and that
the value placed by me on the property listed as shown, is the true market value there of, and I further swear, or affirm, that I returned, for the purpose of being taxed
thereon, every species of inventory that I own in my right, or have control of, either as agent, executor, administrator, or otherwise; and in making this application,
for the purpose of being taxed thereon, I have not attempted, either by transferring my property to another or by any other means, to evade the laws governing
taxation in this state. I do further swear, or affirm, that in making this application, I have done so by estimating the true worth and value of every species of inventory
contained therein.”<br /><br />
</td>
</tr>
</table>
<table border="1" style="width:90%; text-align:left">
<tr>
<td style="width:40%"><div>
<asp:CheckBox ID="chkTerms" runat="server" />
I do: <span id="TermsRequired" style="display: none; color: red;"><span style="color:red;">Check the box before you can submit your data</span></span>
</div></td><td style="width:40%">Title: <asp:TextBox id="txtTitle" runat="server"></asp:TextBox></td><td style="width:20%">Date: <asp:Label id="signDate" runat="server"></asp:Label></td>
</tr>
</table>
<style type="text/css">
.modal {
position:relative;
top:-1em;
z-index:100;
}
.loading{
font-family: Arial;
font-size: 10pt;
border: 5px solid #0093B2;
width: 200px;
height: 100px;
display: none;
position: fixed;
margin-top:400px;
margin-left:300px;
background-color: White;
z-index: 999;
}
</style>
<script type="text/javascript">
$(function () {
$('#btnSave').click(function (e) {
if ($('#<%=chkTerms.ClientID%>').prop('checked')) {
$(".loading").addClass('modal');
$(".loading").show();
}
else {
$('#TermsRequired').show();
e.preventDefault();
}
});
$('#chkTerms').click(function () {
if ($(this).prop('checked')) {
$('#TermsRequired').hide();
}
});
});
</script>
<br />
</asp:View>
</asp:MultiView>
<br /><br />
<span style="margin-left:10px;">
<asp:Button ID="btnback" Text="Back" CssClass="btnclass" OnClick="onBack" runat="server" Height="51px" Width="94px" />
<asp:Button ID="btnNext" Text="Next" OnClick="OnClickNext" CssClass="btnclass" runat="server" Height="51px" Width="79px" />
<asp:Button ID="btnSave" Text="Save" class="btnclass" OnClick="btnSave_Click" runat="server" Height="51px" Width="109px" /></span>
<p><asp:Label id="lblResult" ForeColor="Red" Visible="false" runat="server"></asp:Label></p>
</div>
</form>
</div>
<div>
<script type="text/javascript">
function pageLoad() {
totalcalculate();
$('[id*=txtPayerret]').keyup(function () {
totalcalculate();
});
}
//function totalcalculate() {
// var total = 0;
// for (var i = 0; i < $('.txtPayerret').length; i++) {
// var temp = $('.txtPayerret')[i].value;
// temp != "" ? temp : temp = 0;
// total = parseFloat(temp) + parseFloat(total);
// $('[id*=lblTotal]').html(total);
// $('[id*=hfvalue]').val(total);
// }
//}
function totalcalculate() {
var total = 0;
for (var i = 0; i < $('.txtPayerret').length; i++) {
var temp = $('.txtPayerret')[i].value;
temp != "" ? temp : temp = 0;
total = parseFloat(temp) + parseFloat(total);
$('#lblTotal').html(total.toFixed(2));
$('[id*=hfvalue]').val(total);
}
}
</script>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
table
{
border: 1px solid #ccc;
}
table th
{
background-color: #F7F7F7;
color: #333;
font-weight: bold;
}
table th, table td
{
padding: 5px;
border-color: #ccc;
}
.btnclass
{
color: #FFF;
background-color: #0093B2;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0px;
font-size: 14px;
font-weight: 400;
line-height: 1.42857;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
-moz-user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.auto-style8 {
width: 922px;
}
.auto-style9 {
width: 2023px;
}
.auto-style10 {
width: 30%;
height: 89px;
}
.auto-style11 {
width: 30%;
}
.auto-style12 {
width: 3px;
}
.auto-style13 {
width: 93px;
height: 84px;
}
.auto-style14 {
width: 825px;
}
.auto-style15 {
width: 33%;
height: 89px;
}
.auto-style16 {
width: 36%;
height: 89px;
}
.auto-style17 {
width: 52%;
}
.auto-style18 {
width: 119px;
}
.auto-style19 {
width: 562px;
}
.auto-style21 {
height: 84px;
}
.auto-style22 {
height: 84px;
width: 12px;
}
.auto-style23 {
height: 84px;
width: 89px;
}
.auto-style25 {
width: 24%;
}
.auto-style26 {
width: 47%;
height: 89px;
}
</style>
</div>
</body>
</html>
C#
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Net;
using System.Threading;
using System.Net.Mime;
using System.Drawing;
using System.Collections.Specialized;
public partial class AircraftPPTR : System.Web.UI.Page
{
string connStr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
DataTable cstable;
protected void Page_Load(object sender, EventArgs e)
{
signDate.Text = DateTime.Now.ToString();
foreach (RepeaterItem item in Repeater2.Items)
{
RadioButtonList ddlType = item.FindControl("rblPurchaseType") as RadioButtonList;
TextBox txtbox = item.FindControl("txtPrevOnwerName") as TextBox;
//System.Web.UI.WebControls.Panel Panel1 = item.FindControl("purchaseNewUsed") as System.Web.UI.WebControls.Panel;
if (ddlType.SelectedValue == "New")
{
txtbox.Enabled = false;
}
else
{
txtbox.Enabled = true;
}
}
//Populate all states dropdownlist boxes
//First dropdownlist box
SqlCommand fstates = new SqlCommand("Select sID, sName from states ORDER By sName ASC", new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString));
fstates.Connection.Open();
SqlDataReader fstatesValues = default(SqlDataReader);
fstatesValues = fstates.ExecuteReader();
ddlstates.DataSource = fstatesValues;
ddlstates.DataValueField = "sID";
ddlstates.DataTextField = "sName";
ddlstates.DataBind();
fstates.Connection.Close();
//Second dropdownList box
SqlCommand Sstates = new SqlCommand("Select sID, sName from states ORDER By sName ASC", new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString));
Sstates.Connection.Open();
SqlDataReader SstatesValues = default(SqlDataReader);
SstatesValues = Sstates.ExecuteReader();
ddlfillstates.DataSource = SstatesValues;
ddlfillstates.DataValueField = "sID";
ddlfillstates.DataTextField = "sName";
ddlfillstates.DataBind();
Sstates.Connection.Close();
////Third dropdownList box
//SqlCommand Dstates = new SqlCommand("Select sID, sName from states ORDER By sName ASC", new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString));
//Dstates.Connection.Open();
//SqlDataReader DstatesValues = default(SqlDataReader);
//DstatesValues = Dstates.ExecuteReader();
//lblbuyerstate.DataSource = DstatesValues;
//lblbuyerstate.DataValueField = "sID";
//lblbuyerstate.DataTextField = "sName";
//lblbuyerstate.DataBind();
//Dstates.Connection.Close();
//We query the DB only once in the Page Load
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
string sSQL = "Select sID,sName from states ORDER By sName ASC";
// Response.Write(sSQL);
//Response.End();
SqlCommand cmd3 = new SqlCommand(sSQL, con);
con.Open();
cstable = new DataTable();
cstable.Load(cmd3.ExecuteReader());
if (!Page.IsPostBack)
{
//dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
// new DataColumn("Name", typeof(string)),
// new DataColumn("Country",typeof(string)) });
//dt.Rows.Add(1, "John Hammond", "United States");
//dt.Rows.Add(2, "Mudassar Khan", "India");
//dt.Rows.Add(3, "Suzanne Mathews", "France");
//dt.Rows.Add(4, "Robert Schidner", "Russia");
//Gridview1.DataSource = dt;
//Gridview1.DataBind();
//Repeater2.DataSource = dt;
//Repeater2.DataBind();
//foreach (RepeaterItem item in Repeater2.Items)
//{
// string rtype = (item.FindControl("rblPurchaseType") as RadioButtonList).SelectedValue;
// TextBox txtbox = (item.FindControl("txtPrevOnwerName") as TextBox);
// //Code to insert data here
// if (rtype == "New")
// {
// txtbox.Enabled = false;
// }
// else
// {
// txtbox.Enabled = true;
// }
//}
//<asp:Panel id="pnlSecondQuestion" runat="server" Visible="false"
// EnableViewState="false">
// </asp:Panel>
this.SetInitialRow();
txtTaxYr.Text = DateTime.Now.Year.ToString();
txtDueDate.Text = "04/01/2017";
}
SqlConnection conn = new SqlConnection(connStr);
conn.Open();
SqlCommand command = new SqlCommand("select PID from Payer", conn);
// int result = command.ExecuteNonQuery();
using (SqlDataReader reader = command.ExecuteReader())
{
if (reader.Read())
{
// lblTotal.Text = Convert.ToInt32("GrandTotal");
}
}
conn.Close();
}
//We load the DropDownList in the event
protected void repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
var ddl = (DropDownList)e.Item.FindControl("aircraftstate");
// Response.Write(ddl);
//Response.End();
ddl.DataSource = cstable;
ddl.DataTextField = "sName";
ddl.DataValueField = "sID";
ddl.DataBind();
var ddlPState = (DropDownList)e.Item.FindControl("ddlPrevState");
ddlPState.DataSource = cstable;
ddlPState.DataTextField = "sName";
ddlPState.DataValueField = "sID";
ddlPState.DataBind();
var lblBState = (DropDownList)e.Item.FindControl("lblbuyerstate");
lblBState.DataSource = cstable;
lblBState.DataTextField = "sName";
lblBState.DataValueField = "sID";
lblBState.DataBind();
//TextBox textbox = (TextBox)e.Item.FindControl("purchaseNewUsed");
//RadioButtonList tbPurchaseType = e.Item.FindControl("rblPurchaseType");
//tbPurchaseType.Attributes.Add("onclick", "document.getElementById('" + textbox.ClientID + "').disabled = !this.checked;");
}
private void SetInitialRow()
{
myMultiView.ActiveViewIndex = 0;
DataTable dt = new DataTable();
DataRow dr = null;
dt.Columns.Add(new DataColumn("ID", typeof(string)));
dt.Columns.Add(new DataColumn("boatregNum", typeof(string)));
dt.Columns.Add(new DataColumn("Payerret", typeof(string)));
dr = dt.NewRow();
dr["ID"] = 1;
dr["boatregNum"] = string.Empty;
dr["Payerret"] = string.Empty;
dt.Rows.Add(dr);
ViewState["CurrTable"] = dt;
Gridview1.DataSource = dt;
Gridview1.DataBind();
}
private void SetInitialRow2(string registerNumber)
{
DataTable dt = new DataTable();
DataRow dr = null;
//Create DataTable columns
dt.Columns.Add(new DataColumn("RowNumber", typeof(string)));
dt.Columns.Add(new DataColumn("aircity", typeof(string)));
dt.Columns.Add(new DataColumn("aircnty", typeof(string)));
dt.Columns.Add(new DataColumn("airstate", typeof(string)));
dt.Columns.Add(new DataColumn("aRegNo", typeof(string)));
dt.Columns.Add(new DataColumn("Make", typeof(string)));
dt.Columns.Add(new DataColumn("ModelNo", typeof(string)));
dt.Columns.Add(new DataColumn("YRBuilt", typeof(string)));
dt.Columns.Add(new DataColumn("SN", typeof(string)));
dt.Columns.Add(new DataColumn("txtdatePurchased", typeof(string)));
dt.Columns.Add(new DataColumn("rblPurchaseType", typeof(string)));
dt.Columns.Add(new DataColumn("PrevOnwerName", typeof(string)));
dt.Columns.Add(new DataColumn("prevAddr", typeof(string)));
dt.Columns.Add(new DataColumn("prevCity", typeof(string)));
dt.Columns.Add(new DataColumn("PrevState", typeof(string)));
dt.Columns.Add(new DataColumn("prevzip", typeof(string)));
dt.Columns.Add(new DataColumn("buyername", typeof(string)));
dt.Columns.Add(new DataColumn("buyeraddress", typeof(string)));
dt.Columns.Add(new DataColumn("buyercity", typeof(string)));
dt.Columns.Add(new DataColumn("buyerstate", typeof(string)));
dt.Columns.Add(new DataColumn("buyerzip", typeof(string)));
dt.Columns.Add(new DataColumn("datesold", typeof(string)));
dt.Columns.Add(new DataColumn("salePrice", typeof(string)));
dt.Columns.Add(new DataColumn("description", typeof(string)));
dt.Columns.Add(new DataColumn("aCost", typeof(string)));
dt.Columns.Add(new DataColumn("BtwnTBO", typeof(string)));
dt.Columns.Add(new DataColumn("Overhaul", typeof(string)));
dt.Columns.Add(new DataColumn("rbllastOverHaul", typeof(string)));
dt.Columns.Add(new DataColumn("TotalOnAirFrm", typeof(string)));
dt.Columns.Add(new DataColumn("Avionics", typeof(string)));
dt.Columns.Add(new DataColumn("rissues", typeof(string)));
dt.Columns.Add(new DataColumn("issuedetails", typeof(string)));
//Create Row for each columns
dr = dt.NewRow();
dr["RowNumber"] = 1;
dr["aircity"] = string.Empty;
dr["aircnty"] = string.Empty;
dr["airstate"] = string.Empty;
dr["ARegNo"] = registerNumber;
dr["Make"] = string.Empty;
dr["ModelNo"] = string.Empty;
dr["YRBuilt"] = string.Empty;
dr["SN"] = string.Empty;
dr["txtdatePurchased"] = string.Empty;
dr["rblPurchaseType"] = string.Empty;
dr["PrevOnwerName"] = string.Empty;
dr["prevAddr"] = string.Empty;
dr["prevCity"] = string.Empty;
dr["PrevState"] = string.Empty;
dr["prevzip"] = string.Empty;
dr["buyername"] = string.Empty;
dr["buyeraddress"] = string.Empty;
dr["buyercity"] = string.Empty;
dr["buyerstate"] = string.Empty;
dr["buyerzip"] = string.Empty;
dr["datesold"] = string.Empty;
dr["salePrice"] = string.Empty;
dr["description"] = string.Empty;
dr["aCost"] = string.Empty;
dr["BtwnTBO"] = string.Empty;
dr["Overhaul"] = string.Empty;
dr["rbllastOverHaul"] = string.Empty;
dr["TotalOnAirFrm"] = string.Empty;
dr["Avionics"] = string.Empty;
dr["rissues"] = string.Empty;
dr["issuedetails"] = string.Empty;
dt.Rows.Add(dr);
//Store the DataTable in ViewState for future reference
ViewState["CurrentTable"] = dt;
//Bind the Repeater with the DataTable
Repeater2.DataSource = dt;
Repeater2.DataBind();
}
private void AddNewRow2(string registerNumber)
{
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
DataRow drCurrentRow = null;
if (dtCurrentTable.Rows.Count > 0)
{
for (int i = 1; i <= dtCurrentTable.Rows.Count; i++)
{
//extract the TextBox values
TextBox tbaircity = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCity");
TextBox tbaircnty = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftcnty");
DropDownList tbairstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("aircraftstate");
TextBox tbTextBox2 = (TextBox)Repeater2.Items[rowIndex].FindControl("aRegNo");
TextBox tbTextBox3 = (TextBox)Repeater2.Items[rowIndex].FindControl("aMake");
TextBox tbTextBox4 = (TextBox)Repeater2.Items[rowIndex].FindControl("aModelNo");
TextBox tbTextBox5 = (TextBox)Repeater2.Items[rowIndex].FindControl("aYRBuilt");
TextBox tbTextBox6 = (TextBox)Repeater2.Items[rowIndex].FindControl("aSN");
TextBox tbdatePurchased = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatePurchased");
RadioButtonList rbtlist1 = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblPurchaseType");
TextBox tbPrevOnwerName = (TextBox)Repeater2.Items[rowIndex].FindControl("txtPrevOnwerName");
TextBox tbprevAddr = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevAddr");
TextBox tbprevCity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevCity");
DropDownList tbPrevState = (DropDownList)Repeater2.Items[rowIndex].FindControl("ddlPrevState");
TextBox tbprevzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevzip");
TextBox tbbuyername = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyername");
TextBox tbbuyeraddress = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyeraddress");
TextBox tbbuyercity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyercity");
DropDownList tbbuyerstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("lblbuyerstate");
TextBox tbbuyerzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyerzip");
TextBox tbdatesold = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatesold");
TextBox tbsalePrice = (TextBox)Repeater2.Items[rowIndex].FindControl("txtsalePrice");
TextBox tbdescription = (TextBox)Repeater2.Items[rowIndex].FindControl("txtDescription");
TextBox tbTextBox9 = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCost");
TextBox tbBtwnTBO = (TextBox)Repeater2.Items[rowIndex].FindControl("hrsBtwnTBO");
TextBox tbOverhaul = (TextBox)Repeater2.Items[rowIndex].FindControl("hrsOverhaul");
RadioButtonList tbrbllastOverHaul = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rbllastOverHaul");
TextBox tbTotalOnAirFrm = (TextBox)Repeater2.Items[rowIndex].FindControl("TotOnAirFrm");
TextBox tbAvionics = (TextBox)Repeater2.Items[rowIndex].FindControl("txtavionics");
RadioButtonList tbissues = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblIssues");
TextBox tbissuedetails = (TextBox)Repeater2.Items[rowIndex].FindControl("functionalIsses");
//Create new row in DataTable and set its values
drCurrentRow = dtCurrentTable.NewRow();
drCurrentRow["RowNumber"] = i + 1;
dtCurrentTable.Rows[i - 1]["aircity"] = tbaircity.Text;
dtCurrentTable.Rows[i - 1]["aircnty"] = tbaircnty.Text;
dtCurrentTable.Rows[i - 1]["airstate"] = tbairstate.Text;
dtCurrentTable.Rows[i - 1]["aRegNo"] = tbTextBox2.Text;
dtCurrentTable.Rows[i - 1]["Make"] = tbTextBox3.Text;
dtCurrentTable.Rows[i - 1]["ModelNo"] = tbTextBox4.Text;
dtCurrentTable.Rows[i - 1]["YRBuilt"] = tbTextBox5.Text;
dtCurrentTable.Rows[i - 1]["SN"] = tbTextBox6.Text;
dtCurrentTable.Rows[i - 1]["txtdatePurchased"] = tbdatePurchased.Text;
dtCurrentTable.Rows[i - 1]["rblPurchaseType"] = rbtlist1.Text;
dtCurrentTable.Rows[i - 1]["PrevOnwerName"] = tbPrevOnwerName.Text;
dtCurrentTable.Rows[i - 1]["prevAddr"] = tbprevAddr.Text;
dtCurrentTable.Rows[i - 1]["prevCity"] = tbprevCity.Text;
dtCurrentTable.Rows[i - 1]["PrevState"] = tbPrevState.Text;
dtCurrentTable.Rows[i - 1]["prevzip"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["buyername"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["buyeraddress"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["buyercity"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["buyerstate"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["buyerzip"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["datesold"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["salePrice"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["description"] = tbprevzip.Text;
dtCurrentTable.Rows[i - 1]["aCost"] = tbTextBox9.Text;
dtCurrentTable.Rows[i - 1]["BtwnTBO"] = tbBtwnTBO.Text;
dtCurrentTable.Rows[i - 1]["Overhaul"] = tbOverhaul.Text;
dtCurrentTable.Rows[i - 1]["rbllastOverHaul"] = tbrbllastOverHaul.Text;
dtCurrentTable.Rows[i - 1]["TotalOnAirFrm"] = tbTotalOnAirFrm.Text;
dtCurrentTable.Rows[i - 1]["Avionics"] = tbAvionics.Text;
dtCurrentTable.Rows[i - 1]["rissues"] = tbissues.Text;
dtCurrentTable.Rows[i - 1]["issuedetails"] = tbissuedetails.Text;
rowIndex++;
}
//add the new row to the current DataTable
dtCurrentTable.Rows.Add(drCurrentRow);
//store the current DataTable in ViewState
ViewState["CurrentTable"] = dtCurrentTable;
//rebind the Repeater with the updated DataTable
Repeater2.DataSource = dtCurrentTable;
Repeater2.DataBind();
}
}
else
{
Response.Write("ViewState is null");
}
//Set Previous Data on Postbacks
SetPreviousData2(registerNumber);
}
private void SetPreviousData2(string registerNumber)
{
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
DataTable dt = (DataTable)ViewState["CurrentTable"];
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
//extract the TextBox values
TextBox tbaircity = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCity");
TextBox tbaircnty = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftcnty");
DropDownList tbairstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("aircraftstate");
TextBox tbTextBox2 = (TextBox)Repeater2.Items[rowIndex].FindControl("aRegNo");
TextBox tbTextBox3 = (TextBox)Repeater2.Items[rowIndex].FindControl("aMake");
TextBox tbTextBox4 = (TextBox)Repeater2.Items[rowIndex].FindControl("aModelNo");
TextBox tbTextBox5 = (TextBox)Repeater2.Items[rowIndex].FindControl("aYRBuilt");
TextBox tbTextBox6 = (TextBox)Repeater2.Items[rowIndex].FindControl("aSN");
TextBox tbdatePurchased = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatePurchased");
RadioButtonList rbtlist1 = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblPurchaseType");
TextBox tbPrevOnwerName = (TextBox)Repeater2.Items[rowIndex].FindControl("txtPrevOnwerName");
TextBox tbprevAddr = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevAddr");
TextBox tbprevCity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevCity");
DropDownList tbPrevState = (DropDownList)Repeater2.Items[rowIndex].FindControl("ddlPrevState");
TextBox tbprevzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevzip");
TextBox tbbuyername = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyername");
TextBox tbbuyeraddress = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyeraddress");
TextBox tbbuyercity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyercity");
DropDownList tbbuyerstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("lblbuyerstate");
TextBox tbbuyerzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyerzip");
TextBox tbdatesold = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatesold");
TextBox tbsalePrice = (TextBox)Repeater2.Items[rowIndex].FindControl("txtsalePrice");
TextBox tbdescription = (TextBox)Repeater2.Items[rowIndex].FindControl("txtDescription");
TextBox tbTextBox9 = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCost");
TextBox tbBtwnTBO = (TextBox)Repeater2.Items[rowIndex].FindControl("hrsBtwnTBO");
TextBox tbOverhaul = (TextBox)Repeater2.Items[rowIndex].FindControl("hrsOverhaul");
RadioButtonList tbrbllastOverHaul = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rbllastOverHaul");
TextBox tbTotalOnAirFrm = (TextBox)Repeater2.Items[rowIndex].FindControl("TotOnAirFrm");
TextBox tbAvionics = (TextBox)Repeater2.Items[rowIndex].FindControl("txtavionics");
RadioButtonList tbissues = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblIssues");
TextBox tbissuedetails = (TextBox)Repeater2.Items[rowIndex].FindControl("functionalIsses");
tbaircity.Text = dt.Rows[i]["aircity"].ToString();
tbaircnty.Text = dt.Rows[i]["aircnty"].ToString();
tbairstate.Text = dt.Rows[i]["airstate"].ToString();
tbTextBox2.Text = dt.Rows[i]["aRegNo"].ToString();
tbTextBox3.Text = dt.Rows[i]["Make"].ToString();
tbTextBox4.Text = dt.Rows[i]["ModelNo"].ToString();
tbTextBox5.Text = dt.Rows[i]["YRBuilt"].ToString();
tbTextBox6.Text = dt.Rows[i]["SN"].ToString();
tbdatePurchased.Text = dt.Rows[i]["txtdatePurchased"].ToString();
if (!string.IsNullOrEmpty(dt.Rows[i]["rblPurchaseType"].ToString()))
{
rbtlist1.Items.FindByText(dt.Rows[i]["rblPurchaseType"].ToString()).Selected = true;
}
tbPrevOnwerName.Text = dt.Rows[i]["PrevOnwerName"].ToString();
tbprevAddr.Text = dt.Rows[i]["prevAddr"].ToString();
tbprevCity.Text = dt.Rows[i]["prevCity"].ToString();
tbPrevState.Text = dt.Rows[i]["PrevState"].ToString();
tbprevzip.Text = dt.Rows[i]["prevzip"].ToString();
tbbuyername.Text = dt.Rows[i]["buyername"].ToString();
tbbuyeraddress.Text = dt.Rows[i]["buyeraddress"].ToString();
tbbuyercity.Text = dt.Rows[i]["buyercity"].ToString();
tbbuyerstate.Text = dt.Rows[i]["buyerstate"].ToString();
tbbuyerzip.Text = dt.Rows[i]["buyerzip"].ToString();
tbdatesold.Text = dt.Rows[i]["datesold"].ToString();
tbsalePrice.Text = dt.Rows[i]["salePrice"].ToString();
tbdescription.Text = dt.Rows[i]["description"].ToString();
tbTextBox9.Text = dt.Rows[i]["aCost"].ToString();
tbBtwnTBO.Text = dt.Rows[i]["BtwnTBO"].ToString();
tbOverhaul.Text = dt.Rows[i]["Overhaul"].ToString();
if (!string.IsNullOrEmpty(dt.Rows[i]["rbllastOverHaul"].ToString()))
{
tbrbllastOverHaul.Items.FindByText(dt.Rows[i]["rbllastOverHaul"].ToString()).Selected = true;
}
tbTotalOnAirFrm.Text = dt.Rows[i]["TotalOnAirFrm"].ToString();
tbAvionics.Text = dt.Rows[i]["Avionics"].ToString();
if (!string.IsNullOrEmpty(dt.Rows[i]["rissues"].ToString()))
{
tbissues.Items.FindByText(dt.Rows[i]["rissues"].ToString()).Selected = true;
}
tbissuedetails.Text = dt.Rows[i]["issuedetails"].ToString();
if (dt.Rows.Count - 1 == i)
{
tbTextBox2.Text = registerNumber;
}
rowIndex++;
}
}
}
}
protected void ButtonAdd2_Click(object sender, EventArgs e)
{
}
private void AddNewRowToGrid()
{
int rowIndex = 0;
if (ViewState["CurrTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrTable"];
DataRow drCurrentRow = null;
if (dtCurrentTable.Rows.Count > 0)
{
for (int i = 1; i <= dtCurrentTable.Rows.Count; i++)
{
TextBox tbboatregNum = (TextBox)Gridview1.Rows[rowIndex].Cells[1].FindControl("txtboatregNum");
TextBox tbPayerret = (TextBox)Gridview1.Rows[rowIndex].Cells[2].FindControl("txtPayerret");
drCurrentRow = dtCurrentTable.NewRow();
drCurrentRow["ID"] = i + 1;
dtCurrentTable.Rows[i - 1]["boatregNum"] = tbboatregNum.Text;
dtCurrentTable.Rows[i - 1]["Payerret"] = tbPayerret.Text;
rowIndex++;
}
dtCurrentTable.Rows.Add(drCurrentRow);
ViewState["CurrTable"] = dtCurrentTable;
Gridview1.DataSource = dtCurrentTable;
Gridview1.DataBind();
}
}
else
{
Response.Write("ViewState is null");
}
SetPreviousData();
}
private void SetPreviousData()
{
int rowIndex = 0;
if (ViewState["CurrTable"] != null)
{
DataTable dt = (DataTable)ViewState["CurrTable"];
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
TextBox tbboatregNum = (TextBox)Gridview1.Rows[rowIndex].Cells[1].FindControl("txtboatregNum");
TextBox tbPayerret = (TextBox)Gridview1.Rows[rowIndex].Cells[2].FindControl("txtPayerret");
tbboatregNum.Text = dt.Rows[i]["boatregNum"].ToString();
tbPayerret.Text = dt.Rows[i]["Payerret"].ToString();
rowIndex++;
}
}
}
}
protected void BtnAdd_Click(object sender, EventArgs e)
{
AddNewRowToGrid();
}
protected void btnDelete_Click(object sender, EventArgs e)
{
}
protected void Gridview1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int rowIndex = 0;
int rowID = e.RowIndex;
lblTotal.Text = "0";
if (ViewState["CurrTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrTable"];
if (dtCurrentTable.Rows.Count > 0)
{
for (int i = 1; i <= Gridview1.Rows.Count; i++)
{
TextBox tbboatregNum = (TextBox)Gridview1.Rows[rowIndex].Cells[1].FindControl("txtboatregNum");
TextBox tbPayerret = (TextBox)Gridview1.Rows[rowIndex].Cells[2].FindControl("txtPayerret");
dtCurrentTable.Rows[i - 1]["boatregNum"] = tbboatregNum.Text;
dtCurrentTable.Rows[i - 1]["Payerret"] = tbPayerret.Text;
rowIndex++;
}
if (e.RowIndex < dtCurrentTable.Rows.Count)
{
dtCurrentTable.Rows.Remove(dtCurrentTable.Rows[rowID]);
}
}
ViewState["CurrTable"] = dtCurrentTable;
Gridview1.DataSource = dtCurrentTable;
Gridview1.DataBind();
}
SetPreviousData();
}
protected void OnClickNext(object sender, EventArgs e)
{
int rowIndex = 0;
if (ViewState["CurrTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrTable"];
if (dtCurrentTable.Rows.Count > 0)
{
for (int i = 1; i <= Gridview1.Rows.Count; i++)
{
TextBox tbboatregNum = (TextBox)Gridview1.Rows[rowIndex].Cells[1].FindControl("txtboatregNum");
TextBox tbPayerret = (TextBox)Gridview1.Rows[rowIndex].Cells[2].FindControl("txtPayerret");
dtCurrentTable.Rows[i - 1]["boatregNum"] = tbboatregNum.Text;
dtCurrentTable.Rows[i - 1]["Payerret"] = tbPayerret.Text;
rowIndex++;
}
ViewState["TempData"] = dtCurrentTable;
}
}
myMultiView.ActiveViewIndex += 1;
PopulateRecord();
}
protected void onBack(object sender, EventArgs e)
{
lblTotal.Text = lblTotalPrev.Text;
myMultiView.ActiveViewIndex -= 1;
}
private void PopulateRecord()
{
foreach (GridViewRow row in Gridview1.Rows)
{
string registerNumber = (row.FindControl("txtboatregNum") as TextBox).Text;
if (row.RowIndex == 0)
{
this.SetInitialRow2(registerNumber);
}
else
{
AddNewRow2(registerNumber);
}
foreach (RepeaterItem Item in Repeater2.Items)
{
(Item.FindControl("BtnAdd2") as Button).Visible = Repeater2.Items.Count > 1;
(Item.FindControl("btnDelete") as Button).Visible = Repeater2.Items.Count > 1;
}
}
}
protected void rblsitus_SelectedIndexChanged(object sender, EventArgs e)
{
foreach (ListItem Li in rblsitus.Items)
{
if (Li.Text.Trim() == "CITY OF")
if (Li.Selected)
{
citylist.Enabled = true;
SetFocus(citylist);
}
else
{
citylist.Enabled = false;
}
}
}
protected void accountnumber_TextChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(accountnumber.Text))
{
try
{
SqlConnection Conn = default(SqlConnection);
//Read in connection String
Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
Conn.Open();
SqlCommand cmd = new SqlCommand("select * from Payer where PID=@pID", Conn);
cmd.Parameters.AddWithValue("@pID", accountnumber.Text);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
//we add a hidden field called IsValid to the markup and set the IsValid value in the event handler here.
checkusername.Visible = true;
imgstatus.ImageUrl = "images/Icon_Available.gif";
lblStatus.ForeColor = Color.Green;
lblStatus.Text = "Please proceed";
//Payer info exists, get form fields and store db values in them:
txtfname.Text = (dr["Payerfullname"].ToString());
btnNext.Enabled = true; //All is well, let user proceed
btnNext.BackColor = Color.SteelBlue;
//Rest goes here
System.Threading.Thread.Sleep(2000);
}
else
{
//Oh well, this must be a new Payer. S/he must complete the form.
checkusername.Visible = true;
imgstatus.ImageUrl = "images/NotAvailable.jpg";
lblStatus.ForeColor = Color.Red;
lblStatus.Text = "Invalid account number.";
btnNext.Enabled = false; //Stop user from going to Next page until account number is correct.
btnNext.BackColor = Color.Silver;
System.Threading.Thread.Sleep(2000);
}
}
catch
{
lblStatus.Text = "Invalid account number.";
}
}
else
{
checkusername.Visible = false;
}
}
protected override void OnPreRender(EventArgs e)
{
if (myMultiView.ActiveViewIndex == myMultiView.Views.Count - 1)
{
FillSummary();
}
btnback.Visible = myMultiView.ActiveViewIndex > 0;
btnNext.Visible = myMultiView.ActiveViewIndex < myMultiView.Views.Count - 1;
btnSave.Visible = myMultiView.ActiveViewIndex == myMultiView.Views.Count - 1;
base.OnPreRender(e);
}
public DataTable dtAirInfoTable;
private void FillSummary()
{
//preview of total tax return year
lblTotal.Text = hfvalue.Value;
//Show Payer summary info
lblAcctNo.Text = accountnumber.Text;
lblTaxYr.Text = txtTaxYr.Text;
lblOwnerPhone.Text = txtOwnerPhone.Text;
lblDueDate.Text = txtDueDate.Text;
lblfName.Text = txtfname.Text;
lblfAddress.Text = txtfaddress.Text;
lblfCity.Text = txtfcity.Text;
lblfStates.Text = ddlstates.SelectedItem.ToString();
lblfZip.Text = txtfzip.Text;
//lblsitus.Text = rblsitus.SelectedItem.ToString();
lblcitylist.Text = citylist.Text;
lblTotalPrev.Text = lblTotal.Text;
//If Address is different
if (same_as_Payeraddr.Checked == true)
{
chksameAddr.Checked = true;
lblfullName.Text = txtfullname.Text;
lblAddress.Text = txtaddress.Text;
lblCity.Text = txtcity.Text;
lblStates.Text = ddlfillstates.SelectedItem.ToString();
lblZip.Text = txtzip.Text;
}
else
{
chksameAddr.Checked = false;
lblfullName.Text = "";
lblAddress.Text = "";
lblCity.Text = "";
lblStates.Text = "";
lblfZip.Text = "";
}
lblTotalPrev.Text = hfvalue.Value;
if (ViewState["TempData"] != null)
{
dtAirInfoTable = (DataTable)ViewState["TempData"];
}
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
//Initialize datatable.
DataTable ctable = ViewState["CurrentTable"] as DataTable;
//Lets start looping through the second datatable for aircraft schedule info. .
if (ctable.Rows.Count > 0)
{
for (int i = 1; i <= Repeater2.Items.Count; i++)
{
lblAircraftCity.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCity")).Text;
lblAircraftcnty.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftcnty")).Text;
lAblircraftstate.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("aircraftstate")).SelectedItem.Text;
lblARegNo.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aRegNo")).Text;
lblAMake.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aMake")).Text;
lblAModelNo.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aModelNo")).Text;
lblAYRBuilt.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aYRBuilt")).Text;
lblASN.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aSN")).Text;
lblDatePurchased.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtdatePurchased")).Text;
lblPurchType.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblPurchaseType")).SelectedValue;
lblFNamePrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtPrevOnwerName")).Text;
lblAddrPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevAddr")).Text;
lblCityPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevCity")).Text;
Label1.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("ddlPrevState")).SelectedItem.Text;
lblZipPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevzip")).Text;
lblPurchOnwer.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyername")).Text;
lblPurcAddr.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyeraddress")).Text;
lblPurcCity.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyercity")).Text;
Label4.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("lblbuyerstate")).SelectedItem.Text;
lblPurcZip.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyerzip")).Text;
lblDdatesold.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtdatesold")).Text;
lblSalePrice.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtsalePrice")).Text;
lblDescription.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtDescription")).Text;
lblavionics.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtavionics")).Text;
Label3.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblIssues")).SelectedValue;
lblfunctionalIsses.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("functionalIsses")).Text;
lblAircraftCost.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCost")).Text;
lblHrsBtwnTBO.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("hrsBtwnTBO")).Text;
lblHrsOverhaul.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("hrsOverhaul")).Text;
lblOverhaul.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rbllastOverHaul")).SelectedValue;
lblTotOnAirFrm.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("TotOnAirFrm")).Text;
}
}
}
}
}