Skip to content

Commit

Permalink
Fixed stock adding bug, prevented adding stock of products which don'…
Browse files Browse the repository at this point in the history
…t exist
  • Loading branch information
InvertedLlama committed Apr 25, 2012
1 parent 1befe60 commit 850f9ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 22 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 21 additions & 20 deletions Phase 3 - Implementation/PPSDPart2/Forms/frmMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Phase 3 - Implementation/PPSDPart2/Forms/frmMain.Staff.cs
Expand Up @@ -194,6 +194,8 @@ private void btnStaffPasswordSet_Click(object sender, EventArgs e)
if (!txtStaffPassword.Text.Equals(txtStaffRepeatPassword.Text))
{
MessageBox.Show(this, "Passwords do not match", "Password mismatch", MessageBoxButtons.OK, MessageBoxIcon.Stop);
txtStaffPassword.Text = "";
txtStaffRepeatPassword.Text = "";
return;
}
if (!muser.canModify)
Expand All @@ -211,7 +213,8 @@ private void btnStaffPasswordSet_Click(object sender, EventArgs e)
"SET password=\"{0}\"\n" +
"WHERE staffID = {1}",
txtStaffPassword.Text, staffData["staffID"]);

txtStaffPassword.Text = "";
txtStaffRepeatPassword.Text = "";
if (mDatabase.runCommandQuery(insertQuery))
{
mDatabase.selectData("SELECT * FROM Staff", ref dtbStaff);
Expand All @@ -221,7 +224,7 @@ private void btnStaffPasswordSet_Click(object sender, EventArgs e)
}
else
MessageBox.Show(this, "Failed to apply changes", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
}
Binary file modified Phase 3 - Implementation/PPSDPart2/PPSDPart2.suo
Binary file not shown.
Binary file modified Phase 3 - Implementation/PPSDPart2/bin/Debug/PPSDPart2.exe
Binary file not shown.
Binary file modified Phase 3 - Implementation/PPSDPart2/bin/Debug/PPSDPart2.pdb
Binary file not shown.
Binary file not shown.
Binary file modified Phase 3 - Implementation/PPSDPart2/obj/x86/Debug/PPSDPart2.exe
Binary file not shown.
Binary file modified Phase 3 - Implementation/PPSDPart2/obj/x86/Debug/PPSDPart2.pdb
Binary file not shown.

0 comments on commit 850f9ac

Please sign in to comment.