<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="NewAccount.aspx.cs" Inherits="NewAccount" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server"> <style type="text/css"> .style1 { width: 100%; } .style2 { height: 17px; } .style3 { width: 82px; } .style5 { width: 82px; height: 26px; } .style6 { width: 8px; height: 26px; } .style7 { height: 26px; } .style8 { width: 8px; } .style11 { width: 31px; } .style13 { width: 395px; } .style14 { width: 93px; } .style15 { width: 78px; } </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <h2>New Account</h2> <br /> <asp:MultiView ID="mvNewAccount" runat="server" ActiveViewIndex="0"> <asp:View ID="vJKAddressDetails" runat="server"> <asp:Panel ID="pnlAddress" runat="server" GroupingText="Jamatkhana & Address Details:" Height="349px" Width="586px"> <table class="style1"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblJamatkhana" runat="server" AssociatedControlID="ddlJamatkhana" CssClass="requiredField" Text="Jamatkhana:"> </asp:Label> </td> <td> </td> <td> <asp:DropDownList ID="ddlJamatkhana" runat="server" AppendDataBoundItems="True" DataSourceID="adsJK" DataTextField="JKName" DataValueField="JKID" Height="20px" TabIndex="1" Width="225px"> <asp:ListItem Value="0">- Select Jamatkhana -</asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidatorJK" runat="server" ControlToValidate="ddlJamatkhana" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Jamatkhana selection is required." InitialValue="0" ValidationGroup="AddressDetailsJKValidationGroup">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblStreetAddress" runat="server" Text="Address:" AssociatedControlID="txtboxStreetAddress"></asp:Label> </td> <td> </td> <td> <asp:TextBox ID="txtboxStreetAddress" runat="server" Width="415px" TabIndex="2" AutoCompleteType="Disabled"></asp:TextBox> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblCity" runat="server" AssociatedControlID="ddlCity" Text="City:"></asp:Label> </td> <td> </td> <td> <asp:DropDownList ID="ddlCity" runat="server" AppendDataBoundItems="True" DataSourceID="adsCity" DataTextField="CityName" DataValueField="CityID" Width="225px" TabIndex="3"> <asp:ListItem Value="0">- Select City -</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblProvince" runat="server" AssociatedControlID="ddlProvince" Text="Province:"></asp:Label> </td> <td> </td> <td> <asp:DropDownList ID="ddlProvince" runat="server" DataSourceID="adsProvince" DataTextField="ProvinceName" DataValueField="ProvinceID" Width="225px" Height="20px" TabIndex="4" AppendDataBoundItems="True"> <asp:ListItem Value="0">- Select Province -</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td class="style2"> </td> <td class="style2"> </td> <td class="style2"> </td> </tr> <tr> <td class="style2"> <asp:Label ID="lblPostalCode" runat="server" Text="Postal Code:"></asp:Label></td> <td class="style2"> </td> <td class="style2"> <asp:TextBox ID="txtboxPostalCode" runat="server" AutoCompleteType="Disabled" Width="146px" TabIndex="5"></asp:TextBox> <asp:RegularExpressionValidator ID="RegexPostalCodeValidator" runat="server" ErrorMessage="Postal Code format is V6V6V6 (no spaces or hyphens)." Display="Dynamic" ControlToValidate="txtboxPostalCode" CssClass="failureNotification" ValidationGroup="AddressDetailsJKValidationGroup" 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> </td> </tr> <tr> <td class="style2"> </td> <td class="style2"> </td> <td class="style2"> </td> </tr> <tr> <td> <asp:Label ID="lblTelephone" runat="server" Text="Telephone:" AssociatedControlID="txtboxTelephone" CssClass="requiredField"></asp:Label> </td> <td> </td> <td> <asp:TextBox ID="txtboxTelephone" runat="server" AutoCompleteType="Disabled" Width="146px" TabIndex="6"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidatorTelephone" runat="server" ControlToValidate="txtboxTelephone" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Telephone number is required." ValidationGroup="AddressDetailsJKValidationGroup">*</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="txtboxTelephone" CssClass="failureNotification" ValidationExpression="^\d{10}$" Text="*" ValidationGroup="AddressDetailsJKValidationGroup"></asp:RegularExpressionValidator> </td> </tr> <tr> <td class="style2"> </td> <td class="style2"> </td> <td class="style2"> </td> </tr> <tr> <td> </td> <td> </td> <td> <asp:Button ID="btnView1Next" runat="server" CommandName="NextView" Text="Next" Width="71px" TabIndex="7" ValidationGroup="AddressDetailsJKValidationGroup" /> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> <asp:ValidationSummary ID="ValidationSummaryJKAddressDetails" runat="server" CssClass="failureNotification" ValidationGroup="AddressDetailsJKValidationGroup" /> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </asp:Panel> </asp:View> <asp:View ID="vPrimaryMemberDetails" runat="server"> <asp:Panel ID="pnlPrimary" runat="server" GroupingText="Primary Member Details:" Height="342px" Width="585px"> <table class="style1"> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Label ID="lblLastName" runat="server" Text="Last Name:" CssClass="requiredField"></asp:Label> </td> <td class="style8"> </td> <td> <asp:TextBox ID="txtboxLastName" runat="server" AutoCompleteType="Disabled" Width="283px" TabIndex="1"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidatorLastName" runat="server" ControlToValidate="txtboxLastName" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Last name of the primary member is required." ValidationGroup="PrimaryMemberValidationGroup">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Label ID="lblMiddleName" runat="server" Text="Middle Name:"></asp:Label> </td> <td class="style8"> </td> <td> <asp:TextBox ID="txtboxMiddleName" runat="server" Width="283px" TabIndex="2" AutoCompleteType="Disabled"></asp:TextBox> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Label ID="lblFirstName" runat="server" Text="First Name:" CssClass="requiredField"></asp:Label> </td> <td class="style8"> </td> <td> <asp:TextBox ID="txtboxFirstName" runat="server" Width="283px" TabIndex="3" AutoCompleteType="Disabled"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidatorFirstName" runat="server" ControlToValidate="txtboxFirstName" CssClass="failureNotification" Display="Dynamic" ErrorMessage="First name of the primary member is required." ValidationGroup="PrimaryMemberValidationGroup">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Label ID="lblJamatiTitle" runat="server" Text="Jamati Title:" CssClass="requiredField"></asp:Label> </td> <td class="style8"> </td> <td> <asp:DropDownList ID="ddlJamatiTitle" runat="server" AppendDataBoundItems="True" CssClass="eitField" DataSourceID="adsJamatiTitle" DataTextField="JMTitle" DataValueField="JMTitleID" Width="150px" > <asp:ListItem Value="0">- Select Title -</asp:ListItem> <asp:ListItem Value="15" Text="None" Selected="True"></asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidatorJamatiTitle" runat="server" ControlToValidate="ddlJamatiTitle" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Jamati Title of the primary member is required." ValidationGroup="PrimaryMemberValidationGroup" InitialValue="0">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style5"> <asp:Label ID="lblBirthYear" runat="server" Text="Birth Year:" CssClass="requiredField"></asp:Label> </td> <td class="style6"> </td> <td class="style7"> <asp:TextBox ID="txtboxBirthYear" runat="server" Width="120px" TabIndex="4" AutoCompleteType="Disabled"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidatorBirthYear" runat="server" ControlToValidate="txtboxBirthYear" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Birth year of the primary member is required." ValidationGroup="PrimaryMemberValidationGroup">*</asp:RequiredFieldValidator> <asp:RangeValidator ID="rangeValidatorBirthYear" 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="txtboxBirthYear" ValidationGroup="PrimaryMemberValidationGroup"></asp:RangeValidator> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Label ID="lblGender" runat="server" Text="Gender:" CssClass="requiredField"></asp:Label> </td> <td class="style8"> </td> <td> <asp:DropDownList ID="ddlGender" runat="server" AppendDataBoundItems="True" DataSourceID="adsGender" DataTextField="GenderName" DataValueField="GenderID" Width="125px" TabIndex="5"> <asp:ListItem Value="0">- Select Gender -</asp:ListItem> </asp:DropDownList> <asp:RequiredFieldValidator ID="RequiredFieldValidatorGender" runat="server" ControlToValidate="ddlGender" CssClass="failureNotification" Display="Dynamic" ErrorMessage="Gender of the primary member is required." ValidationGroup="PrimaryMemberValidationGroup" InitialValue="0">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> <asp:Button ID="btnView2Previous" runat="server" CommandName="PrevView" Text="Previous" TabIndex="6" /> </td> <td class="style8"> </td> <td> <asp:Button ID="btnView2Next" runat="server" Text="Next" Width="71px" TabIndex="7" ValidationGroup="PrimaryMemberValidationGroup" CommandName="NextView" /> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> </td> </tr> <tr> <td class="style3"> </td> <td class="style8"> </td> <td> <asp:ValidationSummary ID="ValidationSummaryPrimaryMember" runat="server" CssClass="failureNotification" ValidationGroup="PrimaryMemberValidationGroup" /> </td> </tr> </table> </asp:Panel> </asp:View> <asp:View ID="vDuplicate" runat="server"> <table class="style1"> <tr> <td> </td> <td colspan="3"> <asp:GridView ID="gvDuplicateAccounts" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataSourceID="adsDuplicateAccounts" EmptyDataText="Congratulations! No duplicate accounts were found matching your criteria. You may continue with the creation of the account." ForeColor="#333333" GridLines="None" Caption="Duplicate Accounts" CaptionAlign="Left"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="AccountID" HeaderText="Account ID" InsertVisible="False" SortExpression="AccountID" /> <asp:BoundField DataField="AccountStatus" HeaderText="Account Status" SortExpression="AccountStatus" /> <asp:BoundField DataField="MemberLastName" HeaderText="Last Name" SortExpression="MemberLastName" /> <asp:BoundField DataField="MemberMiddleName" HeaderText="Middle Name" SortExpression="MemberMiddleName" /> <asp:BoundField DataField="MemberFirstName" HeaderText="First Name" SortExpression="MemberFirstName" /> <asp:BoundField DataField="GenderAbbreviation" HeaderText="Gender" SortExpression="GenderAbbreviation" /> <asp:BoundField DataField="MemberBirthYear" HeaderText="Birth Year" SortExpression="MemberBirthYear" /> <asp:BoundField DataField="JKName" HeaderText="Jamatkhana" SortExpression="JKName" /> <asp:CheckBoxField DataField="MemberPrimary" HeaderText="Primary" SortExpression="MemberPrimary" /> <asp:BoundField DataField="AccountStreetAddress" HeaderText="Address" SortExpression="AccountStreetAddress" /> <asp:BoundField DataField="CityName" HeaderText="City" SortExpression="CityName" /> <asp:BoundField DataField="ProvinceAbbreviation" HeaderText="Province" SortExpression="ProvinceAbbreviation" /> <asp:BoundField DataField="AccountPostalCode" HeaderText="Postal Code" SortExpression="AccountPostalCode" /> <asp:BoundField DataField="AccountPhoneNumber" HeaderText="Phone Number" SortExpression="AccountPhoneNumber" /> <asp:BoundField DataField="MemberStatus" HeaderText="Member Status" SortExpression="MemberStatus" /> </Columns> <EditRowStyle BackColor="#2461BF" /> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#F5F7FB" /> <SortedAscendingHeaderStyle BackColor="#6D95E1" /> <SortedDescendingCellStyle BackColor="#E9EBEF" /> <SortedDescendingHeaderStyle BackColor="#4870BE" /> </asp:GridView> </td> </tr> <tr> <td> </td> <td colspan="3"> </td> </tr> </table> <table class="style13"> <tr> <td class="style15"> </td> <td class="style11"> </td> <td class="style14"> </td> </tr> <tr> <td class="style15"> <asp:Button ID="btnView3Next" runat="server" CommandName="NextView" onclick="btnView3Next_Click" Text="Create" Width="70px" /> </td> <td class="style11"> <asp:Button ID="btnView3Previous" runat="server" Text="Previous" CommandName="PrevView" Width="70px"/> </td> <td class="style14"> <asp:Button ID="btnCancel" runat="server" onclick="btnCancel_Click" Text="Cancel" Width="70px"/> </td> </tr> <tr> <td class="style15"> </td> <td class="style11"> </td> <td class="style14"> </td> </tr> </table> </asp:View> </asp:MultiView> <asp:AccessDataSource ID="adsJK" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [JKID], [JKName] FROM [Jamatkhana] ORDER BY [JKID]"></asp:AccessDataSource> <asp:AccessDataSource ID="adsCity" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [CityID], [CityName] FROM [City] ORDER BY [CityID]"></asp:AccessDataSource> <asp:AccessDataSource ID="adsProvince" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [ProvinceID], [ProvinceName] FROM [Province] ORDER BY [ProvinceID]"> </asp:AccessDataSource> <asp:AccessDataSource ID="adsGender" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT [GenderID], [GenderName] FROM [Gender] ORDER BY [GenderID]"> </asp:AccessDataSource> <asp:AccessDataSource ID="adsJamatiTitle" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT JMTitleID, JMTitle FROM JamatiTitle ORDER BY JMTitle"> </asp:AccessDataSource> <asp:AccessDataSource ID="adsDuplicateAccounts" runat="server" DataFile="~/App_Data/Burial.mdb" SelectCommand="SELECT Accounts.AccountID, Members.MemberLastName, Members.MemberMiddleName, Members.MemberFirstName, AccountStatus.AccountStatus, Members.MemberPrimary, Jamatkhana.JKName, Accounts.AccountStreetAddress, City.CityName, Province.ProvinceAbbreviation, Accounts.AccountPostalCode, Accounts.AccountPhoneNumber, Members.MemberBirthYear, MemberStatus.MemberStatus, Gender.GenderAbbreviation 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) INNER JOIN City ON Accounts.AccountCityID = City.CityID) INNER JOIN Province ON Accounts.AccountProvinceID = Province.ProvinceID) INNER JOIN Gender ON Members.MemberGenderID = Gender.GenderID) WHERE (Members.MemberLastName LIKE '%' + @LastName + '%') AND (Members.MemberFirstName LIKE '%' + @FirstName + '%') AND (Accounts.AccountPhoneNumber = @PhoneNumber) AND (Members.MemberBirthYear = @BirthYear) ORDER BY Accounts.AccountID"> <SelectParameters> <asp:ControlParameter ControlID="txtboxLastName" Name="@LastName" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="txtboxFirstName" Name="@FirstName" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="txtboxTelephone" Name="@PhoneNumber" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="txtboxBirthYear" Name="@BirthYear" PropertyName="Text" Type="String" /> </SelectParameters> </asp:AccessDataSource> </ContentTemplate> </asp:UpdatePanel> </asp:Content>