Ejemplo n.º 1
0
    protected void lnkCopyApp_Click(object sender, EventArgs e)
    {
        var camperAppl = new CamperApplication();

        var redirectionLogic = new Redirection_Logic();

        string newFJCID;

        camperAppl.CopyCamperApplication(Session["FJCID"].ToString(), out newFJCID);
        redirectionLogic.PageName = (int)Redirection_Logic.PageNames.ThankYou;// Added this flag to avoid confusion of setting federation id if new app is created and set the newfederationid =0
        redirectionLogic.GetNextFederationDetails(Session["FJCID"].ToString());
        int nextFederationId = redirectionLogic.NextFederationId;

        if ((nextFederationId == 72 || nextFederationId == 93) && !String.IsNullOrEmpty(newFJCID))
        {
            camperAppl.DeleteCamperAnswerUsingFJCID(newFJCID);
        }

        if (nextFederationId == 0)
        {
            Session["FedId"] = null;
        }
        else
        {
            Session["FedId"] = nextFederationId.ToString();
        }

        Session["FJCID"]  = newFJCID;
        Session["STATUS"] = 5;



        // 2013-10-31 we must delete the codeValue Session variable
        if (redirectionLogic.BeenToPJL)
        {
            Session["codeValue"] = null;
        }

        // 2014-10-15 no one should pass to PJL now because PJL only accept JDS users but JDS users are routed to PJ Lottery already
        // all other failed applicants must
        if (redirectionLogic.NextFederationURL == "~/Enrollment/PJL/Summary.aspx")
        {
            camperAppl.UpdateFederationId(Session["FJCID"].ToString(), "0");
            redirectionLogic.NextFederationId = 0;
            Session["FedId"]     = null;
            Session["codeValue"] = null;
            Response.Redirect("Step1_NL.aspx");
        }
        else
        {
            camperAppl.UpdateFederationId(Session["FJCID"].ToString(), nextFederationId.ToString());
            Response.Redirect(redirectionLogic.NextFederationURL);
        }
    }
Ejemplo n.º 2
0
    protected void gvApplications_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "FJCID")
        {
            Session["FJCID"] = e.CommandArgument.ToString();
            //Session["CampYear"] = Session["FJCID"].ToString().Substring(0, 4);
            string strRedirURL = "";

            DataSet           dsCamperApplication;
            DataRow           drCA;
            CamperApplication oCA = new CamperApplication();
            dsCamperApplication = oCA.getCamperApplication(e.CommandArgument.ToString());
            drCA = dsCamperApplication.Tables[0].Rows[0];

            if (!string.IsNullOrEmpty(drCA["AppType"].ToString()))
            {
                if (drCA["AppType"].ToString() == "D")
                {
                    strRedirURL = "DeleteMessage.aspx";
                }
                else
                {
                    strRedirURL = ConfigurationManager.AppSettings["CamperBasicInfo"].ToString();
                }
            }
            else
            {
                strRedirURL = ConfigurationManager.AppSettings["CamperBasicInfo"].ToString();
            }

            Server.Transfer(strRedirURL);
        }
        else if (e.CommandName == "CLONE_FJCID")
        {
            string            strRedirURL = ConfigurationManager.AppSettings["CamperBasicInfo"].ToString();
            string            sOldFJCID   = e.CommandArgument.ToString();
            CamperApplication CamperAppl  = new CamperApplication();
            string            newFJCID;
            int retVal;

            retVal = CamperAppl.CopyCamperApplication(sOldFJCID, out newFJCID);

            Session["FJCID"]  = newFJCID;
            Session["STATUS"] = 5;

            // reset the session values
            Session["FEDNAME"] = null;

            Server.Transfer(strRedirURL);
        }
        else if (e.CommandName == "CheckStatus")
        {
            Session["FJCID"] = e.CommandArgument.ToString();
            string strRedirURL = "~/TrackMyStatus.aspx";
            Server.Transfer(strRedirURL);
        }
        else if (e.CommandName == "ViewApplication")
        {
            Session["FJCID"] = e.CommandArgument.ToString();
            string strRedirURL = "";

            DataSet           dsCamperApplication;
            DataRow           drCA;
            CamperApplication oCA = new CamperApplication();
            dsCamperApplication = oCA.getCamperApplication(e.CommandArgument.ToString());
            drCA = dsCamperApplication.Tables[0].Rows[0];

            if (!string.IsNullOrEmpty(drCA["AppType"].ToString()))
            {
                if (drCA["AppType"].ToString() == "D")
                {
                    strRedirURL = "DeleteMessage.aspx";
                }
                else
                {
                    strRedirURL = ConfigurationManager.AppSettings["CamperBasicInfo"].ToString();
                }
            }
            else
            {
                strRedirURL = ConfigurationManager.AppSettings["CamperBasicInfo"].ToString();
            }

            Response.Redirect(strRedirURL);
            //Server.Transfer(strRedirURL);
        }
    }