Пример #1
0
        protected void lbApply_Click(object sender, EventArgs e)
        {
            Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job();
            job.AddSubstituteToJob(jobId, substituteId);
            lbApply.Enabled = false;

            Miami.Substitute.Bll.NoticeSystem noticeSystem = new Miami.Substitute.Bll.NoticeSystem(jobId, Miami.Substitute.Bll.NoticeSystem.NoticeType.JobAppliedForBySubstitute, Micajah.Common.Security.UserContext.Current.UserId, 0);
            noticeSystem.Send();

            Response.Redirect("SearchOpenJobs.aspx");
        }
Пример #2
0
        protected void JobList_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
        {
            int jobId; int.TryParse(JobList.DataKeys[e.RowIndex].Value.ToString(), out jobId);
            Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();
            substitute.LoadByUserId();
            job.DeleteSubstituteFromJob(jobId, substitute.SubstituteId);

            Miami.Substitute.Bll.NoticeSystem noticeSystem = new Miami.Substitute.Bll.NoticeSystem(jobId, Miami.Substitute.Bll.NoticeSystem.NoticeType.AcceptedJobCancelledBySubstitute, Micajah.Common.Security.UserContext.Current.UserId, 0);
            noticeSystem.Send();

            Response.Redirect("Default.aspx");
        }
Пример #3
0
        protected void JobList_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
        {
            int jobId; int.TryParse(JobList.DataKeys[e.RowIndex].Value.ToString(), out jobId);

            Miami.Substitute.Bll.Job        job        = new Miami.Substitute.Bll.Job();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();
            substitute.LoadByUserId();
            job.DeleteSubstituteFromJob(jobId, substitute.SubstituteId);

            Miami.Substitute.Bll.NoticeSystem noticeSystem = new Miami.Substitute.Bll.NoticeSystem(jobId, Miami.Substitute.Bll.NoticeSystem.NoticeType.AcceptedJobCancelledBySubstitute, Micajah.Common.Security.UserContext.Current.UserId, 0);
            noticeSystem.Send();

            Response.Redirect("Default.aspx");
        }
Пример #4
0
        protected void lbCancel_Click(object sender, EventArgs e)
        {
            Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job();
            job.LoadByPrimaryKeyBase(jobId);
            if (job.m_statusId == 2)
            {
                Miami.Substitute.Bll.NoticeSystem noticeSystem = new Miami.Substitute.Bll.NoticeSystem(jobId, Miami.Substitute.Bll.NoticeSystem.NoticeType.AcceptedJobCancelledBySubstitute, Micajah.Common.Security.UserContext.Current.UserId, 0);
                noticeSystem.Send();
            }

            job.DeleteSubstituteFromJob(jobId, substituteId);
            lbApply.Enabled = true;

            Response.Redirect("SearchOpenJobs.aspx");
        }