SlideShare a Scribd company logo
1 of 43
Download to read offline
COMPUTERIZED GALLERY SYSTEMS
BUSINESS SOLUTIONS DEVELOPMENT AMENDMENT REPORT
VOLUME - 2
Project Assignment: System Analysis & Design
Program Codes: C Sharp
Montreal
2015
AUTHOR GOVINDARAJAN A CHITTARANJAN
REVIEWED
BY
MR HAMID BENKHODJA
DATE May 11, 2015
ACKNOWLEDGMENTS
The Author wishes to acknowledge and appreciate valuable contributions from CGS
staff in Phase-II of current system analysis and development requirements to design
and develop a Business solution algorithm
The Author wishes to acknowledge the flexibility offered by the staff at CDI to access
resources and provide support to study, develop and document the assignment at
author’s own pace
The Author also wished to acknowledge the support and evaluation of Mr. Hamid
Benkhodja whose support and evaluation of the findings made it possible to produce
one of a kind quality report.
Last but never the least, the author wished to thank his family for being supportive
during the assignment process period
EXECUTIVE SUMMARY
CGS has a computerized business solution to keep track of Art works shown and
stored in its Gallery, The existing system facilitates real time file updating and tracking
protocols and it is accessed and processed from a single computer. CGS wished to
extend the existing system scope to maintain a unique file system for the Art pieces,
the Artists and the Curator, each identifiable by a unique key code for processing and
printing
The current scope of this report has evolved from the earlier model presented in
programming design logic Report dated 10th
March 2015. The scope of this assignment
is to present the earlier logic in a programming language. C Sharp (#) in Visual Studios
2010 was used to develop the business solution application with a Login module to
authenticate valid users of this application listed as below
USER NAME PASSWORD
This is an Example (actual user name and password emailed
separately)
Curators and administration staff are assumed to be valid users of this application and
the codes were written to accommodate accordingly. Designer codes are published in
separate report
It is important to note that this report has evolved from the previous report I in the
sense that the screens were modified for user convenience but most of the logic
behind this project remains the same
This report pertains to assignment scope only and depicts the program logic by way of
a structure programming language coded in C# with uniform screen designs to
maintain professionalism. The picture-boxes of the menu screens and popular
paintings’ snap shots were used from public websites assuming no copy rights
violations as this report is intended for course assignment evaluation purpose only.
Microsoft’s Student Report template was used as the bases to hasten the
documentation process. Legends are not included in this report.
Page | 5
TABLE OF CONTENTS
ACKNOWLEDGMENTS ..................................................................................................................................... I
EXECUTIVE SUMMARY ................................................................................................................................... II
TABLE OF CONTENTS .......................................................................................................................................5
SECTION 1: STRUCTURE CHARTS .....................................................................................................................7
BASIC DESIGN STRUCTURE.................................................................................................................................8
SECTION 2: C# PROGRAMMING CODES...........................................................................................................9
MAIN-ACCESS THROUGH USER AUTHENTICATION.........................................................................................10
DISPLAY MENU.................................................................................................................................................12
ART PIECE MENU..............................................................................................................................................14
ARTIST MENU...................................................................................................................................................16
CURATOR MENU ..............................................................................................................................................18
ADD ART PIECE .................................................................................................................................................20
ADD ARTIST ......................................................................................................................................................22
ADD CURATOR..................................................................................................................................................24
SELL ART PIECE .................................................................................................................................................26
UPDATE ARTIST ................................................................................................................................................28
UPDATE ART PIECE ...........................................................................................................................................30
UPDATE CURATOR ...........................................................................................................................................32
REPORT ART PIECE ...........................................................................................................................................34
REPORT ARTIST.................................................................................................................................................34
REPORT CURATORS..........................................................................................................................................38
SECTION 3: DATA TABLES ..............................................................................................................................40
DATA STRINGS AND TABLE ID ..........................................................................................................................41
CONCLUSION .................................................................................................................................................42
Page | 6
LIST OF FIGURES
FIGURE 1 BASIC DESIGN STRUCTURE........................................................................................................................8
FIGURE 2: CGS – LOGIN SCREEN FOR ACCESS TO MAIN APPLICATION.................................................................................10
FIGURE 3 MAIN MENU SCREEN...............................................................................................................................12
FIGURE 4 ART PIECE MENU SCREEN........................................................................................................................14
FIGURE 5 ARTIST MENU SCREEN.............................................................................................................................16
FIGURE 6 CURATOR MENU SCREEN........................................................................................................................18
FIGURE 8 ADD ART PIECE SCREEN...........................................................................................................................20
FIGURE 8 ADD ARTIST SCREEN................................................................................................................................22
FIGURE 8 ADD CURATOR SCREEN ...........................................................................................................................24
FIGURE 8 SELL ART PIECE SCREEN ...........................................................................................................................26
FIGURE 9 UPDATE ARTISTS SCREEN........................................................................................................................28
FIGURE 11 UPDATE ART PIECE SCREEN...................................................................................................................30
FIGURE 12 UPDATE CURATORS SCREEN.................................................................................................................32
Page | 7
SECTION 1: STRUCTURE CHARTS
Page | 8
B A S I C D E S I G N S T R U C T U R E
Figure 1 BASIC DESIGN STRUCTURE
Page | 9
SECTION 2: C# PROGRAMMING CODES
Page | 10
M A I N - A C C E S S T H R O U G H U S E R A U T H E N T I C A T I O N
Figure 2: CGS – Login Screen for access to Main Application
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class CGS_Login : Form
{
public CGS_Login()
{
InitializeComponent();
textBox1.Text = "";
textBox2.Text = "";
}
private void Clear_bt_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
}
Page | 11
private void CGS_Login_Load(object sender, EventArgs e)
{
textBox1.Focus();
}
private void Login_bt_Click(object sender, EventArgs e)
{
SqlConnection lg = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCDocumentsVisual Studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;Connect
Timeout=30;User Instance=True");
lg.Open();
SqlCommand cmd = new SqlCommand("select * from CURATOR_AUTHENTIC_USERS
WHERE USER_NAME = '" + textBox1.Text + "' and PASSWORD = '" + textBox2.Text +
"'", lg);
SqlDataReader dt = cmd.ExecuteReader();
int count = 0;
while (dt.Read())
{
count += 1;
}
if (count == 1)
{
MessageBox.Show("OK");
MAIN_MENU mm = new MAIN_MENU();
mm.Show();
dt.Close();
lg.Close();
this.Hide();
}
else
{
MessageBox.Show("Invalid USER NAME and PASSWORD");
}
}
private void Login_Exit_bt_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
}
private void Header_lbl_Click(object sender, EventArgs e)
{
}
}
}
Page | 12
D I S P L A Y M E N U
Figure 3 MAIN MENU SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Main_CGS
{
public partial class MAIN_MENU : Form
{
public MAIN_MENU()
{
InitializeComponent();
}
private void Artist_Click(object sender, EventArgs e)
{
this.Hide();
Artists arts = new Artists();
arts.ShowDialog();
}
Page | 13
private void Art_Piece_Click(object sender, EventArgs e)
{
this.Hide();
ART_PIECE artp = new ART_PIECE();
artp.ShowDialog();
}
private void Curator_Click(object sender, EventArgs e)
{
this.Hide();
Curators cus = new Curators();
cus.ShowDialog();
}
private void Exit_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
}
}
}
Page | 14
A R T P I E C E M E N U
Figure 4 ART PIECE MENU SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Main_CGS
{
public partial class Art_Piece : Form
{
public Art_Piece()
{
InitializeComponent();
}
private void Sell_bt_Click(object sender, EventArgs e)
{
this.Hide();
Sell_Art_Piece apsel = new Sell_Art_Piece();
apsel.ShowDialog();
}
Page | 15
private void Add_art_bt_Click(object sender, EventArgs e)
{
this.Hide();
Add_Art_Piece aps = new Add_Art_Piece();
aps.ShowDialog();
}
private void Update_art_bt_Click(object sender, EventArgs e)
{
this.Hide();
Update_Artist_Piece upats = new Update_Artist_Piece();
upats.ShowDialog();
}
private void Report_art_bt_Click(object sender, EventArgs e)
{
this.Hide();
Report_AP aprs = new Report_AP();
aprs.ShowDialog();
}
private void Exit_art_bt_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
MAIN_MENU mm = new MAIN_MENU();
mm.ShowDialog();
}
private void Art_Piece_Load(object sender, EventArgs e)
{
}
}
}
Page | 16
A R T I S T M E N U
Figure 5 ARTIST MENU SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Main_CGS
{
public partial class Artists : Form
{
public Artists()
{
InitializeComponent();
}
private void Artists_Load(object sender, EventArgs e)
{
}
private void Add_Artist_bt_Click(object sender, EventArgs e)
Page | 17
{
this.Hide();
Add_Artist adarts = new Add_Artist();
adarts.ShowDialog();
}
private void Update_Artists_bt_Click(object sender, EventArgs e)
{
this.Hide();
Update_Artists uparts = new Update_Artists();
uparts.ShowDialog();
}
private void Report_Artists_bt_Click(object sender, EventArgs e)
{
this.Hide();
Report_AT atrs = new Report_AT();
atrs.ShowDialog();
}
private void button4_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
MAIN_MENU mm = new MAIN_MENU();
mm.ShowDialog();
}
}
}
Page | 18
C U R A T O R M E N U
Figure 6 CURATOR MENU SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Main_CGS
{
public partial class Curators : Form
{
public Curators()
{
InitializeComponent();
}
private void Add_Curator_bt_Click(object sender, EventArgs e)
{
this.Hide();
Add_Curator cus = new Add_Curator();
cus.ShowDialog();
}
Page | 19
private void Update_Curators_bt_Click(object sender, EventArgs e)
{
this.Hide();
Update_Curators upcus = new Update_Curators();
upcus.ShowDialog();
}
private void Reports_Curators_bt_Click(object sender, EventArgs e)
{
this.Hide();
Report_CU curats = new Report_CU();
curats.ShowDialog();
}
private void Exit_Curators_bt_Click(object sender, EventArgs e)
{
this.Close();
this.Dispose();
MAIN_MENU mm = new MAIN_MENU();
mm.ShowDialog();
}
private void Curators_Load(object sender, EventArgs e)
{
}
}
}
Page | 20
A D D A R T P I E C E
Figure 7 ADD ART PIECE SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Add_Art_Piece : Form
{
public Add_Art_Piece()
{
InitializeComponent();
}
private void Add_Art_Piece_Clear_Click(object sender, EventArgs e)
{
ART_TITLE.Text = "";
ART_ID.Text = "";
Page | 21
ARTIST_NAME.Text = "";
ARTIST_ID.Text = "";
CURATOR_ID.Text = "";
CURATOR_NAME.Text = "";
ESTIMATED_PRICE.Text = "";
ART_TITLE.Focus();
}
private void Add_Art_Piece_bt_Click(object sender, EventArgs e)
{
SqlConnection apcon = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True");
apcon.Open();
SqlCommand acmd = new SqlCommand("insert into ART_PIECE(ART_TITLE,
ART_ID, ARTIST_NAME, ARTIST_ID, CURATOR_ID, CURATOR_NAME, ESTIMATED_PRICE,
STATUS)values('"+ART_TITLE.Text+"','"+ART_ID.Text+"','"+ARTIST_NAME+"','"+ARTIST_I
D.Text+"','"+CURATOR_ID.Text+"','"+CURATOR_NAME.Text+"','"+ESTIMATED_PRICE.Text+"'
)",apcon);
acmd.ExecuteNonQuery();
apcon.Close();
MessageBox.Show(" ART PIECE Data Added ");
}
public static void main(string[] args)
{
Application.Run(new Add_Art_Piece() );
}
private void Add_Art_Piece_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Art_Piece aps = new Art_Piece();
aps.ShowDialog();
}
private void Add_Art_Piece_Load(object sender, EventArgs e)
{
}
}
}
Page | 22
A D D A R T I S T
Figure 8 ADD ARTIST SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Add_Artist : Form
{
public Add_Artist()
{
InitializeComponent();
}
private void Add_Artist_Exit_Click(object sender, EventArgs e)
{
this.Hide();
Artists arts = new Artists();
arts.ShowDialog();
}
private void Add_Artist_Clear_Click(object sender, EventArgs e)
Page | 23
{
Add_Artist_Name.Text = "";
Add_Artist_ID.Text = "";
Art_Title.Text = "";
Curator_Name_AT.Text = "";
Curator_ID.Text = "";
Add_Artist_Name.Focus();
}
private void Add_Artist_bt_Click(object sender, EventArgs e)
{
SqlConnection acon = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True");
acon.Open();
SqlCommand cmd = new SqlCommand("insert into ARTISTS(ARTIST_NAME,
ARTIST_ID, ART_TITLE, CURATOR_ID,
CURATOR_NAME)values('"+Add_Artist_ID.Text+"','"+Add_Artist_Name.Text+"','"+Art_Tit
le.Text+ "','"+Curator_ID.Text+"','"+Curator_Name_AT.Text+"')",acon);
cmd.ExecuteNonQuery();
acon.Close();
MessageBox.Show("ARTIST Added");
}
private void Add_Artist_Load(object sender, EventArgs e)
{
}
}
}
Page | 24
A D D C U R A T O R
Figure 9 ADD CURATOR SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Add_Curator : Form
{
public Add_Curator()
{
InitializeComponent();
}
private void Add_Curator_Load(object sender, EventArgs e)
{
}
private void Add_Curator_Clear_bt_Click(object sender, EventArgs e)
Page | 25
{
Add_Curator_Name_CU.Text = "";
Add_Curator_ID_CU.Text = "";
Add_Artist_CU.Text = "";
Curator_COM.Text = "";
Add_Curator_Name_CU.Focus();
}
private void Add_Curator_bt_Click(object sender, EventArgs e)
{
SqlConnection ccon = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True");
ccon.Open();
SqlCommand cmd = new SqlCommand("insert into
CURATOR_AUTHENTIC_USERS(CURATOR_ID, CURATOR_NAME, USER_NAME, PASSWORD,
ARTIST_ASSIGNED, CURATOR_COMMISSION) values ('"+Add_Curator_Name_CU.Text + "','" +
Add_Curator_ID_CU.Text + "','"+Add_Artist_CU.Text+"','"+Curator_COM.Text+"')",
ccon);
cmd.ExecuteNonQuery();
ccon.Close();
MessageBox.Show("Record Added");
}
private void Add_Curator_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Curators cus = new Curators();
cus.ShowDialog();
}
private void Add_Artist_CU_TextChanged(object sender, EventArgs e)
{
}
private void Add_Curator_Load_1(object sender, EventArgs e)
{
}
}
}
Page | 26
S E L L A R T P I E C E
Figure 10 SELL ART PIECE SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Main_CGS
{
public partial class Sell_Art_Piece : Form
{
public Sell_Art_Piece()
{
InitializeComponent();
}
private void Sell_Art_Piece_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'cGSDataSet4.ART_PIECE'
table. You can move, or remove it, as needed.
this.aRT_PIECETableAdapter.Fill(this.cGSDataSet4.ART_PIECE);
}
private void Sell_bt_Click(object sender, EventArgs e)
{
// Event not required for this project but presented herewith
float SP;
float EP;
SP = 0.00F;
EP = 0.00F;
SP = Int32.Parse(Sale_Price.Text);
EP = Int32.Parse(listBox5.Text);
//string Status = "";
if (SP > EP)
{
SqlConnection scon = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True");
scon.Open();
SqlCommand cmd = new SqlCommand("insert into
ART_PIECE(SALE_PRICE)value('"+Add_Sale_Price.Text+"')", scon);
Page | 27
cmd.ExecuteNonQuery();
scon.Close();
MessageBox.Show(" Art Piece SOLD ");
}
else
{
MessageBox.Show("Not A Profitable Transaction, Selling Price less
than Estimated");
}
}
private void Sell_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Art_Piece aps = new Art_Piece();
aps.ShowDialog();
}
private void bindingSource1_CurrentChanged(object sender, EventArgs e)
{
}
}
}
Page | 28
U P D A T E A R T I S T
Figure 11 UPDATE ARTISTS SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Update_Artists : Form
{
SqlConnection con;
SqlDataAdapter adap;
DataSet ds;
public Update_Artists()
{
InitializeComponent();
}
private void Update_Artist_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Artists arts = new Artists();
arts.ShowDialog();
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void Update_Artists_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'cGSDataSet7.ARTISTS'
table. You can move, or remove it, as needed.
this.aRTISTSTableAdapter.Fill(this.cGSDataSet7.ARTISTS);
try
{
con = new SqlConnection();
con.ConnectionString = @"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True";
Page | 29
con.Open();
adap = new SqlDataAdapter("Select * from ARTISTS", con);
ds = new System.Data.DataSet();
adap.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
catch (Exception ex)
{
MessageBox.Show("Error", ex.Message);
}
}
private void Update_bt_Click(object sender, EventArgs e)
{
try
{
if (this.dataGridView1.SelectedRows.Count > 0)
{
dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);
}
MessageBox.Show("Record Deleted", "Update Artists",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception exp)
{
MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}
}
Page | 30
U P D A T E A R T P I E C E
Figure 12 UPDATE ART PIECE SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Update_Artist_Piece : Form
{
SqlConnection acon;
SqlDataAdapter aadap;
DataSet das;
//SqlCommandBuilder cmdbuilder;
public Update_Artist_Piece()
{
InitializeComponent();
}
private void Update_Art_Piece_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Art_Piece aps = new Art_Piece();
aps.ShowDialog();
}
private void Update_Artist_Piece_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'cGSDataSet6.ART_PIECE'
table. You can move, or remove it, as needed.
this.aRT_PIECETableAdapter3.Fill(this.cGSDataSet6.ART_PIECE);
try
{
acon = new SqlConnection();
acon.ConnectionString = @"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True";
acon.Open();
aadap = new SqlDataAdapter("Select * FROM ART_PIECE", acon);
das = new System.Data.DataSet();
aadap.Fill(das);
dataGridView1.DataSource = das.Tables[0];
Page | 31
}
catch (Exception exp)
{
MessageBox.Show("Error", exp.Message);
}
}
private void Update_Artist_Bt_Click(object sender, EventArgs e)
{
try
{
if (this.dataGridView1.SelectedRows.Count > 0)
{
dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);
}
//cmdbuilder = new SqlCommandBuilder(aadap);
//aadap.Update(das, "Update Art Pieces");
MessageBox.Show("Record Deleted", "Update Art Pieces",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception exp)
{
MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}
}
Page | 32
U P D A T E C U R A T O R
Figure 13 UPDATE CURATORS SCREEN
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Main_CGS
{
public partial class Update_Curators : Form
{
SqlConnection ccon;
SqlDataAdapter cadap;
DataSet cds;
//SqlCommandBuilder cmdbuilder;
public Update_Curators()
{
InitializeComponent();
}
private void Update_Curators_Load(object sender, EventArgs e)
{
this.cURATOR_AUTHENTIC_USERSTableAdapter.Fill(this.cGSDataSet10.CURATOR_AUTHENTIC_
USERS);
try
{
ccon = new SqlConnection();
ccon.ConnectionString = @"Data
Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio
2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User
Instance=True";
ccon.Open();
cadap = new SqlDataAdapter("SELECT * FROM
CURATOR_AUTHENTIC_USERS", ccon);
cds = new System.Data.DataSet();
cadap.Fill(cds, "CURATORS");
dataGridView1.DataSource = cds.Tables[0];
}
catch (Exception ex)
{
Page | 33
MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
private void Update_Curator_Exit_bt_Click(object sender, EventArgs e)
{
this.Hide();
Curators cus = new Curators();
cus.ShowDialog();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
if (this.dataGridView1.SelectedRows.Count > 0)
{
dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);
}
MessageBox.Show("Record Deleted", "Update
Curators", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception exp)
{
MessageBox.Show(exp.Message,"Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
private void dataGridView1_CellContentClick(object sender,
DataGridViewCellEventArgs e)
{
}
}
}
Page | 34
R E P O R T A R T P I E C E
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Main_CGS
{
public partial class Report_AP : Form
{
public Report_AP()
{
InitializeComponent();
}
private void Exit_Click(object sender, EventArgs e) // to Exit the Screen
{
this.Hide();
this.Dispose();
ArtPiece aps = new ArtPiece();
aps.ShowDialog();
}
private void Report_AP_Load(object sender, EventArgs e)
{
string[] row; //initializing the variables row and listview
ListViewItem lvi;
try
{
StreamReader sr2 = new
StreamReader(@"C:VB2010_GCMain_CGSMain_CGSArt_Piece.txt"); // specifing
path and source
String LineAC = sr2.ReadLine();
while (LineAC != null) // while text file rows are not empty
perform addition of items into ListView columns into list View separated by ","
for columns - via "for" loop
{
row= LineAC.Split(',');
lvi = new ListViewItem(row[0]);
listView1.Items.Add(lvi);
for (int i = 0; i < row.Length; i++)
{
lvi.SubItems.Add(row[i]);
}
LineAC = sr2.ReadLine();
}
Page | 35
}
catch (Exception exp) // return error message on null
{
MessageBox.Show("Error : " + exp.Message);
}
}
}
}
Page | 36
R E P O R T A R T I S T
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Main_CGS
{
public partial class Report_AT : Form
{
public Report_AT()
{
InitializeComponent();
}
private void Exit_Click(object sender, EventArgs e) // to Exit the Screen
{
this.Hide();
this.Dispose();
Artists aps = new Artists();
ats.ShowDialog();
}
private void Report_AT_Load(object sender, EventArgs e)
{
string[] row; //initializing the variables row and listview
ListViewItem lvi;
try
{
StreamReader sr1 = new
StreamReader(@"C:VB2010_GCMain_CGSMain_CGSArtist.txt"); // specifing path
and source
String LineAC = sr1.ReadLine();
while (LineAC != null) // while text file rows are not empty
perform addition of items into ListView columns into list View separated by ","
for columns - via "for" loop
{
row= LineAC.Split(',');
lvi = new ListViewItem(row[0]);
listView1.Items.Add(lvi);
for (int i = 0; i < row.Length; i++)
{
lvi.SubItems.Add(row[i]);
}
LineAC = sr1.ReadLine();
}
Page | 37
}
catch (Exception exp) // return error message on null
{
MessageBox.Show("Error : " + exp.Message);
}
}
}
}
Page | 38
R E P O R T C U R A T O R S
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Main_CGS
{
public partial class Report_CU : Form
{
public Report_CU()
{
InitializeComponent();
}
private void Exit_Click(object sender, EventArgs e) // to Exit the Screen
{
this.Hide();
this.Dispose();
Curators aps = new Curators();
aps.ShowDialog();
}
private void Report_CU_Load(object sender, EventArgs e)
{
string[] row; //initializing the variables row and listview
ListViewItem lvi;
try
{
StreamReader sr3 = new
StreamReader(@"C:VB2010_GCMain_CGSMain_CGSCurators.txt"); // specifing path
and source
String LineAC = sr3.ReadLine();
while (LineAC != null) // while text file rows are not empty
perform addition of items into ListView columns into list View separated by ","
for columns - via "for" loop
{
row= LineAC.Split(',');
lvi = new ListViewItem(row[0]);
listView1.Items.Add(lvi);
for (int i = 0; i < row.Length; i++)
{
lvi.SubItems.Add(row[i]);
}
LineAC = sr3.ReadLine();
}
Page | 39
}
catch (Exception exp) // return error message on null
{
MessageBox.Show("Error : " + exp.Message);
}
}
}
}
Page | 40
SECTION 3: DATA TABLES
Page | 41
D A T A S T R I N G S A N D T A B L E I D
A. ART PIECE DATA TABLE
SQL STRING:
Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated
Security=True;User Instance=True
TABLE NAME: ART_PIECE
B. ARTIST DATA TABLE
SQL STRING:
Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated
Security=True;User Instance=True
TABLE NAME: ARTISTS
C. CURATORS / AUTHENTIC USERS DATA TABLE
SQL STRING:
Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated
Security=True;User Instance=True
TABLE NAME: CURATORS_AUTHENTIC_USERS
Page | 42
CONCLUSION
Presented herewith are the C Sharp programming codes for the system in brief and the
requirements to improve and develop business solutions for the Computerized Gallery
Systems by Object oriented approach to achieve the desired results
As stated earlier there are ample scopes for more detailed new system definition and design
that could be discussed and tasks could be assigned for further developments to optimize the
operational efficiency of Computerized Gallery Systems
Page | 43
THANK YOU
Page | 44

More Related Content

What's hot (10)

CIC Building Information Modelling Standards Draft 5.0
CIC Building Information Modelling Standards Draft 5.0CIC Building Information Modelling Standards Draft 5.0
CIC Building Information Modelling Standards Draft 5.0
 
Project Daedalus Final Report
Project Daedalus Final ReportProject Daedalus Final Report
Project Daedalus Final Report
 
Project Daedalus Final Report
Project Daedalus Final Report Project Daedalus Final Report
Project Daedalus Final Report
 
Service level management using ibm tivoli service level advisor and tivoli bu...
Service level management using ibm tivoli service level advisor and tivoli bu...Service level management using ibm tivoli service level advisor and tivoli bu...
Service level management using ibm tivoli service level advisor and tivoli bu...
 
CIC Building Information Modelling Standards Draft 6.2
CIC Building Information Modelling Standards Draft 6.2CIC Building Information Modelling Standards Draft 6.2
CIC Building Information Modelling Standards Draft 6.2
 
Montero thesis-project
Montero thesis-projectMontero thesis-project
Montero thesis-project
 
D7.1 project management handbook
D7.1 project management handbookD7.1 project management handbook
D7.1 project management handbook
 
Itil qualification scheme_brochure_v2.0
Itil qualification scheme_brochure_v2.0Itil qualification scheme_brochure_v2.0
Itil qualification scheme_brochure_v2.0
 
Extending your business to mobile devices with ibm worklight
Extending your business to mobile devices with ibm worklightExtending your business to mobile devices with ibm worklight
Extending your business to mobile devices with ibm worklight
 
Project management
Project managementProject management
Project management
 

Viewers also liked

Hire a Spartan-11x17 brochure-half fold (2)
Hire a Spartan-11x17 brochure-half fold (2)Hire a Spartan-11x17 brochure-half fold (2)
Hire a Spartan-11x17 brochure-half fold (2)Mary Lesa Pegg
 
Convivencia escolar: prevención e intervención
Convivencia escolar: prevención e intervenciónConvivencia escolar: prevención e intervención
Convivencia escolar: prevención e intervenciónMaría Sofía Martín
 
Top 10 interview q&ams
Top 10 interview q&amsTop 10 interview q&ams
Top 10 interview q&amsVikram Rawani
 
Print gewinnt — Analyse von Andreas Weber
Print gewinnt — Analyse von Andreas WeberPrint gewinnt — Analyse von Andreas Weber
Print gewinnt — Analyse von Andreas WeberAndreas Weber
 
Dystopian art and literature D block
Dystopian art and literature D blockDystopian art and literature D block
Dystopian art and literature D blockdonamore1
 

Viewers also liked (8)

Hire a Spartan-11x17 brochure-half fold (2)
Hire a Spartan-11x17 brochure-half fold (2)Hire a Spartan-11x17 brochure-half fold (2)
Hire a Spartan-11x17 brochure-half fold (2)
 
[E-book] ICMS Substituição Tributária (ICMS ST) e CEST
[E-book] ICMS Substituição Tributária (ICMS ST) e CEST[E-book] ICMS Substituição Tributária (ICMS ST) e CEST
[E-book] ICMS Substituição Tributária (ICMS ST) e CEST
 
Convivencia escolar: prevención e intervención
Convivencia escolar: prevención e intervenciónConvivencia escolar: prevención e intervención
Convivencia escolar: prevención e intervención
 
Font of title analysis
Font of title analysisFont of title analysis
Font of title analysis
 
Top 10 interview q&ams
Top 10 interview q&amsTop 10 interview q&ams
Top 10 interview q&ams
 
Calculation modes in Excel
Calculation modes in ExcelCalculation modes in Excel
Calculation modes in Excel
 
Print gewinnt — Analyse von Andreas Weber
Print gewinnt — Analyse von Andreas WeberPrint gewinnt — Analyse von Andreas Weber
Print gewinnt — Analyse von Andreas Weber
 
Dystopian art and literature D block
Dystopian art and literature D blockDystopian art and literature D block
Dystopian art and literature D block
 

Similar to COMPUTERIZED GALLERY SYSTEMS Automation Project_CS_CODES_Govindarajan_A_Chittaranjan_APRIL2015

online examination management system
online examination management systemonline examination management system
online examination management systemPraveen Patel
 
Software Engineering
Software EngineeringSoftware Engineering
Software EngineeringSoftware Guru
 
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...EnriqueJoseCaleroGal
 
Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerAdel Belasker
 
Develop a first business process application
Develop a first business process applicationDevelop a first business process application
Develop a first business process applicationBonitasoft
 
Airline management system
Airline management systemAirline management system
Airline management systemSH Rajøn
 
LPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] ReportLPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] ReportNandu B Rajan
 
Digital Content Retrieval Final Report
Digital Content Retrieval Final ReportDigital Content Retrieval Final Report
Digital Content Retrieval Final ReportKourosh Sajjadi
 
Hp man sm9.30_application_patch_mgr_pdf
Hp man sm9.30_application_patch_mgr_pdfHp man sm9.30_application_patch_mgr_pdf
Hp man sm9.30_application_patch_mgr_pdfGLaDOS2199
 
Online News Portal System
Online News Portal SystemOnline News Portal System
Online News Portal SystemRajib Roy
 
Chat Application [Full Documentation]
Chat Application [Full Documentation]Chat Application [Full Documentation]
Chat Application [Full Documentation]Rajon
 
Salesforce development lifecycle
Salesforce development lifecycleSalesforce development lifecycle
Salesforce development lifecyclegiridhar007
 
(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)Ketut Swandana
 
9607 guideto supplierdevelopment
9607 guideto supplierdevelopment9607 guideto supplierdevelopment
9607 guideto supplierdevelopmentSherri Dobroskay
 
bkremer-report-final
bkremer-report-finalbkremer-report-final
bkremer-report-finalBen Kremer
 

Similar to COMPUTERIZED GALLERY SYSTEMS Automation Project_CS_CODES_Govindarajan_A_Chittaranjan_APRIL2015 (20)

Open Source adobe lightroom like
Open Source adobe lightroom likeOpen Source adobe lightroom like
Open Source adobe lightroom like
 
CS4099Report
CS4099ReportCS4099Report
CS4099Report
 
online examination management system
online examination management systemonline examination management system
online examination management system
 
Nato1968
Nato1968Nato1968
Nato1968
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...
OpenScape Contact Center Enterprise V10 Manager Administration Guide Administ...
 
Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel Belasker
 
Identity Management Project Roadmap
Identity Management Project RoadmapIdentity Management Project Roadmap
Identity Management Project Roadmap
 
Develop a first business process application
Develop a first business process applicationDevelop a first business process application
Develop a first business process application
 
Airline management system
Airline management systemAirline management system
Airline management system
 
LPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] ReportLPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] Report
 
Digital Content Retrieval Final Report
Digital Content Retrieval Final ReportDigital Content Retrieval Final Report
Digital Content Retrieval Final Report
 
Hp man sm9.30_application_patch_mgr_pdf
Hp man sm9.30_application_patch_mgr_pdfHp man sm9.30_application_patch_mgr_pdf
Hp man sm9.30_application_patch_mgr_pdf
 
Online News Portal System
Online News Portal SystemOnline News Portal System
Online News Portal System
 
Abrek_Thesis
Abrek_ThesisAbrek_Thesis
Abrek_Thesis
 
Chat Application [Full Documentation]
Chat Application [Full Documentation]Chat Application [Full Documentation]
Chat Application [Full Documentation]
 
Salesforce development lifecycle
Salesforce development lifecycleSalesforce development lifecycle
Salesforce development lifecycle
 
(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)(Manual) auto cad 2000 visual lisp tutorial (autocad)
(Manual) auto cad 2000 visual lisp tutorial (autocad)
 
9607 guideto supplierdevelopment
9607 guideto supplierdevelopment9607 guideto supplierdevelopment
9607 guideto supplierdevelopment
 
bkremer-report-final
bkremer-report-finalbkremer-report-final
bkremer-report-final
 

COMPUTERIZED GALLERY SYSTEMS Automation Project_CS_CODES_Govindarajan_A_Chittaranjan_APRIL2015

  • 1. COMPUTERIZED GALLERY SYSTEMS BUSINESS SOLUTIONS DEVELOPMENT AMENDMENT REPORT VOLUME - 2 Project Assignment: System Analysis & Design Program Codes: C Sharp Montreal 2015 AUTHOR GOVINDARAJAN A CHITTARANJAN REVIEWED BY MR HAMID BENKHODJA DATE May 11, 2015
  • 2. ACKNOWLEDGMENTS The Author wishes to acknowledge and appreciate valuable contributions from CGS staff in Phase-II of current system analysis and development requirements to design and develop a Business solution algorithm The Author wishes to acknowledge the flexibility offered by the staff at CDI to access resources and provide support to study, develop and document the assignment at author’s own pace The Author also wished to acknowledge the support and evaluation of Mr. Hamid Benkhodja whose support and evaluation of the findings made it possible to produce one of a kind quality report. Last but never the least, the author wished to thank his family for being supportive during the assignment process period
  • 3. EXECUTIVE SUMMARY CGS has a computerized business solution to keep track of Art works shown and stored in its Gallery, The existing system facilitates real time file updating and tracking protocols and it is accessed and processed from a single computer. CGS wished to extend the existing system scope to maintain a unique file system for the Art pieces, the Artists and the Curator, each identifiable by a unique key code for processing and printing The current scope of this report has evolved from the earlier model presented in programming design logic Report dated 10th March 2015. The scope of this assignment is to present the earlier logic in a programming language. C Sharp (#) in Visual Studios 2010 was used to develop the business solution application with a Login module to authenticate valid users of this application listed as below USER NAME PASSWORD This is an Example (actual user name and password emailed separately) Curators and administration staff are assumed to be valid users of this application and the codes were written to accommodate accordingly. Designer codes are published in separate report It is important to note that this report has evolved from the previous report I in the sense that the screens were modified for user convenience but most of the logic behind this project remains the same This report pertains to assignment scope only and depicts the program logic by way of a structure programming language coded in C# with uniform screen designs to maintain professionalism. The picture-boxes of the menu screens and popular paintings’ snap shots were used from public websites assuming no copy rights violations as this report is intended for course assignment evaluation purpose only. Microsoft’s Student Report template was used as the bases to hasten the documentation process. Legends are not included in this report.
  • 4. Page | 5 TABLE OF CONTENTS ACKNOWLEDGMENTS ..................................................................................................................................... I EXECUTIVE SUMMARY ................................................................................................................................... II TABLE OF CONTENTS .......................................................................................................................................5 SECTION 1: STRUCTURE CHARTS .....................................................................................................................7 BASIC DESIGN STRUCTURE.................................................................................................................................8 SECTION 2: C# PROGRAMMING CODES...........................................................................................................9 MAIN-ACCESS THROUGH USER AUTHENTICATION.........................................................................................10 DISPLAY MENU.................................................................................................................................................12 ART PIECE MENU..............................................................................................................................................14 ARTIST MENU...................................................................................................................................................16 CURATOR MENU ..............................................................................................................................................18 ADD ART PIECE .................................................................................................................................................20 ADD ARTIST ......................................................................................................................................................22 ADD CURATOR..................................................................................................................................................24 SELL ART PIECE .................................................................................................................................................26 UPDATE ARTIST ................................................................................................................................................28 UPDATE ART PIECE ...........................................................................................................................................30 UPDATE CURATOR ...........................................................................................................................................32 REPORT ART PIECE ...........................................................................................................................................34 REPORT ARTIST.................................................................................................................................................34 REPORT CURATORS..........................................................................................................................................38 SECTION 3: DATA TABLES ..............................................................................................................................40 DATA STRINGS AND TABLE ID ..........................................................................................................................41 CONCLUSION .................................................................................................................................................42
  • 5. Page | 6 LIST OF FIGURES FIGURE 1 BASIC DESIGN STRUCTURE........................................................................................................................8 FIGURE 2: CGS – LOGIN SCREEN FOR ACCESS TO MAIN APPLICATION.................................................................................10 FIGURE 3 MAIN MENU SCREEN...............................................................................................................................12 FIGURE 4 ART PIECE MENU SCREEN........................................................................................................................14 FIGURE 5 ARTIST MENU SCREEN.............................................................................................................................16 FIGURE 6 CURATOR MENU SCREEN........................................................................................................................18 FIGURE 8 ADD ART PIECE SCREEN...........................................................................................................................20 FIGURE 8 ADD ARTIST SCREEN................................................................................................................................22 FIGURE 8 ADD CURATOR SCREEN ...........................................................................................................................24 FIGURE 8 SELL ART PIECE SCREEN ...........................................................................................................................26 FIGURE 9 UPDATE ARTISTS SCREEN........................................................................................................................28 FIGURE 11 UPDATE ART PIECE SCREEN...................................................................................................................30 FIGURE 12 UPDATE CURATORS SCREEN.................................................................................................................32
  • 6. Page | 7 SECTION 1: STRUCTURE CHARTS
  • 7. Page | 8 B A S I C D E S I G N S T R U C T U R E Figure 1 BASIC DESIGN STRUCTURE
  • 8. Page | 9 SECTION 2: C# PROGRAMMING CODES
  • 9. Page | 10 M A I N - A C C E S S T H R O U G H U S E R A U T H E N T I C A T I O N Figure 2: CGS – Login Screen for access to Main Application using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class CGS_Login : Form { public CGS_Login() { InitializeComponent(); textBox1.Text = ""; textBox2.Text = ""; } private void Clear_bt_Click(object sender, EventArgs e) { textBox1.Clear(); textBox2.Clear(); }
  • 10. Page | 11 private void CGS_Login_Load(object sender, EventArgs e) { textBox1.Focus(); } private void Login_bt_Click(object sender, EventArgs e) { SqlConnection lg = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCDocumentsVisual Studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True"); lg.Open(); SqlCommand cmd = new SqlCommand("select * from CURATOR_AUTHENTIC_USERS WHERE USER_NAME = '" + textBox1.Text + "' and PASSWORD = '" + textBox2.Text + "'", lg); SqlDataReader dt = cmd.ExecuteReader(); int count = 0; while (dt.Read()) { count += 1; } if (count == 1) { MessageBox.Show("OK"); MAIN_MENU mm = new MAIN_MENU(); mm.Show(); dt.Close(); lg.Close(); this.Hide(); } else { MessageBox.Show("Invalid USER NAME and PASSWORD"); } } private void Login_Exit_bt_Click(object sender, EventArgs e) { this.Close(); this.Dispose(); } private void Header_lbl_Click(object sender, EventArgs e) { } } }
  • 11. Page | 12 D I S P L A Y M E N U Figure 3 MAIN MENU SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Main_CGS { public partial class MAIN_MENU : Form { public MAIN_MENU() { InitializeComponent(); } private void Artist_Click(object sender, EventArgs e) { this.Hide(); Artists arts = new Artists(); arts.ShowDialog(); }
  • 12. Page | 13 private void Art_Piece_Click(object sender, EventArgs e) { this.Hide(); ART_PIECE artp = new ART_PIECE(); artp.ShowDialog(); } private void Curator_Click(object sender, EventArgs e) { this.Hide(); Curators cus = new Curators(); cus.ShowDialog(); } private void Exit_Click(object sender, EventArgs e) { this.Close(); this.Dispose(); } } }
  • 13. Page | 14 A R T P I E C E M E N U Figure 4 ART PIECE MENU SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Main_CGS { public partial class Art_Piece : Form { public Art_Piece() { InitializeComponent(); } private void Sell_bt_Click(object sender, EventArgs e) { this.Hide(); Sell_Art_Piece apsel = new Sell_Art_Piece(); apsel.ShowDialog(); }
  • 14. Page | 15 private void Add_art_bt_Click(object sender, EventArgs e) { this.Hide(); Add_Art_Piece aps = new Add_Art_Piece(); aps.ShowDialog(); } private void Update_art_bt_Click(object sender, EventArgs e) { this.Hide(); Update_Artist_Piece upats = new Update_Artist_Piece(); upats.ShowDialog(); } private void Report_art_bt_Click(object sender, EventArgs e) { this.Hide(); Report_AP aprs = new Report_AP(); aprs.ShowDialog(); } private void Exit_art_bt_Click(object sender, EventArgs e) { this.Close(); this.Dispose(); MAIN_MENU mm = new MAIN_MENU(); mm.ShowDialog(); } private void Art_Piece_Load(object sender, EventArgs e) { } } }
  • 15. Page | 16 A R T I S T M E N U Figure 5 ARTIST MENU SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Main_CGS { public partial class Artists : Form { public Artists() { InitializeComponent(); } private void Artists_Load(object sender, EventArgs e) { } private void Add_Artist_bt_Click(object sender, EventArgs e)
  • 16. Page | 17 { this.Hide(); Add_Artist adarts = new Add_Artist(); adarts.ShowDialog(); } private void Update_Artists_bt_Click(object sender, EventArgs e) { this.Hide(); Update_Artists uparts = new Update_Artists(); uparts.ShowDialog(); } private void Report_Artists_bt_Click(object sender, EventArgs e) { this.Hide(); Report_AT atrs = new Report_AT(); atrs.ShowDialog(); } private void button4_Click(object sender, EventArgs e) { this.Close(); this.Dispose(); MAIN_MENU mm = new MAIN_MENU(); mm.ShowDialog(); } } }
  • 17. Page | 18 C U R A T O R M E N U Figure 6 CURATOR MENU SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Main_CGS { public partial class Curators : Form { public Curators() { InitializeComponent(); } private void Add_Curator_bt_Click(object sender, EventArgs e) { this.Hide(); Add_Curator cus = new Add_Curator(); cus.ShowDialog(); }
  • 18. Page | 19 private void Update_Curators_bt_Click(object sender, EventArgs e) { this.Hide(); Update_Curators upcus = new Update_Curators(); upcus.ShowDialog(); } private void Reports_Curators_bt_Click(object sender, EventArgs e) { this.Hide(); Report_CU curats = new Report_CU(); curats.ShowDialog(); } private void Exit_Curators_bt_Click(object sender, EventArgs e) { this.Close(); this.Dispose(); MAIN_MENU mm = new MAIN_MENU(); mm.ShowDialog(); } private void Curators_Load(object sender, EventArgs e) { } } }
  • 19. Page | 20 A D D A R T P I E C E Figure 7 ADD ART PIECE SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Add_Art_Piece : Form { public Add_Art_Piece() { InitializeComponent(); } private void Add_Art_Piece_Clear_Click(object sender, EventArgs e) { ART_TITLE.Text = ""; ART_ID.Text = "";
  • 20. Page | 21 ARTIST_NAME.Text = ""; ARTIST_ID.Text = ""; CURATOR_ID.Text = ""; CURATOR_NAME.Text = ""; ESTIMATED_PRICE.Text = ""; ART_TITLE.Focus(); } private void Add_Art_Piece_bt_Click(object sender, EventArgs e) { SqlConnection apcon = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"); apcon.Open(); SqlCommand acmd = new SqlCommand("insert into ART_PIECE(ART_TITLE, ART_ID, ARTIST_NAME, ARTIST_ID, CURATOR_ID, CURATOR_NAME, ESTIMATED_PRICE, STATUS)values('"+ART_TITLE.Text+"','"+ART_ID.Text+"','"+ARTIST_NAME+"','"+ARTIST_I D.Text+"','"+CURATOR_ID.Text+"','"+CURATOR_NAME.Text+"','"+ESTIMATED_PRICE.Text+"' )",apcon); acmd.ExecuteNonQuery(); apcon.Close(); MessageBox.Show(" ART PIECE Data Added "); } public static void main(string[] args) { Application.Run(new Add_Art_Piece() ); } private void Add_Art_Piece_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Art_Piece aps = new Art_Piece(); aps.ShowDialog(); } private void Add_Art_Piece_Load(object sender, EventArgs e) { } } }
  • 21. Page | 22 A D D A R T I S T Figure 8 ADD ARTIST SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Add_Artist : Form { public Add_Artist() { InitializeComponent(); } private void Add_Artist_Exit_Click(object sender, EventArgs e) { this.Hide(); Artists arts = new Artists(); arts.ShowDialog(); } private void Add_Artist_Clear_Click(object sender, EventArgs e)
  • 22. Page | 23 { Add_Artist_Name.Text = ""; Add_Artist_ID.Text = ""; Art_Title.Text = ""; Curator_Name_AT.Text = ""; Curator_ID.Text = ""; Add_Artist_Name.Focus(); } private void Add_Artist_bt_Click(object sender, EventArgs e) { SqlConnection acon = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"); acon.Open(); SqlCommand cmd = new SqlCommand("insert into ARTISTS(ARTIST_NAME, ARTIST_ID, ART_TITLE, CURATOR_ID, CURATOR_NAME)values('"+Add_Artist_ID.Text+"','"+Add_Artist_Name.Text+"','"+Art_Tit le.Text+ "','"+Curator_ID.Text+"','"+Curator_Name_AT.Text+"')",acon); cmd.ExecuteNonQuery(); acon.Close(); MessageBox.Show("ARTIST Added"); } private void Add_Artist_Load(object sender, EventArgs e) { } } }
  • 23. Page | 24 A D D C U R A T O R Figure 9 ADD CURATOR SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Add_Curator : Form { public Add_Curator() { InitializeComponent(); } private void Add_Curator_Load(object sender, EventArgs e) { } private void Add_Curator_Clear_bt_Click(object sender, EventArgs e)
  • 24. Page | 25 { Add_Curator_Name_CU.Text = ""; Add_Curator_ID_CU.Text = ""; Add_Artist_CU.Text = ""; Curator_COM.Text = ""; Add_Curator_Name_CU.Focus(); } private void Add_Curator_bt_Click(object sender, EventArgs e) { SqlConnection ccon = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"); ccon.Open(); SqlCommand cmd = new SqlCommand("insert into CURATOR_AUTHENTIC_USERS(CURATOR_ID, CURATOR_NAME, USER_NAME, PASSWORD, ARTIST_ASSIGNED, CURATOR_COMMISSION) values ('"+Add_Curator_Name_CU.Text + "','" + Add_Curator_ID_CU.Text + "','"+Add_Artist_CU.Text+"','"+Curator_COM.Text+"')", ccon); cmd.ExecuteNonQuery(); ccon.Close(); MessageBox.Show("Record Added"); } private void Add_Curator_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Curators cus = new Curators(); cus.ShowDialog(); } private void Add_Artist_CU_TextChanged(object sender, EventArgs e) { } private void Add_Curator_Load_1(object sender, EventArgs e) { } } }
  • 25. Page | 26 S E L L A R T P I E C E Figure 10 SELL ART PIECE SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Main_CGS { public partial class Sell_Art_Piece : Form { public Sell_Art_Piece() { InitializeComponent(); } private void Sell_Art_Piece_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'cGSDataSet4.ART_PIECE' table. You can move, or remove it, as needed. this.aRT_PIECETableAdapter.Fill(this.cGSDataSet4.ART_PIECE); } private void Sell_bt_Click(object sender, EventArgs e) { // Event not required for this project but presented herewith float SP; float EP; SP = 0.00F; EP = 0.00F; SP = Int32.Parse(Sale_Price.Text); EP = Int32.Parse(listBox5.Text); //string Status = ""; if (SP > EP) { SqlConnection scon = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"); scon.Open(); SqlCommand cmd = new SqlCommand("insert into ART_PIECE(SALE_PRICE)value('"+Add_Sale_Price.Text+"')", scon);
  • 26. Page | 27 cmd.ExecuteNonQuery(); scon.Close(); MessageBox.Show(" Art Piece SOLD "); } else { MessageBox.Show("Not A Profitable Transaction, Selling Price less than Estimated"); } } private void Sell_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Art_Piece aps = new Art_Piece(); aps.ShowDialog(); } private void bindingSource1_CurrentChanged(object sender, EventArgs e) { } } }
  • 27. Page | 28 U P D A T E A R T I S T Figure 11 UPDATE ARTISTS SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Update_Artists : Form { SqlConnection con; SqlDataAdapter adap; DataSet ds; public Update_Artists() { InitializeComponent(); } private void Update_Artist_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Artists arts = new Artists(); arts.ShowDialog(); } private void panel1_Paint(object sender, PaintEventArgs e) { } private void Update_Artists_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'cGSDataSet7.ARTISTS' table. You can move, or remove it, as needed. this.aRTISTSTableAdapter.Fill(this.cGSDataSet7.ARTISTS); try { con = new SqlConnection(); con.ConnectionString = @"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True";
  • 28. Page | 29 con.Open(); adap = new SqlDataAdapter("Select * from ARTISTS", con); ds = new System.Data.DataSet(); adap.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; } catch (Exception ex) { MessageBox.Show("Error", ex.Message); } } private void Update_bt_Click(object sender, EventArgs e) { try { if (this.dataGridView1.SelectedRows.Count > 0) { dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index); } MessageBox.Show("Record Deleted", "Update Artists", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception exp) { MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
  • 29. Page | 30 U P D A T E A R T P I E C E Figure 12 UPDATE ART PIECE SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Update_Artist_Piece : Form { SqlConnection acon; SqlDataAdapter aadap; DataSet das; //SqlCommandBuilder cmdbuilder; public Update_Artist_Piece() { InitializeComponent(); } private void Update_Art_Piece_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Art_Piece aps = new Art_Piece(); aps.ShowDialog(); } private void Update_Artist_Piece_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'cGSDataSet6.ART_PIECE' table. You can move, or remove it, as needed. this.aRT_PIECETableAdapter3.Fill(this.cGSDataSet6.ART_PIECE); try { acon = new SqlConnection(); acon.ConnectionString = @"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"; acon.Open(); aadap = new SqlDataAdapter("Select * FROM ART_PIECE", acon); das = new System.Data.DataSet(); aadap.Fill(das); dataGridView1.DataSource = das.Tables[0];
  • 30. Page | 31 } catch (Exception exp) { MessageBox.Show("Error", exp.Message); } } private void Update_Artist_Bt_Click(object sender, EventArgs e) { try { if (this.dataGridView1.SelectedRows.Count > 0) { dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index); } //cmdbuilder = new SqlCommandBuilder(aadap); //aadap.Update(das, "Update Art Pieces"); MessageBox.Show("Record Deleted", "Update Art Pieces", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception exp) { MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
  • 31. Page | 32 U P D A T E C U R A T O R Figure 13 UPDATE CURATORS SCREEN using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Main_CGS { public partial class Update_Curators : Form { SqlConnection ccon; SqlDataAdapter cadap; DataSet cds; //SqlCommandBuilder cmdbuilder; public Update_Curators() { InitializeComponent(); } private void Update_Curators_Load(object sender, EventArgs e) { this.cURATOR_AUTHENTIC_USERSTableAdapter.Fill(this.cGSDataSet10.CURATOR_AUTHENTIC_ USERS); try { ccon = new SqlConnection(); ccon.ConnectionString = @"Data Source=.SQLEXPRESS;AttachDbFilename='C:UsersGCdocumentsvisual studio 2010ProjectsMain_CGSMain_CGSCGS.mdf';Integrated Security=True;User Instance=True"; ccon.Open(); cadap = new SqlDataAdapter("SELECT * FROM CURATOR_AUTHENTIC_USERS", ccon); cds = new System.Data.DataSet(); cadap.Fill(cds, "CURATORS"); dataGridView1.DataSource = cds.Tables[0]; } catch (Exception ex) {
  • 32. Page | 33 MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } } private void Update_Curator_Exit_bt_Click(object sender, EventArgs e) { this.Hide(); Curators cus = new Curators(); cus.ShowDialog(); } private void button1_Click(object sender, EventArgs e) { try { if (this.dataGridView1.SelectedRows.Count > 0) { dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index); } MessageBox.Show("Record Deleted", "Update Curators", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception exp) { MessageBox.Show(exp.Message,"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } } }
  • 33. Page | 34 R E P O R T A R T P I E C E using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace Main_CGS { public partial class Report_AP : Form { public Report_AP() { InitializeComponent(); } private void Exit_Click(object sender, EventArgs e) // to Exit the Screen { this.Hide(); this.Dispose(); ArtPiece aps = new ArtPiece(); aps.ShowDialog(); } private void Report_AP_Load(object sender, EventArgs e) { string[] row; //initializing the variables row and listview ListViewItem lvi; try { StreamReader sr2 = new StreamReader(@"C:VB2010_GCMain_CGSMain_CGSArt_Piece.txt"); // specifing path and source String LineAC = sr2.ReadLine(); while (LineAC != null) // while text file rows are not empty perform addition of items into ListView columns into list View separated by "," for columns - via "for" loop { row= LineAC.Split(','); lvi = new ListViewItem(row[0]); listView1.Items.Add(lvi); for (int i = 0; i < row.Length; i++) { lvi.SubItems.Add(row[i]); } LineAC = sr2.ReadLine(); }
  • 34. Page | 35 } catch (Exception exp) // return error message on null { MessageBox.Show("Error : " + exp.Message); } } } }
  • 35. Page | 36 R E P O R T A R T I S T using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace Main_CGS { public partial class Report_AT : Form { public Report_AT() { InitializeComponent(); } private void Exit_Click(object sender, EventArgs e) // to Exit the Screen { this.Hide(); this.Dispose(); Artists aps = new Artists(); ats.ShowDialog(); } private void Report_AT_Load(object sender, EventArgs e) { string[] row; //initializing the variables row and listview ListViewItem lvi; try { StreamReader sr1 = new StreamReader(@"C:VB2010_GCMain_CGSMain_CGSArtist.txt"); // specifing path and source String LineAC = sr1.ReadLine(); while (LineAC != null) // while text file rows are not empty perform addition of items into ListView columns into list View separated by "," for columns - via "for" loop { row= LineAC.Split(','); lvi = new ListViewItem(row[0]); listView1.Items.Add(lvi); for (int i = 0; i < row.Length; i++) { lvi.SubItems.Add(row[i]); } LineAC = sr1.ReadLine(); }
  • 36. Page | 37 } catch (Exception exp) // return error message on null { MessageBox.Show("Error : " + exp.Message); } } } }
  • 37. Page | 38 R E P O R T C U R A T O R S using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace Main_CGS { public partial class Report_CU : Form { public Report_CU() { InitializeComponent(); } private void Exit_Click(object sender, EventArgs e) // to Exit the Screen { this.Hide(); this.Dispose(); Curators aps = new Curators(); aps.ShowDialog(); } private void Report_CU_Load(object sender, EventArgs e) { string[] row; //initializing the variables row and listview ListViewItem lvi; try { StreamReader sr3 = new StreamReader(@"C:VB2010_GCMain_CGSMain_CGSCurators.txt"); // specifing path and source String LineAC = sr3.ReadLine(); while (LineAC != null) // while text file rows are not empty perform addition of items into ListView columns into list View separated by "," for columns - via "for" loop { row= LineAC.Split(','); lvi = new ListViewItem(row[0]); listView1.Items.Add(lvi); for (int i = 0; i < row.Length; i++) { lvi.SubItems.Add(row[i]); } LineAC = sr3.ReadLine(); }
  • 38. Page | 39 } catch (Exception exp) // return error message on null { MessageBox.Show("Error : " + exp.Message); } } } }
  • 39. Page | 40 SECTION 3: DATA TABLES
  • 40. Page | 41 D A T A S T R I N G S A N D T A B L E I D A. ART PIECE DATA TABLE SQL STRING: Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated Security=True;User Instance=True TABLE NAME: ART_PIECE B. ARTIST DATA TABLE SQL STRING: Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated Security=True;User Instance=True TABLE NAME: ARTISTS C. CURATORS / AUTHENTIC USERS DATA TABLE SQL STRING: Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CGS.mdf;Integrated Security=True;User Instance=True TABLE NAME: CURATORS_AUTHENTIC_USERS
  • 41. Page | 42 CONCLUSION Presented herewith are the C Sharp programming codes for the system in brief and the requirements to improve and develop business solutions for the Computerized Gallery Systems by Object oriented approach to achieve the desired results As stated earlier there are ample scopes for more detailed new system definition and design that could be discussed and tasks could be assigned for further developments to optimize the operational efficiency of Computerized Gallery Systems