Esempio n. 1
0
        private void checkNewJob()
        {
            if ((txtEmployer.Text != Employer || txtJob.Text != Job) && txtJob.Text != "")
            {
                clsDB     objDB     = new clsDB(strDB);
                clsFormat objFormat = new clsFormat();

                string strInsert = "Insert Into Job(Title, Description, Employer, Address,City, Zip,PlacementDate,Consumer_ID)";
                string strValues = " Values('" + txtJob.Text + "','" + objFormat.removeApostrophe(txtDescription.Text) + "','" + objFormat.removeApostrophe(txtEmployer.Text) + "','" + txtAddress.Text + "'";
                strValues = strValues + ",'" + txtCity.Text + "','" + objFormat.formatZip(txtZip.Text) + "'," + objFormat.formatDate(txtPlacement.Text) + "," + ID + ")";

                objDB.assignJob(strInsert + strValues);

                // logic to email Kristen.
                clsEmail objEmail = new clsEmail();
                objEmail.MailInfo("*****@*****.**", txtConsumer.Text);
            }
        }
Esempio n. 2
0
        private void addJob()
        {
            clsDB objDB = new clsDB(resPinnacle.liveDB);

            string strInsert = "Insert Into Job(Title, Description, Employer, Address,City, Zip,PlacementDate,ExtendedDate, Consumer_ID)";
            string strValues = " Values('" + txtJob.Text + "','" + removeApostrophe(txtDescription.Text) + "','" + removeApostrophe(txtEmployer.Text) + "','" + txtAddress.Text + "'";

            strValues = strValues + ",'" + txtCity.Text + "','" + formatZip(txtZip.Text) + "'," + formatDate(txtPlacement.Text) + "," + formatDate(txtExtended.Text) + ",'" + ID + "')";

            int Rows = objDB.assignJob(strInsert + strValues);

            if (Rows == 1)
            {
                MessageBox.Show(txtConsumer.Text + " was assigned a new job.");
            }
            else
            {
                MessageBox.Show("The system was not able to assign a job, please contact IT if problem persists");
            }

            CancelControl("assignJob");
        }
Esempio n. 3
0
        private void editJob()
        {
            clsDB objDB = new clsDB(resPinnacle.liveDB);

            string strInsert = "Update Job";
            string strValues = " Set Title = '" + txtJob.Text + "', Description = '" + removeApostrophe(txtDescription.Text) + "', Employer = '" + removeApostrophe(txtEmployer.Text) + "'";

            strValues = strValues + ", Address = '" + txtAddress.Text + "', City = '" + txtCity.Text + "', Zip = '" + formatZip(txtZip.Text) + "'";
            strValues = strValues + ", PlacementDate = " + formatDate(txtPlacement.Text) + ", ExtendedDate = " + formatDate(txtExtended.Text);
            string strWhere = " Where ID = '" + JobID + "'";
            int    Rows     = objDB.assignJob(strInsert + strValues + strWhere);

            if (Rows == 1)
            {
                MessageBox.Show(txtConsumer.Text + "'s job was updated.");
            }
            else
            {
                MessageBox.Show("The system was not able to edit the current job, please contact IT if problem persists");
            }

            CancelControl("assignJob");
        }