Esempio n. 1
0
        /// <summary>
        /// Handles the ItemCommand event of the gridJobFind control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void gridJob_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            try
              {
            string[] args = e.CommandArgument.ToString().Split('#');
            if (args.Length != 2) return;
            string jobId = args[0];
            string sender = args[1];
            Guid jobGuid = new Guid(jobId);
            if (e.CommandName.ToLower().Equals("linktojob"))
            {
              Response.Redirect(string.Format("JobFindData.aspx?jobId={0}&sender={1}", jobId, sender));
            }

            if (e.CommandName.ToLower().Equals("view"))
            {
              Response.Redirect(string.Format("JobFindData.aspx?jobId={0}&sender={1}", jobId, sender));
            }
            if (e.CommandName.ToLower().Equals("modify"))
            {
              Response.Redirect("JobFindModify.aspx?jobId=" + jobId);
            }
            if (e.CommandName.ToLower().Equals("unsubscribe"))
            {
              IJobAnswerService srvJobAnswer = ServiceFactory.GetJobAnswerService();
              JobAnswer jobAnswer = srvJobAnswer.JobAnswerSelect(jobGuid, JobAnswerTypeEnum.FIN, Context.User.Identity.Name,sender);
              if (jobAnswer != null)
            srvJobAnswer.JobAnswerDelete(jobAnswer);
              JobAnswer filter = new JobAnswer(Guid.Empty, JobAnswerTypeEnum.FIN,"","");
              filter.FilterOnIsActive = 1;
              m_answers = m_srvAnswer.JobAnswerSelectFiltered(filter);
            }
            if (e.CommandName.ToLower().Equals("subscribe"))
            {
              Response.Redirect(string.Format("JobFindAnswerCreate.aspx?jobId={0}&sender={1}", jobId, sender));
            }
            if (e.CommandName.ToLower().Equals("inactivate"))
            {
              JobFind job = m_JobSrv.JobFindSelect(jobGuid);
              job.Status = JobStatusEnum.INA;
              m_JobSrv.JobFindSetStatus(job);
            }
            ShowGrid(gridJob, 0, "Description", "Ascending");
              }
              catch (Exception ex)
              {
            errorPanel.Exception = ex;
              }
        }
 public virtual JobAnswerContainer JobAnswerSelectAll()
 {
     TraceCallEnterEvent.Raise();
       try
       {
     JobAnswerContainer result;
     DataSet entitySet = m_DataContext.ndihdJobAnswerSelectAll();
     result = new JobAnswerContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
              SetTitle(" - Saját állás keresés hirdetéseim");
              SetDefaultControls("btnFilter", "cmbAll");
              // Check permission: anybody can use this page
              PrincipalPermission permReg = new PrincipalPermission(Context.User.Identity.Name, "Registered");
              permReg.Demand();

              JobAnswer filter = new JobAnswer(Guid.Empty, JobAnswerTypeEnum.FIN, "", Context.User.Identity.Name);
              filter.FilterOnIsActive = 1;
              m_answers = m_srvAnswer.JobAnswerSelectFiltered(filter);

              if (!Page.IsPostBack)
              {
            // Fill the JobFind grid
            ShowGrid(gridJob, 0, "Description", "Ascending");
              }
        }
Esempio n. 4
0
        public JobAnswerContainer JobAnswerSelectFiltered(JobAnswer filter)
        {
            PrincipalPermission permReg = new PrincipalPermission(Thread.CurrentPrincipal.Identity.Name, "Registered");
              PrincipalPermission permAdmin = new PrincipalPermission(Thread.CurrentPrincipal.Identity.Name, "Administrator");
              permReg.Union(permAdmin).Demand();

              TraceCallEnterEvent.Raise();
              try
              {
            JobAnswerContainer result = new JobAnswerContainer();
            DataSet entitySet = m_DataContext.ndihdJobAnswerSelectFiltered(filter.JobRef,filter.Type, filter.SenderNameRef, filter.SubscriberNameRef, filter.FilterOnSenderNotificationSend, filter.FilterOnSubscriberNotificationSend, filter.Expiredate, filter.FilterOnIsActive);
            result = new JobAnswerContainer(entitySet.Tables[0]);
            TraceCallReturnEvent.Raise();
            return result;
              }
              catch (Exception ex)
              {
            ExceptionManager.Publish(ex);
            TraceCallReturnEvent.Raise(false);
            throw;
              }
        }
Esempio n. 5
0
 public virtual JobAnswerContainer SelectChildrenBySubscriberOfJobAnswer(DBString LoginNameVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     JobAnswerContainer result;
     DataSet entitySet = m_DataContext.ndihdSubscriberOfJobAnswerSelectBy(LoginNameVal);
     result = new JobAnswerContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
              SetTitle(" - Milyen keresésekre válaszoltam");

              // Check permission: anybody can use this page
              PrincipalPermission permReg = new PrincipalPermission(Context.User.Identity.Name, "Registered");
              permReg.Demand();

              JobAnswer filter = new JobAnswer(Guid.Empty, JobAnswerTypeEnum.OFF, Context.User.Identity.Name, "");
              filter.FilterOnIsActive = 1;
              m_answers = m_srvAnswer.JobAnswerSelectFiltered(filter);

              if (!Page.IsPostBack)
              {
            // Fill the JobOffer grid
            ShowGrid(gridJob, 0, "Description", "Ascending");
              }
        }