Cis 407 a Ilab 4 of 7

In: Computers and Technology

Submitted By aleximimic
Words 1341
Pages 6
HELPIDO.COM

-------------------------------------------------------------

FOLLOW THE LINK TO GET THE TUTORIAL

HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5

-------------------------------------------------------------

CIS 407 A ILAB 4 OF 7
________________________________________

STEP 1: Data Layer (10 points)
 Open Microsoft Visual Studio.NET 2008.
 Click the ASP.NET project called PayrollSystem to open it.
 Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here command.CommandType = CommandType.Text; command.CommandText = strSQL; // Add your comments here command.ExecuteNonQuery(); // Add your comments here conn.Close(); recordSaved = true; } catch (Exception ex) { recordSaved = false; } return recordSaved; }
 In the frmPersonnelVerified form, go…...

Similar Documents

Cis407,Cis/407,Cis 407,Cis/407 Ilab 4 of 7,Cis407 Ilab 4 of 7,Cis 407 Ilab 4 of 7

...---------------------------------------------------- http://helpido.com/category/cis-407/ ---------------------------------------------------- CIS 407 A ILAB 5 OF 7 This week, we will use the .NET OleDbTransaction functions to either commit a set of changes to the database, if all of them were done correctly, or to roll back all of the changes if there was an error in any one of them. We will first modify the code we created last week so that it saves personnel data in the database in two steps; first by inserting a personnel record for a new employee, and then by updating that record to fill in the start and end dates. This two-step approach is not really needed in this simple case, but we will use it to simulate a more complex database transaction that would have to be done in multiple steps, such as one involving more than one table or even more than one database. We will then see what happens when there is an error in the second operation (the update), allowing a record to be created containing incomplete information–not a good result! We will fix the problem by wrapping both operations (the insert and the update) into a single transaction that will be committed (made permanent) only if both operations succeed or that will be rolled back (undone) if either operation fails. We will also add client-side validation using the ASP.Net validation controls, and we will allow the user an easy way to edit all employees. Instructions for Week 5 iLab: “Transaction......

Words: 2397 - Pages: 10

Cis407,Cis/407,Cis 407,Cis/407 Ilab 7 of 7,Cis407 Ilab 7 of 7,Cis 407 Ilab 7 of 7

...HELPIDO.COM FOLLOW THIS LINK TO GET THE TUTORIAL ---------------------------------------------------- http://helpido.com/category/cis-407/ ---------------------------------------------------- CIS 407 A ILAB 7 OF 7 Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted. Consult with your instructor before submitting if an error occurs or......

Words: 1714 - Pages: 7

Cis 407 a Ilab 4 of 7

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5 ------------------------------------------------------------- CIS 407 A ILAB 4 OF 7 ________________________________________ STEP 1: Data Layer (10 points)  Open Microsoft Visual Studio.NET 2008.  Click the ASP.NET project called PayrollSystem to open it.  Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here ......

Words: 1341 - Pages: 6

Cis 407 a Ilab 4 of 7

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5 ------------------------------------------------------------- CIS 407 A ILAB 4 OF 7 ________________________________________ STEP 1: Data Layer (10 points)  Open Microsoft Visual Studio.NET 2008.  Click the ASP.NET project called PayrollSystem to open it.  Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here ......

Words: 1341 - Pages: 6

Cis 407 a Ilab 5 of 7

...HTTP://HELPIDO.COM/CIS-407-ILAB-5-OF-7/#5 ----------------------------------------------------------------- CIS 407 A ILAB 5 OF 7 ________________________________________ This week, we will use the .NET OleDbTransaction functions to either commit a set of changes to the database, if all of them were done correctly, or to roll back all of the changes if there was an error in any one of them. We will first modify the code we created last week so that it saves personnel data in the database in two steps; first by inserting a personnel record for a new employee, and then by updating that record to fill in the start and end dates. This two-step approach is not really needed in this simple case, but we will use it to simulate a more complex database transaction that would have to be done in multiple steps, such as one involving more than one table or even more than one database. We will then see what happens when there is an error in the second operation (the update), allowing a record to be created containing incomplete information–not a good result! We will fix the problem by wrapping both operations (the insert and the update) into a single transaction that will be committed (made permanent) only if both operations succeed or that will be rolled back (undone) if either operation fails. We will also add client-side validation using the ASP.Net validation controls, and we will allow the user an easy way to edit all employees. Instructions for Week 5 iLab: “Transaction......

