C# :: Displaying Multiple Images And Adding Sales To Them?

Aug 28, 2014

My application requires the user to add sales to images, this is done by displaying the image for the GUI, and then the user would add sales using that images ID which is brought in from the database.

In part this is 2 questions, first question is what is the best way to generate a List for use when adding the sales to the database. The List would need multiple strings for each sale. So for example:

Image 1 (Sale)

- JPG ID
- Product ID
- Product Quantity

So i'm going to assume i'm best creating a new instance of a custom class for each sale, and then add each instance to a List<Sale>?

public class Sale
{
public int SaleID { get; set; }
public int JpgID { get; set; }
public int SaleQty { get; set; }
}

Then I need a decent way to update this List with the GUI controls. So maybe get the JPG ID and set name of the Sale Class Instance to the ID, in this way its unique and I can update that instance when it comes to increasing the sale of a product or decreasing it.

Second part comes to the design of the GUI of adding sales, when I made this using HTML/PHP that was easier. It looked something like this:

If I wrote some code to generate that kind of design again in C# it going to require many Controls, wouldn't that be a bit intensive on the system? I just want something which looks great but also functions good.

At some point I'm going to switch to WPF, but I just need to get a working prototype working now which my client can use, and then update it when I have more time as I have got other Web Related projects that need doing, so at the moment WPF is out of the question.

View 2 Replies


ADVERTISEMENT

C/C++ :: How To Randomize Images In Multiple Picture Boxes

May 9, 2014

Here's what i'm searching for: I have a form with 3 pictureBoxes (pictureBox1,2,3). The form also contains one button.

What I want is that when the user clicks the button (so button_click event) that the 3 pictureBoxes each show a different picture. And when I click the button again again 3 different pictures will load.

I already found out that I need to make an arraylist for the pictures (there are about 100 pictures). A System.Random
to select random images. But I have absolutely no clue on how to write this code.

View 5 Replies View Related

C Sharp :: How To Display Multiple Images From SQL Server 2005 Into C# At Runtime

Mar 26, 2013

I stored multiple images in MySQL SERVER 2005. Now I want to retrieve particular category of images into multiple picturebox at runtime in C# Windows application. i used the following code in my final result form at form_Load using c# windows apps.. But it displays only one picture at run time.

