Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<%@ Page Language="C#" MasterPageFile="~/MiniErpMaster.master" AutoEventWireup="True"
    Inherits="ItemMaster" CodeBehind="ItemMaster.aspx.cs" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ErpMainContent" runat="server">
    <asp:UpdatePanel ID="Main" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="BtnSave" EventName="OnClick" />
        </Triggers>
        <ContentTemplate>
            <div class="wrap">
                <table width="100%">
                    <tr>
                        <td align="center" class="GenericBackgroud">
                            Item Master
                        </td>
                    </tr>
                </table>
                <table width="100%">
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td class="tdlablesize">
                                        <asp:Label ID="lblItemName" runat="server" Text="Item Name"></asp:Label>
                                    </td>
                                    <td class="tdcustom">
                                        <asp:TextBox ID="txtItemName" runat="server" CssClass="textbox" TabIndex="1"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvItemName" ForeColor="Red" ControlToValidate="txtItemName"
                                            runat="server" Text="Required field"></asp:RequiredFieldValidator>
                                    </td>
                                    <td class="tdlablesize">
                                        <asp:Label ID="lblItemType" runat="server" Text="Item Type"></asp:Label>
                                    </td>
                                    <td class="tdcustom">
                                        <asp:TextBox ID="txtItemType" runat="server" CssClass="textbox" TabIndex="2"></asp:TextBox>
                                    </td>
                                    <td class="lablecolor">
                                        <asp:CheckBox ID="chkIsResaleItem" Text="Resale Item" runat="server" TabIndex="5" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdlablesize">
                                        <asp:Label ID="lblItemVolume" runat="server" Text="Item Volume"></asp:Label>
                                    </td>
                                    <td class="tdcustom">
                                        <asp:TextBox ID="txtItemVolume" runat="server" CssClass="textbox" TabIndex="3"></asp:TextBox>
                                        <strong>ml<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                            ErrorMessage="Numbers Only" ControlToValidate="txtItemVolume" ForeColor="Red"
                                            ValidationExpression="^\d+$">
                                        </asp:RegularExpressionValidator>
                                        </strong>
                                    </td>
                                    <td class="tdlablesize">
                                        <asp:Label ID="lblItemCode" runat="server" Text="Item Code"></asp:Label>
                                    </td>
                                    <td class="tdcustom">
                                        <asp:TextBox ID="txtItemCode" CssClass="textbox" runat="server" TabIndex="4"></asp:TextBox>
                                        <strong>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Numbers Only"
                                                ControlToValidate="txtItemCode" ForeColor="Red" ValidationExpression="^\d+$">
                                            </asp:RegularExpressionValidator>
                                        </strong>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtItemNbr" runat="server" CssClass="textbox" Visible="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <br />
            <table width="100%">
                <tr>
                    <td align="center">
                        <asp:Button ID="BtnSave" runat="server" Text="Save" OnClick="BtnSave_Click1" TabIndex="6"
                            CssClass="button" />
                        <asp:Button ID="btnUpdate" runat="server" Text="Update" CssClass="button" OnClick="btnUpdate_Click"
                            TabIndex="7" />
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <br />
            Item Master Details
            <br />
            <div class="divCSSforGirdView">
                <fieldset>
                    <asp:GridView Width="100%" ID="grdvwItemMasterList" runat="server" AutoGenerateColumns="false"
                        OnRowCommand="CustomersGridView_RowCommand" OnRowEditing="grdvwItemMasterList_RowEditing"
                        OnRowDeleting="grdvwItemMasterList_RowDeleting" OnSelectedIndexChanged="grdvwItemMasterList_SelectedIndexChanged"
                        TabIndex="8">
                        <SelectedRowStyle BackColor="#99CCFF" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemStyle Width="80px" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" Text="Delete"
                                        CommandArgument='<%# Eval("ItemNbr") %>' OnClientClick="javascript:return confirm('Do you really want to \ndelete the item?');"
                                        CausesValidation="false">
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:ButtonField ButtonType="Link" Text="Edit" CommandName="Edit" />
                            <asp:BoundField DataField="ItemNbr" HeaderText="Item Number" ReadOnly="true" />
                            <asp:BoundField DataField="ItemName" HeaderText="Item Name" ReadOnly="true" />
                            <asp:BoundField DataField="ItemType" HeaderText="Item Type" ReadOnly="true" />
                            <asp:BoundField DataField="ItemVolume" HeaderText="Item Volume" ReadOnly="true" />
                            <asp:BoundField DataField="ItemCode" HeaderText="Item Code" ReadOnly="true" />
                            <asp:BoundField DataField="IsResaleItem" HeaderText="Is Resale Item" ReadOnly="true" />
                        </Columns>
                        <FooterStyle CssClass="FooterStyle" />
                        <RowStyle CssClass="RowStyle" />
                        <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                        <PagerStyle CssClass="PagerStyle" />
                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <HeaderStyle CssClass="HeaderStyle" />
                        <EditRowStyle CssClass="EditRowStyle" />
                        <AlternatingRowStyle CssClass="AltRowStyle" />
                    </asp:GridView>
                </fieldset>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
Posted
Comments
arathi_suresh 8-Aug-11 6:52am    
Not clear. Explain the question..what do you want?
LittleYellowBird 8-Aug-11 6:54am    
Hi, you have forgotten to explain what you are trying to do and ask a proper question. I think you might need to edit your 'Question' if you want help. :)
Abdul Quader Mamun 8-Aug-11 7:26am    
Too long
RaviRanjanKr 8-Aug-11 11:32am    
Thanks for posting code here but where is your Question. please be more specific while asking question.

1 solution

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