public void AddUserJob()
        {
            string jobTitle = txtNewUerJobTitle.Value;
            string jobDesc  = txtNewUserJobDesc.Value;
            string jobLoc   = txtNewUserJobLoc.Value;
            string jobExp   = txtNewUserJobExp.Value;
            string company  = txtNewUserJobCompany.Value;
            Jobs   job      = new Jobs("N", jobTitle.Trim(), jobDesc.Trim(), jobExp.Trim(), company.Trim(), jobLoc);

            job.Email = ApplicationSession.Current.user.Email;
            string adminMessage = SendEmail.BuildPostedJobAdminMail(ApplicationSession.Current.user, job);

            if (JobBO.AddJob(job, string.Empty, adminMessage, Constants.MailSubject))
            {
                AddUserJobSuccess.Visible = true;
                //Mailing Windows Service
                //SendEmail.ReceiveJobEmail(ApplicationSession.Current.user, job);
            }
            ApplicationSession.Current.Jobs.Clear();
            //FillGrid();

            //Email Needs to be sent
            //ResetControls();
        }
Esempio n. 2
0
        protected void gvPendingJobs_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row          = (GridViewRow)gvPendingJobs.Rows[e.RowIndex];
            Label       lbldeleteid  = (Label)row.FindControl("lblJobId");
            TextBox     txtJobTitle  = (TextBox)row.FindControl("txtJobTitle");
            TextBox     txtJobDesc   = (TextBox)row.FindControl("txtJobDesc");
            TextBox     txtJobExp    = (TextBox)row.FindControl("txtJobExp");
            TextBox     txtCompany   = (TextBox)row.FindControl("txtCompany");
            TextBox     txtJobLoc    = (TextBox)row.FindControl("txtJobLoc");
            TextBox     txtJobActive = (TextBox)row.FindControl("txtJobActive");

            gvPendingJobs.EditIndex = -1;
            Jobs job = new Jobs(lbldeleteid.Text.Trim(), txtJobTitle.Text.Trim(), txtJobDesc.Text.Trim(), txtJobExp.Text.Trim(), txtCompany.Text.Trim(), txtJobLoc.Text.Trim());

            job.ActiveJobs = txtJobActive.Text;
            if (JobBO.UpdateJob(job))
            {
                ApplicationSession.Current.Jobs.Clear();
                ApplicationSession.Current.PendingJobs.Clear();
                ApplicationSession.Current.PostedJobs.Clear();
            }

            FillJobGrid();
        }