Click here to Skip to main content
12,761,216 members (30,101 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# SQL-Server

My application task is I am going to develop one super market application in this scenario. The user enter product code and user description
start date and end date, product rate, and quantity. My question is product rate based on date in varies rates.
Example: we will get soap this product 15th October to Nov 7th Rs.20/-. The same product Nov 8th between Dec Rs.23/- The same product change for Dec 15th Between Jan 12th Rs.19/- . How design database for this application and how to write class and method for this application.
Posted 29-Aug-12 4:54am
Updated 29-Aug-12 5:16am
Nueman 29-Aug-12 10:02am
Your question reads like a homework assignment. In any case, it seems much too broad. My suggestion is to start working on it and post relevant smaller problems.
Marcus Kramer 29-Aug-12 10:17am
Clearly homework. Read over your course notes first and make some attempt to do your own work. When that fails, ask a specific question related to the point where you got stuck. We will be very happy to help you at that point.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Nueman is right. Your question is too broad. Too general. You do not provide enough information. Without knowing the requirements of your application it's very hard to help you. You ask for a class or method for this application...but a class or method that does what? Are you adding or updating products in your product table? Are you placing an order from a customer? Are you placing an order to a supplier? You need to be much more specific if you want real help.

If you don't even know where to start, you should google for some basic tutorials. Google Results[^]

The very first result is a Code Project article:Beginners guide to accessing SQL Server through C#[^]

This should get you started. Hope it helps.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


After giving some thought i come to one solution. this is my personal view, you can do this with many other ways.

You need to create one table which may contain
ProductID - your product identity value
ProductVariationPercentage - you need to calculate what percentage you required to increase your product value from 20 to 23.
AffectedDate - The date from when this percentage should increase.

Note : your base price will be in your product database itself.

Although this is really very basic stuff but i think you are very new with development, And i hope you will develop this functionality from above hint.

You also need to do a lot of validation and other work in your BusinessLayer(if you are following 3Tier/NTier Architecture). Like, product price should have some threshold value, threshold value should not cross even if defined(Alert should be generated).

Hope i answered your question
-Amit Gajjar

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 29 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100