Skip to content

Commit

Permalink
getting rid off unused event calls
Browse files Browse the repository at this point in the history
Getting rid off unused event calls and refactoring reset function.
  • Loading branch information
nazimamin committed Sep 1, 2014
1 parent 7dd8675 commit 2b1b73b
Show file tree
Hide file tree
Showing 16 changed files with 298 additions and 317 deletions.
2 changes: 1 addition & 1 deletion Hotel_Manager/bin/Debug/Hotel_Manager.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Nq8ItaOzLRfhcBTuPhEL4MUEbhspWq83f0tYBX9eHAU=</dsig:DigestValue>
<dsig:DigestValue>HAtwp2/NEj1GLo5ad3Tmtt8CnmNLepbQEtZ82SnTroM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Hotel_Manager/bin/Debug/Hotel_Manager.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions Hotel_Manager/bin/Debug/Hotel_Manager.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6642688">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6641664">
<assemblyIdentity name="Hotel_Manager" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>oRhfLLzZioE6/PECkgxHJJljCSMDYgpyPnc6YVjph0A=</dsig:DigestValue>
<dsig:DigestValue>mR886W6sUA/FoiNHprG5+snGUY+YsGMzjlB4mkEA7pM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Hotel_Manager/bin/Debug/Hotel_Manager.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Hotel_Manager/bin/Debug/Hotel_Manager.vshost.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>awSB7mPISf4Zuu2jMZZ4JHzjnbTSTSOZz2Ai5h+zdm4=</dsig:DigestValue>
<dsig:DigestValue>Nq8ItaOzLRfhcBTuPhEL4MUEbhspWq83f0tYBX9eHAU=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
8 changes: 4 additions & 4 deletions Hotel_Manager/bin/Debug/Hotel_Manager.vshost.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6643200">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6642688">
<assemblyIdentity name="Hotel_Manager" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>zQJejS2NLCvakQ3pceihe0MzTLfSkpDV1O2wPtwNCq0=</dsig:DigestValue>
<dsig:DigestValue>oRhfLLzZioE6/PECkgxHJJljCSMDYgpyPnc6YVjph0A=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down Expand Up @@ -146,7 +146,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>DNkwQMCn17OKRr35aH7ArYZ6Fhh+tmc9vzqmscyLs7k=</dsig:DigestValue>
<dsig:DigestValue>KMFg/TgZmOqged8FdHovt+ikKbYeagaoC77/RQUp+FM=</dsig:DigestValue>
</hash>
</file>
<file name="login_manager_log.ldf" size="802816" writeableType="applicationData">
Expand All @@ -155,7 +155,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>C7nc7c453XgzIxNSDO2KouCsd9PdNK/xKqtMbhhq6O4=</dsig:DigestValue>
<dsig:DigestValue>XScNna1wfvUJR18RCp719NNyOFrjV2YMmOki1V5oN30=</dsig:DigestValue>
</hash>
</file>
</asmv1:assembly>
Binary file modified Hotel_Manager/bin/Debug/frontend_reservation.mdf
Binary file not shown.
Binary file modified Hotel_Manager/bin/Debug/frontend_reservation_log.ldf
Binary file not shown.
Binary file modified Hotel_Manager/bin/Debug/login_manager_log.ldf
Binary file not shown.
536 changes: 267 additions & 269 deletions Hotel_Manager/kitchen.Designer.cs

Large diffs are not rendered by default.

57 changes: 20 additions & 37 deletions Hotel_Manager/kitchen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,25 @@ namespace Hotel_Manager
{
public partial class kitchen : MetroForm
{
string cleaning, towel, surprise;
int breakfast, lunch, dinner, foodBill;
public Int32 primaryID;
double totalBill;
bool supply_status = false;


public kitchen()
{
InitializeComponent();

}
SqlConnection connection = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Nazim\documents\visual studio 2013\Projects\Hotel_Manager\Hotel_Manager\frontend_reservation.mdf;Integrated Security=True");
SqlConnection connection = new SqlConnection(Hotel_Manager.Properties.Settings.Default.frontend_reservationConnectionString);
private void kitchen_Load(object sender, EventArgs e)
{
LoadForDataGridView();
listBoxFromDataBase();
}

private void kitchen_FormClosing(object sender, FormClosingEventArgs e)
{
Application.Exit();
}
string cleaning, towel, surprise;
int breakfast, lunch, dinner, foodBill;
public Int32 primaryID;
double totalBill;
bool supply_status = false;

private void LoadForDataGridView()
{
if (connection.State != ConnectionState.Open)
Expand Down Expand Up @@ -68,32 +65,19 @@ private void LoadForDataGridView()
}
}

private void metroTabPage1_Click(object sender, EventArgs e)
private void resetEntries(Control controls)
{

}
private void resetEntries()
{
Action<Control.ControlCollection> func = null;

func = (controls) =>
foreach (Control control in controls.Controls)
{
foreach (Control control in controls)
if (control is TextBox)
{
if (control is TextBox)
{
(control as TextBox).Clear();
}
else
func(control.Controls);
if (control is CheckBox)
{
(control as CheckBox).Checked = false;
}
((TextBox)control).Clear();
}
};

func(Controls);
if (control.HasChildren)
{
resetEntries(control);
}
}

}
private void listBoxFromDataBase()
Expand Down Expand Up @@ -144,7 +128,7 @@ private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
if (connection.State != ConnectionState.Open)
{
connection.Close();
resetEntries();
resetEntries(this);
string getQuerystring = listBox1.Text.Substring(0, 4).Replace(" ", string.Empty);
//MessageBox.Show("ID+" + getQuerystring);
string query = "Select * from reservation where Id= '" + getQuerystring + "'";
Expand Down Expand Up @@ -353,10 +337,9 @@ private void metroCheckBox2_CheckedChanged(object sender, EventArgs e)
metroCheckBox3.Text = "Surprised";
supply_status = true;
}

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
private void kitchen_FormClosing(object sender, FormClosingEventArgs e)
{

Application.Exit();
}

}
Expand Down
2 changes: 1 addition & 1 deletion Hotel_Manager/obj/Debug/Hotel_Manager.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Nq8ItaOzLRfhcBTuPhEL4MUEbhspWq83f0tYBX9eHAU=</dsig:DigestValue>
<dsig:DigestValue>HAtwp2/NEj1GLo5ad3Tmtt8CnmNLepbQEtZ82SnTroM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Binary file modified Hotel_Manager/obj/Debug/Hotel_Manager.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions Hotel_Manager/obj/Debug/Hotel_Manager.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6642688">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Hotel_Manager.exe" size="6641664">
<assemblyIdentity name="Hotel_Manager" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>oRhfLLzZioE6/PECkgxHJJljCSMDYgpyPnc6YVjph0A=</dsig:DigestValue>
<dsig:DigestValue>mR886W6sUA/FoiNHprG5+snGUY+YsGMzjlB4mkEA7pM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Hotel_Manager/obj/Debug/Hotel_Manager.pdb
Binary file not shown.

0 comments on commit 2b1b73b

Please sign in to comment.