<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server"> <style type="text/css"> .style5 { width: 143px; } .style10 { width: 219px; } .style12 { width: 316px; } .style13 { width: 255px; } .style14 { width: 250px; } .style15 { width: 66%; } .style17 { width: 100%; } .style49 { text-align: center; } .style50 { width: 255px; height: 17px; } .style51 { width: 316px; height: 17px; } .style52 { height: 17px; } .style54 { width: 101px; } .style57 { font-family: "Helvetica Neue" , "Lucida Grande" , "Segoe UI" , Arial, Helvetica, Verdana, sans-serif; } .style68 { width: 68px; } .style70 { width: 128px; } .style72 { width: 88px; } .style73 { width: 96px; } </style> <script type="text/javascript"> function ValidateSearchFields(source, args) { var varAccountID = document.getElementById('<%= txtBoxAccountID.ClientID %>'); var varLastName = document.getElementById('<%= txtBoxLastName.ClientID %>'); var varFirstName = document.getElementById('<%= txtBoxFirstName.ClientID %>'); var varTelephone = document.getElementById('<%= txtBoxTelephone.ClientID %>'); if ((varLastName.value != '') || (varFirstName.value != '')) { args.IsValid = true; } else if (varAccountID.value != '') { args.IsValid = true; } else if (varTelephone.value != '') { args.IsValid = true; } else { args.IsValid = false; } } function ValidateChequeNumber(source2, args2) { var varChequeAmount = document.getElementById('<%= txtBoxAmountPaidByCheque.ClientID %>'); var varChequeNumber = document.getElementById('<%= txtBoxChequeNumber.ClientID %>'); if ((varChequeAmount.value != 0) && (varChequeNumber.value == '')) { args2.IsValid = false; } else { args2.IsValid = true; } } function ValidateTotalAmountPaid(source3, args3) { var varCashAmount = document.getElementById('<%= txtBoxAmountPaidByCash.ClientID %>'); var varChequeAmount = document.getElementById('<%= txtBoxAmountPaidByCheque.ClientID %>'); var temp = document.getElementById('<%= lblAmountDue.ClientID %>'); var varAmountDue = temp.innerHTML.toString(); var varTotalCollected; var varMsg; if ((Number(varChequeAmount.value) + Number(varCashAmount.value)) == 0) { args3.IsValid = false; } else if (Number(varChequeAmount.value) < 0) { args3.IsValid = false; } else if (Number(varCashAmount.value) < 0) { args3.IsValid = false; } else if ((Number(varChequeAmount.value) + Number(varCashAmount.value)) < Number(varAmountDue)) { varTotalCollected = Number(varChequeAmount.value) + Number(varCashAmount.value); varMsg = "WARNING !!!\n\nRenewal amount collected ($" + varTotalCollected + ") is LESS THAN the amount due ($" + varAmountDue + ").\n\nAre you sure you want to continue with the renewal ?"; if (!confirm(varMsg)) { args3.IsValid = false; } else { args3.IsValid = true; } } else if ((Number(varChequeAmount.value) + Number(varCashAmount.value)) > Number(varAmountDue)) { varTotalCollected = Number(varChequeAmount.value) + Number(varCashAmount.value); varMsg = "WARNING !!!\n\nRenewal amount collected ($" + varTotalCollected + ") is GREATER THAN the amount due ($" + varAmountDue + ").\n\nAre you sure you want to continue with the renewal ?"; if (!confirm(varMsg)) { args3.IsValid = false; } else { args3.IsValid = true; } } else { args3.IsValid = true; } } function ValidateRenewalYear(source4, args4) { var varPreviousRenewalYear = document.getElementById('<%= lblPreviousRenewalYear.ClientID %>'); var varRenewalYear = document.getElementById('<%= lblRenewalYear.ClientID %>'); if ( Number(varPreviousRenewalYear.value) == Number(varRenewalYear.value) ) { args4.IsValid = false; } else { args4.IsValid = true; } } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div style="float:left; width:"50%"> <h2> Account Search</h2> <p> Please enter at least one search criteria.</p> <%-- <asp:Panel ID="Panel1" runat="server" GroupingText="Account Search Criteria" Width="270px" DefaultButton="btnSearch">--%> <table class="style14"> <tr> <td class="style5"> Last Name: </td> <td class="style10" colspan="2"> <asp:TextBox ID="txtBoxLastName" runat="server" AutoCompleteType="Disabled" Width="150px" Height="18px" TabIndex="1" CssClass="eitField"></asp:TextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Please enter at least one search criteria." OnServerValidate="CustomValidator1_ServerValidate" ClientValidationFunction="ValidateSearchFields" Display="Dynamic" ValidationGroup="SearchCriteria" Font-Bold="True" ForeColor="Red">*</asp:CustomValidator> </td> </tr> <tr> <td class="style5"> First Name: </td> <td class="style10" colspan="2"> <asp:TextBox ID="txtBoxFirstName" runat="server" AutoCompleteType="Disabled" Width="150px" Height="18px" TabIndex="2" CssClass="eitField"></asp:TextBox> </td> </tr> <tr> <td class="style5"> Jamatkhana: </td> <td class="style10" colspan="2"> <asp:DropDownList ID="ddlJamatkhana" runat="server" AppendDataBoundItems="True" DataSourceID="adsJK" DataTextField="JKName" DataValueField="JKID" Width="155px" Height="20px" TabIndex="3" CssClass="eitField"> <asp:ListItem Value="0">- Select Jamatkhana -</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td class="style5"> Telephone: </td> <td class="style10" colspan="2"> <asp:TextBox ID="txtBoxTelephone" runat="server" Width="150px" AutoCompleteType="Disabled" Height="18px" TabIndex="4" CssClass="eitField"></asp:TextBox> </td> </tr> <tr> <td class="style5"> Account ID: </td> <td class="style10" colspan="2"> <asp:TextBox ID="txtBoxAccountID" runat="server" AutoCompleteType="Disabled" Width="150px" Height="18px" TabIndex="5" CssClass="eitField"></asp:TextBox> </td> </tr> <tr> <td class="style5"> </td> <td class="style54"> <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="Search" Width="65px" TabIndex="6" CssClass="eitField" /> </td> <td class="style10" align="center"> <asp:Button ID="btnClear" runat="server" Text="Clear" Width="65px" OnClick="btnClear_Click" TabIndex="7" CssClass="eitField" /> </td> </tr> <tr> <td colspan="3"> <asp:ValidationSummary ID="ValidationSummary2" runat="server" CssClass="failureNotification" ValidationGroup="SearchCriteria" /> </td> </tr> </table> <%-- </asp:Panel>--%> </div> <div style="float:left; width:"100%"> <table class="style15"> <tr> <td> <h2> Account Search Results:</h2> </td> <td> </td> </tr> <tr> <td> <asp:GridView ID="gvAccountSearch" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="AccountID" DataSourceID="adsAccountSearch" ForeColor="#333333" GridLines="None" EmptyDataText="No accounts matching your search criteria were found." SelectedIndex="0" OnPageIndexChanging="gvAccountSearch_PageIndexChanging" Width="680px" onselectedindexchanged="gvAccountSearch_SelectedIndexChanged" PageSize="6" TabIndex="8"> <AlternatingRowStyle BackColor="#FFFFDD" ForeColor="#284775" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="AccountID" HeaderText="ID" InsertVisible="False" SortExpression="AccountID" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="MemberLastName" HeaderText="Last" SortExpression="MemberLastName" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="MemberMiddleName" HeaderText="Middle" SortExpression="MemberFirstName" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="MemberFirstName" HeaderText="First" SortExpression="MemberFirstName" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="AccountRenewalYear" HeaderText="Renewal Year" SortExpression="Renewal Year" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="JKName" HeaderText="JK" SortExpression="JKName" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> <asp:CheckBoxField DataField="MemberPrimary" HeaderText="Primary" SortExpression="MemberPrimary" ItemStyle-HorizontalAlign="Center"> <ItemStyle HorizontalAlign="Center"></ItemStyle> </asp:CheckBoxField> <asp:BoundField DataField="AccountStatus" HeaderText="Account Status" SortExpression="AccountStatus" HeaderStyle-HorizontalAlign="Left"> <HeaderStyle HorizontalAlign="Left"></HeaderStyle> </asp:BoundField> </Columns> <EditRowStyle BackColor="#DDDDDD" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerSettings PageButtonCount="5" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#E9E7E2" /> <SortedAscendingHeaderStyle BackColor="#506C8C" /> <SortedDescendingCellStyle BackColor="#FFFDF8" /> <SortedDescendingHeaderStyle BackColor="#6F8DAE" /> </asp:GridView> </td> <td> </td> </tr> </table> </div> <div style="clear:both; width:"100%"> <table style="width: 66%;"> <tr> <td class="style13" valign="top"> <asp:DetailsView ID="dvAccountDetails" runat="server" Width="320px" AutoGenerateRows="False" CellPadding="4" DataKeyNames="AccountID" DataSourceID="adsAccount" ForeColor="#333333" GridLines="Horizontal" HorizontalAlign="Left" AutoGenerateEditButton="False" HeaderText="Account Details:" OnItemUpdating="dvAccountDetails_ItemUpdating" onitemcommand="dvAccountDetails_ItemCommand" ondatabound="dvAccountDetails_DataBound" TabIndex="9"> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" /> <EditRowStyle BackColor="#DDDDDD" Wrap="False" /> <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" /> <Fields> <asp:BoundField DataField="AccountID" HeaderText="Account ID:" InsertVisible="False" SortExpression="AccountID" ReadOnly="True" HeaderStyle-Width="100px" > <HeaderStyle Width="90px"></HeaderStyle> </asp:BoundField> <asp:BoundField DataField="AccountStatus" SortExpression="AccountStatus" HeaderText="Account Status:" ReadOnly="True" > <HeaderStyle Width="90px" /> </asp:BoundField> <asp:BoundField DataField="AccountRenewalYear" HeaderText="Renewal Year:" SortExpression="AccountRenewalYear" ReadOnly="True" > <HeaderStyle Width="90px" /> </asp:BoundField> <asp:BoundField DataField="JKName" HeaderText="Jamatkhana:" SortExpression="JKName" ReadOnly="True" > <HeaderStyle Width="90px" /> </asp:BoundField> <asp:BoundField DataField="AccountCityID" Visible="false" HeaderText="CityID:" ReadOnly="True" /> <asp:BoundField DataField="AccountProvinceID" HeaderText="ProvinceID:" SortExpression="AccountProvinceID" Visible="False" /> <asp:TemplateField HeaderText="Address:" SortExpression="AccountStreetAddress"> <EditItemTemplate> <asp:TextBox ID="eitStreetAddress" runat="server" Text='<%# Bind("AccountStreetAddress") %>' Width="250px" CssClass="eitField"></asp:TextBox> <asp:RequiredFieldValidator ID="StreetAddressValidator" runat="server" ErrorMessage="Street Address is required." ControlToValidate="eitStreetAddress" Display="Dynamic" ToolTip="Street Address is required." Text="*" CssClass="failureNotification"></asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("AccountStreetAddress") %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="90px" /> </asp:TemplateField> <asp:TemplateField SortExpression="CityName"> <EditItemTemplate> <asp:DropDownList ID="ddlCities" runat="server" DataSourceID="adsCities" CssClass="eitField" DataTextField="CityName" DataValueField="CityID" Width="200px" SelectedValue='<%# Bind("AccountCityID") %>'> </asp:DropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("CityName") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField SortExpression="ProvinceAbbreviation"> <EditItemTemplate> <asp:DropDownList ID="ddlProvinces" runat="server" DataSourceID="adsProvinces" CssClass="eitField" DataTextField="ProvinceAbbreviation" DataValueField="ProvinceID" Width="105px" SelectedValue='<%# Bind("AccountProvinceID") %>'> </asp:DropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label3" runat="server" Text='<%# Bind("ProvinceAbbreviation") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField SortExpression="AccountPostalCode"> <EditItemTemplate> <asp:TextBox ID="eitPostalCode" runat="server" Text='<%# Bind("AccountPostalCode") %>' Width="100px" CssClass="eitField"></asp:TextBox> <asp:RequiredFieldValidator ID="PostalCodeValidator" runat="server" ErrorMessage="Postal Code is required." Display="Dynamic" ControlToValidate="eitPostalCode" ToolTip="Postal Code is required." Text="*" CssClass="failureNotification">*</asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegexPostalCodeValidator" runat="server" ErrorMessage="Postal Code format is V6V6V6 (no spaces or hyphens)." Display="Dynamic" ControlToValidate="eitPostalCode" CssClass="failureNotification" ValidationExpression="(^([0-9]{5})$)|(^[abceghj-nprstvxyABCEGHJ-NPRSTVXY]{1}\d{1}[abceghj-nprstv-zABCEGHJ-NPRSTV-Z]{1}\d{1}[abceghj-nprstv-zABCEGHJ-NPRSTV-Z]{1}\d{1}$)" Text="*"></asp:RegularExpressionValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label4" runat="server" Text='<%# FormatPostalCode ( Eval("AccountPostalCode"), Eval("AccountProvinceID") ) %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Phone Number:" SortExpression="AccountPhoneNumber"> <EditItemTemplate> <asp:TextBox ID="eitPhoneNumber" runat="server" Text='<%# Bind("AccountPhoneNumber") %>' Width="100px" CssClass="eitField"></asp:TextBox> <asp:RequiredFieldValidator ID="PhoneNumberValidator" runat="server" ErrorMessage="Phone number is required." ControlToValidate="eitPhoneNumber" Display="Dynamic" ToolTip="Phone number is required." Text="*" CssClass="failureNotification">*</asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegexPhoneNumberValidator" runat="server" ErrorMessage="Telephone number format is 10 numeric digits only (no spaces, parentheses or hyphens)." Display="Dynamic" ControlToValidate="eitPhoneNumber" CssClass="failureNotification" ValidationExpression="^\d{10}$" Text="*"></asp:RegularExpressionValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# FormatPhoneNumber( Eval("AccountPhoneNumber") ) %>'></asp:Label> </ItemTemplate> <HeaderStyle Width="90px" /> </asp:TemplateField> <asp:BoundField DataField="AccountUpdateDate" HeaderText="UpdateDate:" SortExpression="AccountUpdateDate" Visible="False" /> </Fields> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> </asp:DetailsView> </td> <td valign="top" class="style12"> <asp:GridView ID="gvAccountMembers" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="adsMembers" ForeColor="#333333" GridLines="Horizontal" Width="420px" AutoGenerateEditButton="False" onrowupdating="gvAccountMembers_RowUpdating" onrowdatabound="gvAccountMembers_RowDataBound" onrowediting="gvAccountMembers_RowEditing" ondatabound="gvAccountMembers_DataBound" TabIndex="10"> <AlternatingRowStyle BackColor="#FFFFDD" ForeColor="#284775" /> <Columns> <asp:BoundField DataField="AccountID" HeaderText="Account ID" SortExpression="AccountID" ReadOnly="True" Visible="False" /> <asp:BoundField DataField="MemberID" HeaderText="Member ID" InsertVisible="False" SortExpression="MemberID" ReadOnly="True" Visible="false" /> <asp:TemplateField HeaderText="Last" SortExpression="MemberLastName"> <EditItemTemplate> <asp:TextBox ID="eitMemberLastName" runat="server" Text='<%# Bind("MemberLastName") %>' CssClass="eitField" Width="60px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidationMemberLastName" runat="server" ErrorMessage="Last name of the member is required." ControlToValidate="eitMemberLastName" Display="Dynamic" ToolTip="Last name of the member is required." Text="*" CssClass="failureNotification"></asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Width="60px" Text='<%# Bind("MemberLastName") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" /> </asp:TemplateField> <asp:TemplateField HeaderText="Middle" SortExpression="MemberMiddleName"> <EditItemTemplate> <asp:TextBox ID="eitMemberMiddleName" runat="server" CssClass="eitField" Text='<%# Bind("MemberMiddleName") %>' Width="60px"></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Width="60px" Text='<%# Bind("MemberMiddleName") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" /> </asp:TemplateField> <asp:TemplateField HeaderText="First" SortExpression="MemberFirstName"> <EditItemTemplate> <asp:TextBox ID="eitMemberFirstName" runat="server" CssClass="eitField" Text='<%# Bind("MemberFirstName") %>' Width="60px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidationMemberFirstName" runat="server" ErrorMessage="First name of the member is required." ControlToValidate="eitMemberFirstName" Display="Dynamic" ToolTip="First name of the member is required." Text="*" CssClass="failureNotification"></asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label3" runat="server" Width="60px" Text='<%# Bind("MemberFirstName") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" /> </asp:TemplateField> <asp:TemplateField HeaderText="Birth" SortExpression="MemberBirthYear"> <EditItemTemplate> <asp:TextBox ID="eitMemberBirthYear" runat="server" CssClass="eitField" Text='<%# Bind("MemberBirthYear") %>' Width="30px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidationMemberBirthYear" runat="server" ErrorMessage="Birth year of the member is required." ControlToValidate="eitMemberBirthYear" Display="Dynamic" ToolTip="Birth year of the member is required." Text="*" CssClass="failureNotification"></asp:RequiredFieldValidator> <asp:RangeValidator ID="RangeValidatorMemberBirthYear" runat="server" ErrorMessage="Birth Year ranges from 1900 to current year." CssClass="failureNotification" Display="Dynamic" MinimumValue='<%# DateTime.Now.Year - 120 %>' Type="Integer" Text="*" MaximumValue='<%# DateTime.Now.Year %>' ControlToValidate="eitMemberBirthYear"></asp:RangeValidator> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label4" runat="server" Width="30px" Text='<%# Bind("MemberBirthYear") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" /> <ItemStyle Width="30px" /> </asp:TemplateField> <asp:BoundField DataField="GenderAbbreviation" HeaderText="Gender" SortExpression="GenderAbbreviation" ReadOnly="True"> <HeaderStyle HorizontalAlign="Left" /> <ItemStyle Width="25px" /> </asp:BoundField> <asp:CheckBoxField DataField="MemberPrimary" HeaderText="Primary" SortExpression="MemberPrimary" ReadOnly="True"> <ItemStyle HorizontalAlign="Center" Width="30px" /> </asp:CheckBoxField> <asp:BoundField DataField="RelationName" HeaderText="Relationship" SortExpression="RelationName" ReadOnly="True"> <HeaderStyle HorizontalAlign="Left" /> </asp:BoundField> </Columns> <EditRowStyle BackColor="#DDDDDD" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#E9E7E2" /> <SortedAscendingHeaderStyle BackColor="#506C8C" /> <SortedDescendingCellStyle BackColor="#FFFDF8" /> <SortedDescendingHeaderStyle BackColor="#6F8DAE" /> </asp:GridView> </td> <td valign="top"> <asp:Panel ID="pnlRenewal" runat="server" Width="324px" Visible="False" CssClass="style57"> <table class="style17" frame="border" border="1" bgcolor="#FFFFD5"> <tr> <td class="style70" colspan="2"> <span class="bold">RENEWAL:</span> </td> <td class="style68"> <asp:Label ID="lblRenewalYear" runat="server" Font-Bold="True">1996</asp:Label> </td> </tr> <tr> <td class="style70" colspan="2"> Previous Renewal Year: </td> <td class="style68"> <asp:Label ID="lblPreviousRenewalYear" runat="server">1900</asp:Label> <asp:CustomValidator ID="CustomValidatorRenewalYear" runat="server" CssClass="failureNotification" Display="Dynamic" ErrorMessage="This account has already been renewed." ValidationGroup="RenewalValidationGroup" ClientValidationFunction="ValidateRenewalYear" onservervalidate="CustomValidatorRenewalYear_ServerValidate">*</asp:CustomValidator> </td> </tr> <tr> <td class="style70" colspan="2"> Category: </td> <td class="style68"> <asp:Label ID="lblCategory" runat="server"></asp:Label> </td> </tr> <tr> <td class="style70" colspan="2"> Amount Due: </td> <td class="style68"> <asp:Label ID="lblAmountDue" runat="server"></asp:Label> </td> </tr> <tr> <td colspan="3"> <span class="bold">PAYMENT:</span> </td> </tr> <%-- <tr> <td colspan="3"> </td> </tr>--%> <tr> <td class="style73"> <asp:RadioButton ID="rbCash" runat="server" GroupName="gnPaymentType" Text="Cash" TabIndex="11" AutoPostBack="True" oncheckedchanged="rbCash_CheckedChanged" /> </td> <td class="style72"> Cash Amount:</td> <td class="style68"> <asp:TextBox ID="txtBoxAmountPaidByCash" runat="server" Width="50px" AutoCompleteType="Disabled" TabIndex="14" CssClass="eitField"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBoxAmountPaidByCash" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Amount is required. Enter 0 for full payment by cheque." ValidationGroup="RenewalValidationGroup" SetFocusOnError="True">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style73"> <asp:RadioButton ID="rbCheque" runat="server" GroupName="gnPaymentType" Text="Cheque" TabIndex="12" AutoPostBack="True" oncheckedchanged="rbCheque_CheckedChanged" /> </td> <td class="style72"> Cheque Amount:</td> <td class="style68"> <asp:TextBox ID="txtBoxAmountPaidByCheque" runat="server" Width="50px" AutoCompleteType="Disabled" TabIndex="15" CssClass="eitField"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtBoxAmountPaidByCheque" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Amount is required. Enter 0 for full payment by cash." ValidationGroup="RenewalValidationGroup" SetFocusOnError="True">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style73"> <asp:RadioButton ID="rbCashCheque" runat="server" GroupName="gnPaymentType" Text="Cash/Cheque" TabIndex="13" AutoPostBack="True" oncheckedchanged="rbCashCheque_CheckedChanged" /> </td> <td class="style72"> Cheque number:</td> <td class="style68"> <asp:TextBox ID="txtBoxChequeNumber" runat="server" Width="50px" AutoCompleteType="Disabled" TabIndex="16" CssClass="eitField"></asp:TextBox> <asp:CustomValidator ID="CustomChequeNumberValidator" runat="server" CssClass="failureNotification" ErrorMessage="Cheque number is required if payment is done by cheque." OnServerValidate="ChequeNumberCustomValidator_ServerValidate" ValidationGroup="RenewalValidationGroup" ClientValidationFunction="ValidateChequeNumber" Display="Dynamic">*</asp:CustomValidator> </td> </tr> <tr> <td class="style70" colspan="2"> <span class="bold">COMMENTS:</span></td> <td class="style68"> </td> </tr> <tr> <td colspan="3"> <asp:TextBox ID="txtboxBatchDetailsComments" runat="server" AutoCompleteType="Disabled" CssClass="style57" Height="36px" TextMode="MultiLine" Width="310px"></asp:TextBox> <asp:TextBoxWatermarkExtender ID="txtboxBatchDetailsComments_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtboxBatchDetailsComments" WatermarkCssClass="watermarked" WatermarkText="Enter Account Renewal comment (optional)."> </asp:TextBoxWatermarkExtender> </td> </tr> <tr> <td class="style49" colspan="3" align="center"> <asp:Button ID="btnAddToCart" runat="server" Text="Add to Batch Cart" ValidationGroup="RenewalValidationGroup" OnClick="btnAddToCart_Click" CssClass="style57" Width="126px" TabIndex="17" /> <asp:CustomValidator ID="CustomValidatorTotalAmount" runat="server" ClientValidationFunction="ValidateTotalAmountPaid" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Either total renewal amount is less than 0, equal to 0, or user cancelled the Add to Cart operation." OnServerValidate="TotalAmountCustomValidator_ServerValidate" ValidationGroup="RenewalValidationGroup">*</asp:CustomValidator> </td> </tr> </table> </asp:Panel> </td> </tr> <tr> <td class="style13" valign="top"> <asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="failureNotification" HeaderText="Validation Errors:" Width="316px" /> </td> <td valign="top" class="style12"> <asp:Label ID="lblError" runat="server" CssClass="failureNotification"></asp:Label> </td> <td valign="top"> <asp:ValidationSummary ID="ValidationSummary3" runat="server" CssClass="failureNotification" HeaderText="Renewal Validation Errors:" ValidationGroup="RenewalValidationGroup" Width="450px" /> </td> </tr> <tr> <td class="style50" valign="top"> </td> <td valign="top" class="style51"> </td> <td valign="top" class="style52"> </td> </tr> <tr> <td class="style50" valign="top"> </td> <td valign="top" class="style51"> </td> <td valign="top" class="style52"> </td> </tr> <tr> <td class="style50" valign="top"> </td> <td valign="top" class="style51"> </td> <td valign="top" class="style52"> </td> </tr> </table> <br /> <br /> <br /> </div> <div> <br /> <br /> </div> <asp:AccessDataSource ID="adsJK" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [JKID], [JKName] FROM [Jamatkhana]"></asp:AccessDataSource> <asp:AccessDataSource ID="adsAccountSearch" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT Accounts.AccountID, Members.MemberLastName, Members.MemberMiddleName, Members.MemberFirstName, Accounts.AccountRenewalYear, AccountStatus.AccountStatus, Members.MemberPrimary, Jamatkhana.JKName FROM ((((Accounts INNER JOIN AccountStatus ON Accounts.AccountStatusID = AccountStatus.AccountStatusID) INNER JOIN Members ON Accounts.AccountID = Members.AccountID) INNER JOIN MemberStatus ON Members.MemberStatusID = MemberStatus.MemberStatusID) INNER JOIN Jamatkhana ON Accounts.AccountJamatkhanaID = Jamatkhana.JKID) WHERE (@TempLastName IS NULL OR Members.MemberLastName LIKE '%' + @TempLastName + '%') AND (@TempFirstName IS NULL OR Members.MemberFirstName LIKE '%' + @TempFirstName + '%') AND (@TempJamatkhanaID = 0 OR Accounts.AccountJamatkhanaID = @TempJamatkhanaID) AND (@TempAccountID IS NULL OR Accounts.AccountID LIKE '%' + @TempAccountID + '%') AND (@TempPhoneNumber IS NULL OR Accounts.AccountPhoneNumber LIKE '%' + @TempPhoneNumber + '%') AND (Accounts.AccountStatusID = 1) AND (Members.MemberStatusID = 1) ORDER BY Accounts.AccountID" CancelSelectOnNullParameter="False" onselecting="adsAccountSearch_Selecting"> <SelectParameters> <asp:ControlParameter ControlID="txtBoxLastName" Name="@TempLastName" Type="String" /> <asp:ControlParameter ControlID="txtBoxFirstName" Name="@TempFirstName" Type="String" /> <asp:ControlParameter ControlID="ddlJamatkhana" Name="@TempJamatkhanaID" Type="Int32" /> <asp:ControlParameter ControlID="txtBoxAccountID" Name="@TempAccountID" Type="String" /> <asp:ControlParameter ControlID="txtBoxTelephone" Name="@TempPhoneNumber" Type="String" /> </SelectParameters> </asp:AccessDataSource> <asp:AccessDataSource ID="adsAccount" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT Accounts.AccountID, Accounts.AccountRenewalYear, Accounts.AccountPhoneNumber, Accounts.AccountStreetAddress, Accounts.AccountCityID, Accounts.AccountProvinceID, Accounts.AccountPostalCode, Accounts.AccountUpdateDate , AccountStatus.AccountStatus, Jamatkhana.JKName, City.CityName, Province.ProvinceAbbreviation FROM ((((Accounts INNER JOIN AccountStatus ON Accounts.AccountStatusID = AccountStatus.AccountStatusID) INNER JOIN Jamatkhana ON Accounts.AccountJamatkhanaID = Jamatkhana.JKID) INNER JOIN City ON Accounts.AccountCityID = City.CityID) INNER JOIN Province ON Accounts.AccountProvinceID = Province.ProvinceID) WHERE (Accounts.AccountID = ?)" ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE Accounts SET AccountStreetAddress = ?, AccountCityID = ?, AccountProvinceID = ?, AccountPostalCode = ?, AccountPhoneNumber = ?, AccountUpdateDate = ? WHERE (AccountID = original_AccountID) AND (AccountStreetAddress = original_AccountStreetAddress) AND (AccountCityID = original_AccountCityID) AND (AccountProvinceID = original_AccountProvinceID) AND (AccountPostalCode = original_AccountPostalCode) AND (AccountPhoneNumber = original_AccountPhoneNumber)" onupdated="adsAccount_Updated"> <SelectParameters> <asp:ControlParameter ControlID="gvAccountSearch" Name="AccountID" PropertyName="SelectedValue" Type="Int32" DefaultValue="0" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="AccountStreetAddress" Type="String" /> <asp:Parameter Name="AccountCityID" Type="Int32" /> <asp:Parameter Name="AccountProvinceID" Type="Int32" /> <asp:Parameter Name="AccountPostalCode" Type="String" /> <asp:Parameter Name="AccountPhoneNumber" Type="String" /> <asp:Parameter Name="AccountUpdateDate" Type="Object" /> <asp:Parameter Name="AccountID" Type="Int32" /> <asp:Parameter Name="original_AccountID" Type="Int32" /> <asp:Parameter Name="original_AccountStreetAddress" Type="String" /> <asp:Parameter Name="original_AccountCityID" Type="Int32" /> <asp:Parameter Name="original_AccountProvinceID" Type="Int32" /> <asp:Parameter Name="original_AccountPostalCode" Type="String" /> <asp:Parameter Name="original_AccountPhoneNumber" Type="String" /> </UpdateParameters> </asp:AccessDataSource> <asp:AccessDataSource ID="adsMembers" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT Members.MemberLastName, Members.MemberMiddleName, Members.MemberFirstName, Members.MemberBirthYear, Members.AccountID, Members.MemberID, Gender.GenderAbbreviation, Members.MemberPrimary, Relation.RelationName FROM (((Members INNER JOIN MemberStatus ON Members.MemberStatusID = MemberStatus.MemberStatusID) INNER JOIN Gender ON Members.MemberGenderID = Gender.GenderID) INNER JOIN Relation ON Members.MemberRelationID = Relation.RelationID) WHERE (Members.AccountID = ?) AND (Members.MemberStatusID = 1) ORDER BY Members.MemberPrimary, Members.MemberBirthYear" UpdateCommand="UPDATE Members SET MemberLastName = ?, MemberMiddleName = ?, MemberFirstName = ?, MemberBirthYear = ? WHERE (MemberLastName = original_MemberLastName) AND (MemberFirstName = original_MemberFirstName) AND (MemberBirthYear = original_MemberBirthYear)" ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}" OnUpdated="adsMembers_Updated" > <SelectParameters> <asp:ControlParameter ControlID="gvAccountSearch" Name="AccountID" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="MemberLastName" Type="String" /> <asp:Parameter Name="MemberMiddleName" Type="String" /> <asp:Parameter Name="MemberFirstName" Type="String" /> <asp:Parameter Name="MemberBirthYear" Type="Int32" /> <asp:Parameter Name="original_MemberLastName" Type="String" /> <asp:Parameter Name="original_MemberFirstName" Type="String" /> <asp:Parameter Name="original_MemberBirthYear" Type="Int32" /> </UpdateParameters> </asp:AccessDataSource> <asp:AccessDataSource ID="adsCities" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [CityID], [CityName] FROM [City]"></asp:AccessDataSource> <asp:AccessDataSource ID="adsProvinces" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [ProvinceID], [ProvinceAbbreviation] FROM [Province] ORDER BY [ProvinceID]"> </asp:AccessDataSource> </ContentTemplate> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="200" AssociatedUpdatePanelID="UpdatePanel1"> <ProgressTemplate> <div class="PleaseWait"> Please wait ... </div> </ProgressTemplate> </asp:UpdateProgress> </asp:Content>