<%@ page title="" language="C#" masterpagefile="~/html/MasterPage.master" autoeventwireup="true" inherits="html_PName_codes, App_Web_susspz30" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
     <link href="../css/ForButton.css" type="text/css" rel="Stylesheet"/>

    <style type="text/css">
        .style2
        {
            width: 100%;
        }
         .style19 
    {
            height: 90px;
    }
        .style20
     {
         width: 196px;
     }
     .style21
     {
         width: 114px;
     }
     .style22
     {
         width: 263px;
     }
    
    .style23
    {
        width: 114px;
        height: 39px;
    }
    .style24
    {
        width: 196px;
        height: 39px;
    }
    .style25
    {
        width: 263px;
        height: 39px;
    }
    .style26
    {
        height: 39px;
    }
    .shadow_five {
        background-color: #FFECCE;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        -o-border-radius: 10px;
        -ms-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 3px 3px 5px #B1A59A;
        -webkit-box-shadow: 3px 3px 5px #B1A59A;
        -o-box-shadow: 3px 3px 5px #B1A59A;
        -ms-box-shadow: 3px 3px 5px #B1A59A;
        box-shadow: 3px 3px 5px #B1A59A;
        padding: 10px;
        margin-bottom:10px;
        
    }
    </style>
        
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<asp:Panel ID="Panel1" runat="server" Width="720px" CssClass="shadow_five">  <%--BorderStyle="Groove"--%>
    <table class="style2">
        <tr>
            <td class="style19" colspan="4" style="font-size: 20px; font-weight: bold; color: #FFFFFF" 
                bgcolor="#ff9966">
                &nbsp;&nbsp; Add projects and its codes 
                
            </td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20">
                &nbsp;</td>
            <td class="style22">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style23">
                </td>
            <td align="right" class="style24">
                <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    Text=" Project Name   "></asp:Label>
            </td>
            <td class="style25">
                <asp:TextBox ID="txtPName" runat="server" Height="22px" Width="201px"></asp:TextBox>
            </td>
            <td class="style26">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtPName" ErrorMessage="Enter name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20" align="right">
                <asp:Label ID="Label2" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    Text=" Project Code   "></asp:Label>
            </td>
            <td class="style22">
                <asp:TextBox ID="txtPCode" runat="server" Height="22px" Width="201px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtPCode" ErrorMessage="Enter Code" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20">
                &nbsp;</td>
            <td class="style22">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20">
                &nbsp;</td>
            <td class="style22">
                <asp:Button ID="btnSave" runat="server" CssClass="testbutton" Text="Submit" 
                    onclick="btnSave_Click" ValidationGroup="1" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20">
                &nbsp;</td>
            <td class="style22">
                <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style21">
                &nbsp;</td>
            <td class="style20">
                &nbsp;</td>
            <td class="style22">
                <asp:Button ID="btnShowAll" runat="server" CssClass="testbutton" Text="Show All" 
                    onclick="btnShowAll_Click" />
                <br />
                <asp:Label ID="lblTest" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr align="center">
            <td colspan="4" align="center">
              
                 <asp:GridView ID="GridView1" runat="server" AllowPaging="true" 
                    AutoGenerateColumns="false" CellPadding="4" Font-Size="Medium" 
                    ForeColor="#333333" GridLines="None" OnPageIndexChanging="OnPaging" 
                    onrowcancelingedit="CancelEdit" onrowediting="EditCustomer" 
                    onrowupdating="UpdateCustomer">
                   <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    
                    <Columns>
                        <%--fIRST record--%>
                        <asp:TemplateField HeaderText="Code" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <asp:Label ID="lblPCode" runat="server" Text='<%# Eval("PCode")%>'></asp:Label>
                            </ItemTemplate>
                            <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtPCode" runat="server" Text='<%# Eval("PCode")%>' 
                                     Width="50px"></asp:TextBox>
                            </EditItemTemplate>--%>
                            <FooterTemplate>
                                <asp:TextBox ID="txtPCode" runat="server" MaxLength="5" Width="40px"></asp:TextBox>
                            </FooterTemplate>
                        </asp:TemplateField>
                        <%-- 2nd record--%>
                        <asp:TemplateField HeaderText="Name" ItemStyle-Width="180px">
                            <ItemTemplate>
                                <asp:Label ID="lblPName" runat="server" Text='<%# Eval("PName")%>' Width="250px"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtPName" runat="server" Text='<%# Eval("PName")%>' 
                                     Width="250px"></asp:TextBox>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtPame" runat="server" MaxLength="5" Width="180px"></asp:TextBox>
                            </FooterTemplate>
                        </asp:TemplateField>
                        
                         <%--  End entry of records--%>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkRemove" runat="server" 
                                    CommandArgument='<%# Eval("PCode")%>' OnClick="DeleteCustomer" 
                                    OnClientClick="return confirm('Do you want to delete?')" Text="Delete">
                                </asp:LinkButton>
                            </ItemTemplate>
                            <%--  <FooterTemplate>
        <asp:Button ID="btnAdd" runat="server" Text="Add"
            OnClick = "AddNewCustomer" />
   </FooterTemplate>--%></asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                    </Columns>
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
           
        </tr>
    </table>
</asp:Panel>
               
</ContentTemplate>
</asp:UpdatePanel>

</asp:Content>

