Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomerSearch.aspx.cs" Inherits="CustomerSearch" %>

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

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">


<asp:GridView ID="grdViewPopup" runat="server" CellPadding="3" Width="810px" ShowHeaderWhenEmpty="True"
AutoGenerateColumns="False" EmptyDataText="No Data!" Style="border: solid 1px #999999;"
BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px">
<columns> <asp:HyperLinkField DataNavigateUrlFields="CustomerID,ServiceAcNo"

Text="Select"

DataNavigateUrlFormatString="~/MemberTab.aspx?CustomerID={0}&ServiceAcNo={1}" />
<asp:BoundField DataField="CustomerID" HeaderText="CustomerAC">
<itemstyle width="100px">

<asp:BoundField DataField="ServiceAcNo" HeaderText="Service No">
<itemstyle width="100px">

<asp:BoundField DataField="CustomerName" HeaderText="Customer">
<itemstyle width="100px" height="30px" verticalalign="Middle">

<asp:BoundField DataField="NRC" HeaderText="NRC">
<itemstyle width="100px" height="20px">

<asp:BoundField DataField="Service_Plan" HeaderText="Service Plan" >
<itemstyle width="100px">

<footerstyle backcolor="White" forecolor="#000066">
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White"
Height="30px" />
<pagerstyle backcolor="White" forecolor="#000066" horizontalalign="Left">
<rowstyle forecolor="#000066">
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<sortedascendingcellstyle backcolor="#F1F1F1">
<sortedascendingheaderstyle backcolor="#007DBB">
<sorteddescendingcellstyle backcolor="#CAC9C9">
<sorteddescendingheaderstyle backcolor="#00547E">




<asp:Label ID="lblSearchCustomer" runat="server" Text="Search" Style="color: #006699;padding-right:3px;font-size:15px">
<asp:DropDownList ID="ddlSearchCustomer" runat="server" CssClass="ddl" Width="200px">
<asp:ListItem>Service Acnt No.
<asp:ListItem>Customer Acnt No.
<asp:ListItem>ID
<asp:ListItem>Name

<asp:TextBox ID="txtSearchCustomer" runat="server" class="textbox"
Width="170px">
<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click"
Text="Search" />




</form>
</body>
</html>

My code file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RLMemberDBModel;

public partial class CustomerSearch : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
RLMemberDBEntities db = new RLMemberDBEntities();
var csr_cu = (from s in db.vw_CustomerNotYetMember
select new
{
CustomerID = s.CU_ACNT_NUM,
ServiceAcNo = s.CUS_SRV_ACNT,
CustomerName = s.CUST_FRST_NM,
NRC = s.ENC_CTZ_CORP_NUM,
Service_Plan = s.SVR_PLAN

});
grdViewPopup.DataSource = csr_cu;
grdViewPopup.DataBind();
}


protected void btnSearch_Click(object sender, EventArgs e)
{
DateTime test = DateTime.Now;
}
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900