Words: 2448 - Pages: 10

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Cis 407 a Ilab 4 of 7

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5 ------------------------------------------------------------- CIS 407 A ILAB 4 OF 7 ________________________________________ STEP 1: Data Layer (10 points)  Open Microsoft Visual Studio.NET 2008.  Click the ASP.NET project called PayrollSystem to open it.  Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here ......

Words: 1341 - Pages: 6

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Cis 407 a Ilab 4 of 7

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5 ------------------------------------------------------------- CIS 407 A ILAB 4 OF 7 ________________________________________ STEP 1: Data Layer (10 points)  Open Microsoft Visual Studio.NET 2008.  Click the ASP.NET project called PayrollSystem to open it.  Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here ......

Words: 1341 - Pages: 6

Cis 407 a Ilab 4 of 7

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-4-OF-7/#5 ------------------------------------------------------------- CIS 407 A ILAB 4 OF 7 ________________________________________ STEP 1: Data Layer (10 points)  Open Microsoft Visual Studio.NET 2008.  Click the ASP.NET project called PayrollSystem to open it.  Open the clsDataLayer class and add the following function: // This function saves the personnel data public static bool SavePersonnel(string Database, string FirstName, string LastName, string PayRate, string StartDate, string EndDate) { bool recordSaved; try { // Add your comments here OleDbConnection conn = new OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;” + “Data Source=” + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; // Add your comments here strSQL = “Insert into tblPersonnel ” + “(FirstName, LastName, PayRate, StartDate, EndDate) values (‘” + FirstName + “‘, ‘” + LastName + “‘, ” + PayRate + “, ‘” + StartDate + “‘, ‘” + EndDate + “‘)”; // Add your comments here ......

Words: 1341 - Pages: 6

Cis 407 a Ilab 5 of 7

...HTTP://HELPIDO.COM/CIS-407-ILAB-5-OF-7/#5 ----------------------------------------------------------------- CIS 407 A ILAB 5 OF 7 ________________________________________ This week, we will use the .NET OleDbTransaction functions to either commit a set of changes to the database, if all of them were done correctly, or to roll back all of the changes if there was an error in any one of them. We will first modify the code we created last week so that it saves personnel data in the database in two steps; first by inserting a personnel record for a new employee, and then by updating that record to fill in the start and end dates. This two-step approach is not really needed in this simple case, but we will use it to simulate a more complex database transaction that would have to be done in multiple steps, such as one involving more than one table or even more than one database. We will then see what happens when there is an error in the second operation (the update), allowing a record to be created containing incomplete information–not a good result! We will fix the problem by wrapping both operations (the insert and the update) into a single transaction that will be committed (made permanent) only if both operations succeed or that will be rolled back (undone) if either operation fails. We will also add client-side validation using the ASP.Net validation controls, and we will allow the user an easy way to edit all employees. Instructions for Week 5 iLab:......

Words: 2448 - Pages: 10

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Cis 407 a Ilab 7 of 7

...HELPIDO.COM ---------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL HTTP://HELPIDO.COM/CIS-407-ILAB-7-OF-7/#5 ---------------------------------------------------------------- CIS 407 A ILAB 7 OF 7 ________________________________________ Scenario/Summary In this lab, we will incorporate error handling into the login process so that a notice of each invalid login is automatically e-mailed to the technical support staff. Instruction to Week 7 iLab: Error Notification via E-MailClick on the link above to view the tutorial.Please watch this tutorial before beginning the iLab. The tutorial has audio. Deliverables When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the addressrecipient@recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox. NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted.......

Words: 1735 - Pages: 7

Most favorite | Still Open All Hours Season 5 Episode 3 | Jikan no Shihaisha