SqlConnection con = new SqlConnection(@"Data Source=ttt-PC;Initial Catalog=Query_Image;Integrated Security=True");
SqlCommand cmdnew = new SqlCommand("select pic from Image_Category 
where IMG_Cat='" + searchvalue.ToString() + "'", con);
con.Open();

[Code] ....

View 2 Replies View Related

C# :: Adding And Displaying Data From A Text File

Mar 6, 2014

Is it possible to display data from a textfile and also save data in to a textfile, reason being is for me to create back-ups of data into a textfile hidden somewhere in a safe location in the local disk or server in case of database error and failure.

View 3 Replies View Related

C/C++ :: Adding Two Doubly Linked Lists And Displaying The Resulting List

Oct 9, 2014

can we pass two linked lists as argument in a member function to add two linked lists? and how to access them both in the function??

View 1 Replies View Related

C Sharp :: Displaying Values In Multiple Textboxes Using Single SQL Command

Apr 23, 2012

I've a html table in my web form which contains 30 rows of textboxes. I want to display all the textbox values by using a search command...

View 1 Replies View Related

C :: Adding Constant To Multiple Variables

May 20, 2013

Instead of using:

Code:
x=x+k
y=y+k
z=z+k

Is there a more elegant method of adding the same constant to many variables?

Something like: Code: (x, y, z) = (x, y, z) + k ??

View 5 Replies View Related

C Sharp :: Adding Multiple PDF Files Into EXCEL Using OLEObject?

Jun 24, 2013

I have the following code which allows me to add the pdf files if I give the exact name and path of the file. But I have multiple pdf files in a folder which I want to add to each cell in the first column. I am having trouble thinking of the logic to have a for loop for a folder which contains the pdf files.

 private void button1_Click(object sender, EventArgs e) {  
            Excel.Application xlApp;
            Excel.Workbook xlWorkBook;
            Excel.Worksheet xlWorkSheet;
            xlApp = new Excel.ApplicationClass();
            xlWorkBook = xlApp.Workbooks.Add(true);

[Code] ...

But this is very very rough draft. I have say 20 files in the folder pdf with different names(Title). How can I add all the 20 pdf files in the excel sheet?

View 6 Replies View Related

C++ :: Multiple Quiz Program - Adding High Score For Each User Stored In Binary File

Jul 11, 2014

I am making a multiple quiz program. So everything is working fine, except for the part where i'm trying to add a highscore for each user which is being stored in a binary file. I have added a sample of the program containing the error. This isn't the actual program, which is very long.

class user { //The collection of all info pertaining to the users
char user_id[50];
public:
int hscore1;
user() {
strcpy(user_id,"NULL");
hscore=0;

[Code] ....

View 1 Replies View Related

C++ :: Array Sales Bar Chart?

Dec 17, 2012

I need to make a bar chart with asterisks that looks like this:

Store 1: ******
Store 2: ***
etc.

anyway, right now what I have is:

Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main () {
const int STORES = 5;
int sales[STORES], i;
for (i = 0; i < STORES; i++) {

[code].....

It's not displaying asterisks.

View 1 Replies View Related

C++ :: Corporate Data Sales Structure

Nov 20, 2013

Corporate Data Sales

Write a program that uses a structure named CorpData to store the following information on a company division.

Division Name(North, South, East, Or West)
First quarter sales
Second quarter sales
Third quarter sales
Fourth quarter sales
Total annual sales
Average quarter sales

Include a constructor that allows the division name and four quarterly sales amounts to be specified at the time a CorpData variable is created.

The program should create four variables of this structure, each representing one of the following corporate divisions: North, South, East and West. Each variable should be passed in turn to a function that calculates and stores the total annual sales and average sales for that division.

Once this has been done for each division, each variable should be passed in turn to a function that displays the division name, total sales, and average sales.

Here is my code:

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
struct CorpData {

[Code] ....

View 1 Replies View Related

C/C++ :: Build A Sales Company Class?

Jul 1, 2014

Build a class named "salesCompany". Save it's name with a string and an array with records which will be filled with values from sales in different cities of the company.

Build the constructor which must get as a parameter the name of the company and a text file which will fill the array. There is an example of the text file format. Every line saves the sold quantity of a product, identified by a code, in a certain city.

CodeCityQuantity
1a63bCity11200
45ab8City2550
#include <iostream>
#include <string.h>
using namespace std;
class salesCompany {

[code].....

what should I add more and how can make it available for the user to enter as an input a text file.

View 1 Replies View Related

C/C++ :: Quarterly Sales Program Using 2D Arrays?

Mar 6, 2014

I wrote this program using struct and it works fine, now I want to write it just using arrays and I don't think i can do it. So here is the original code:

#include <iostream>
#include <string>
#include <fstream>
#include <ctime>
#include <cstdlib>
using namespace std;
//function declarations
void init()

[code].....

View 2 Replies View Related

Visual C++ :: Program To Calculate Sales Totals For A General Store - While Loops

Jan 25, 2013

I need coding this project using while loops and cout/cin.. It is suppose to be one while loop for the whole thing and inside of the first while loop is the second while loop for each sale separately.

You have been asked to write a program to calculate sales totals for a general store. Your program will not know how many products each customer will buy, so your program will have to repeat the process until the last product has been entered (use -1 for Product ID to end each sale). After each sale your program must ask if you want to do another sale (Y - continue, N - end program).

At the beginning of the day, the cash drawer has $500 in it. At the end of the program you must display how much money is in the drawer after handling all your sales transactions.

Input
Your program must take the following input:
- Product ID Number (int)
- Quantity for each item purchased (int)
- Cash Received at the end of the sale

Use the following dataset to determine the price and taxability for each item.

First Sale:
Product ID Price Quantity Taxable
101 $65.00 2 Yes
102 $12.50 1 No
103 $24.50 5 No
104 $38.75 4 Yes
105 $17.80 6 Yes
106 $16.50 2 No
107 $42.85 8 Yes
108 $32.99 2 Yes
109 $28.75 1 Yes
110 $51.55 1 No

Second Sale:
Product ID Price Quantity Taxable
102 $12.50 1 No
103 $24.50 1 No
106 $16.50 1 No
107 $42.85 1 Yes
108 $32.99 1 Yes
109 $28.75 1 Yes

Third Sale:
Product ID Price Quantity Taxable
106 $16.50 4 No
107 $42.85 3 Yes
108 $32.99 1 Yes
109 $28.75 5 Yes
110 $51.55 2 No

Calculating Tax
For those items that are taxable, assume a 7.5% sales tax. Be sure to keep a running total of tax for the each sale.

Getting Started
You must use the starter file provided with this assignment.
What to turn in:
- A copy of your source code
- A printout of your program's output

View 2 Replies View Related

C++ :: Images Don't Display?

Oct 6, 2013

My code is:

#include <iostream>
#include <string>
#include <cstdlib>

[Code]....

The problem is that the images don't display and the window doesn't respond.

View 5 Replies View Related

C :: Library For Loading Images In PNG?

Jan 29, 2015

What's the best performance library for loading images in PNG?

View 5 Replies View Related

C :: How To Import Images In Program

Feb 21, 2013

I want to import images in my program and what function I will use.

Compiler: Turboc 3.0

View 2 Replies View Related

C++ :: How Does SDL Load Bitmap Images

Apr 8, 2013

I don't mean how do I load a bmp, I mean how does SDL manage to do this?

View 2 Replies View Related

C++ :: SDL Rotating Images Function

Jun 9, 2013

Since SDL doesn't have it's own function for rotating images and I'm tired of storing multiple angles of the same sprite in a file, I created my own function for doing so:

//XY Class
class XY {
public:
XY(){}
XY(float x, float y);

[Code] ....

The problem is while Spin does spin the surface correctly, some pixels are rotated to the same new position so gaps appear in the returned surface. I need a way of filling in the gaps so the returned image looks better. A link to a program I made that uses this function is below so you can see the problem that I'm talking about. [URL] ....

I currently use SDL 1.2. Could my problem be fixed if I used 2.0? For example, does SDL 2.0 have a built in function for rotating surfaces?

View 3 Replies View Related

C++ :: Some Algorithms For Compressing Images?

Feb 16, 2014

RLE(Run Length Encoding)
using namespace std;
class Bitwriter{
private:

[Code]....

View 1 Replies View Related

C++ :: Read Images From Database

May 3, 2013

I have a database of images and I want to store paths of all those images to a text file (lets say "images.txt"). I can then use this text file in c++ to extract images one by one by using getline() in a loop.

I don't know how to store image paths to a text file.

View 4 Replies View Related

C# :: How To Store Images In Folder

Nov 24, 2014

I want to store the images in folder.... but I don't know how to do it

View 7 Replies View Related

C++ :: Can Integrate Images Into Program?

Sep 10, 2013

The question is pretty simple. I'd like to integrate an image into a C++ program.

View 11 Replies View Related

C/C++ :: How To Send Many Images Through Socket

Jun 25, 2012

I have written a socket witch send an image 256x256 and now i want to send many images and i don't know what loop to write to make the socket after have sent the first image to send another and not to write the same program many times for every image ......

this is the part that read the binary image

if( !(fp=fopen("Anemos.bmp","rb"))) {
            printf("Unable to load bin file: %s...
","Anemos.bmp");

[Code] ....

View 2 Replies View Related

Visual C++ :: How To Read Images In GDI Or GDI+

Jul 3, 2014

I am working on application to work with images. How to open/read images, whether it is jpeg, png, bmp or tiff and get it to bitmap. Is there some universal command for this or I will need more commands, every time testing the extension or format and then to use different method to read the image? Best would be to do it automatically, but I don't know such command.

View 8 Replies View Related

C++ :: How To Assign A Rectangle To Images

Apr 26, 2012

I am making a game Pong, and have been struggling with the collision aspect between the baal hitting off the paddle. I have created a Class, to draw a rectangle, to work with collision however I dont know how to assign the rectangle to the images of the ball and paddle.

#include "stdafx.h"
#include <iostream>
#include <time.h>
#include <vector>
#include <cmath>
#include "gwin.h"
const int NUMBEROFBALLS = 1;

[Code] .....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved