Project in ASP.Net and C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sajitk
    New Member
    • Feb 2008
    • 77

    Project in ASP.Net and C#

    Dear All,

    i am making an inhouse software to track all contract details, right from the sanction of the contract to the implementation of the project.

    I have the a table named mtblcontract;

    Proj_No - primary key
    Funding Agency
    Sanctioned Amount
    Start Date
    End Date


    This above table stores the basic information of the project.

    I have a form where we need to enter the sanction amount details. The structure of the form is given below: This form is for the Project No: P001

    Project_ No: P001

    S. No Head Sanctioned_Amou nt Estimated_Exp Profit
    1 Salaries 20000 15000 5000
    2. Travel 5000 2500 2500

    I would want the user to enter the above details in a grid. How do i do it? I am also confused as to how to create a table to store the above data.

    Would be great if any one of you could help me in this....

    Thanks

    Sajit
  • nbiswas
    New Member
    • May 2009
    • 149

    #2
    Solution to Project in ASP.Net and C#

    From the question you asked, it seems that you are very new to asp.net as well as in database field.

    Anyway,

    I would want the user to enter the above details in a grid. How do i do it?

    Provide textboxes in the grid's item template.
    e.g.

    Code:
    <asp:GridView runat="server" ID="gvPendingProposal" Width="100%" AutoGenerateColumns="false" HeaderStyle-BackColor="gray" AlternatingRowStyle-BackColor="darkgray"  BorderColor="Black" BorderStyle="None">
                                        <Columns> 
     <asp:TemplateField HeaderText="Description" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtDescription" BackColor="transparent" Width="99%" TextMode="MultiLine"
                                                        runat="server" MaxLength="50"/>
                                                </ItemTemplate>
                                            </asp:TemplateField>
    </Columns>
                                    </asp:GridView>
    I am also confused as to how to create a table to store the above data

    Use the create table command to create the table.

    Finally, design the grid with the fields and allow th user to enter the data. Keep a SUBMIT button there and when the user clicks on the button, save the data via the insert command of the database.

    Hope this helps

    Comment

    • sajitk
      New Member
      • Feb 2008
      • 77

      #3
      Thanks biswas for the prompt response.

      How will the table structure be, to store this data??? Will the column heads be the table field.

      Thanks / sajit

      Comment

      • nbiswas
        New Member
        • May 2009
        • 149

        #4
        Are you entirely new to database creation?
        Because the question u are asking is very very basic.
        e.g.
        create table mytable(col1 varchar(50), col2 int);

        select * from mytable

        it will show
        Col1 Col2

        Comment

        Working...