TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Md Nayeem
NA
75
24k
I want to make another Electronic Products Information Row
Mar 31 2017 2:55 PM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SalesInformationApp
{
class Program
{
static void Main(string[] args)
{
Program s = new Program();
List
InfoList = s.GetSales();
Console.WriteLine("---------------Sales Information-----------------");
Console.WriteLine("------------Computer ProductsInformation-----------");
Console.WriteLine("SID\tPID\tPName\tCustomerName\tUprice\tNopro\tTPrice");
foreach (SalesInfo pr in InfoList)
{
Console.WriteLine(pr.SID.ToString() + "\t"+ pr.PID.ToString()+"\t" + pr.PName + "\t" +pr.CustomerName+"\t"+pr.UPrice+"\t"+pr.Nopro+"\t"+pr.TPrice) ;
}
Console.ReadKey();
}
public List
GetSales()
{
List
InfoList = new List
();
//----------------------------------Computer--------------------------------------
SalesInfo a = new SalesInfo();
a.SID = 1;
a.PID = 1;
a.PName = "Mouse";
a.CustomerName = "Md.Belal";
a.UPrice = 300.00M;
a.Nopro = 2;
a.TPrice = 600;
InfoList.Add(a);
SalesInfo b = new SalesInfo();
b.SID = 2;
b.PID = 2;
b.PName = "Monitor";
b.CustomerName = "Md.Helal";
b.UPrice = 5000.00M;
b.Nopro = 3;
b.TPrice = 15000;
InfoList.Add(b);
SalesInfo c = new SalesInfo();
c.SID = 3;
c.PID = 3;
c.PName = "Ram";
c.CustomerName = "Md.Rasel";
c.UPrice = 1500.00M;
c.Nopro = 3;
c.TPrice = 4500;
InfoList.Add(c);
SalesInfo d= new SalesInfo();
d.SID = 4;
d.PID = 4;
d.PName = "Scanner";
d.CustomerName = "Md.Kabir";
d.UPrice = 3000.00M;
d.Nopro = 2;
d.TPrice = 6000;
InfoList.Add(d);
SalesInfo e = new SalesInfo();
e.SID = 5;
e.PID = 5;
e.PName = "Battery";
e.CustomerName = "Md.Robiul";
e.UPrice = 6000.00M;
e.Nopro = 10;
e.TPrice = 60000;
InfoList.Add(e);
SalesInfo f = new SalesInfo();
f.SID = 6;
f.PID = 6;
f.PName = "UPS";
f.CustomerName = "Md.Badol";
f.UPrice = 9000.00M;
f.Nopro = 10;
f.TPrice = 90000;
InfoList.Add(f);
SalesInfo g = new SalesInfo();
g.SID = 7;
g.PID = 7;
g.PName = "Mpad";
g.CustomerName = "Md.Karib";
g.UPrice = 150.00M;
g.Nopro = 5;
g.TPrice = 750;
InfoList.Add(g);
SalesInfo h = new SalesInfo();
h.SID = 8;
h.PID = 8;
h.PName = "Cdesk";
h.CustomerName = "Md.Kader";
h.UPrice = 2000.00M;
h.Nopro = 5;
h.TPrice = 10000;
InfoList.Add(h);
return InfoList;
}
}
///
///
///
public class SalesInfo
{
public int SID { get; set; }
public int PID { get; set; }
public string PName { get; set; }
public string CustomerName { get; set; }
public decimal UPrice { get; set; }
public decimal Nopro { get; set; }
public decimal TPrice { get; set; }
}
}
I want to make another Electronic Products Information Row In this Project.Now how can i write Program For ThisElectronic Products Information Row.First Computer Products information Data Row Will show then I want to show Electronic Products Information DataRow.
Reply
Reply
Answers (
1
)
WHERE FROM I CAN LEARN THE BASIC TO ADVANCE C# PROGRAMMING?
select combobox data then load another field in c#