protected void InsertStep4Answers() { string strTablevalues = ""; string strComments, strModifiedBy, strFJCID; int RowsAffected, iStatus = 0; strTablevalues = ConstructCamperAnswers(); strModifiedBy = Master.UserId; strFJCID = hdnFJCID_OtherInfo.Value; strComments = txtComments.Text.Trim(); //Used by the Admin user //the status value will be set in session once btncheckeligibility_click is fired in step2_3.aspx for any questionnaire if (Session["STATUS"] != null) { iStatus = Convert.ToInt32(Session["STATUS"]); } if (strFJCID != "" && strTablevalues != "" && strModifiedBy != "" && bPerformUpdate) { RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strTablevalues, strModifiedBy, strComments); } if (strFJCID != "") { CamperAppl.SetTermsandConditionsAcceptance(strFJCID, chkAgreement.Checked, false, false); } }
protected void btnUpdateStatus_OnClick(object sender, EventArgs e) { DataSet dsChangeDetails = objCamperApplication.GetChangeRequestDetails(strFJCID); structChangeDetails ChangeDetails = new structChangeDetails(); string strReason = txtareaUpdateComments.Text; if (!string.IsNullOrEmpty(strReason)) { if (dsChangeDetails.Tables[0].Rows.Count > 0) { ChangeDetails = objCamperApplication.SetChangeDetailsFromDataRow(dsChangeDetails.Tables[0].Rows[0]); } if (ddlRequestStatus.SelectedValue == Enum.Format(typeof(RequestStatus), RequestStatus.ClosedOrApproved, "D")) { if (sessionModifiedPenFJCApprovalStatus == ChangeDetails.Current_Status.ToString()) { string strNewFJCID = string.Empty; string answers = ConstructCamperAnswers(ChangeDetails.NewSession, ChangeDetails.NewSession_StartDate, ChangeDetails.NewSession_EndDate); objCamperApplication.CopyCamperApplicationForSessionChange(strFJCID, out strNewFJCID, Int32.Parse(secApprovalStatus), Convert.ToInt32(sessionModifiedCreditPending)); Session["FJCID"] = strNewFJCID; objCamperApplication.InsertCamperAnswers(strNewFJCID, answers, iUserID.ToString(), strReason); objCamperApplication.UpdateDetailsOnRequestType(strFJCID, strNewFJCID, ChangeDetails.RequestID, "", "Old application cancelled and new application created with second approval status", iUserID, null, null, Int32.Parse(Enum.Format(typeof(RequestStatus), RequestStatus.ClosedOrApproved, "D"))); } else if (cancellationPendingApprovalStatus == ChangeDetails.Current_Status.ToString()) { string strNewFJCID = string.Empty; objCamperApplication.UpdateStatus(strFJCID, Int32.Parse(cancellationPaymentCreditPending), strReason, iUserID); objCamperApplication.UpdateDetailsOnRequestType(strFJCID, string.Empty, ChangeDetails.RequestID, "", "Cancellation request approved and the payment will be applied for credit.", iUserID, null, null, Int32.Parse(Enum.Format(typeof(RequestStatus), RequestStatus.ClosedOrApproved, "D"))); } } else if (ddlRequestStatus.SelectedValue == Enum.Format(typeof(RequestStatus), RequestStatus.Rejected, "D")) { string strCamperAnswers = string.Empty; if (ChangeDetails.RequestType == 2) { strCamperAnswers = ConstructCamperAnswers(ChangeDetails.OldSession, ChangeDetails.OldSession_StartDate, ChangeDetails.OldSession_EndDate); } objCamperApplication.UpdateDetailsOnRequestType(strFJCID, string.Empty, ChangeDetails.RequestID, strCamperAnswers, string.Empty, iUserID, null, null, Int32.Parse(Enum.Format(typeof(RequestStatus), RequestStatus.Rejected, "D"))); } valobj.InnerHtml = ""; spnComments.Visible = false; string strMessage = ddlRequestStatus.SelectedValue == "3" ? "Request has been approved." : "Request has been rejected."; strScript = "<script language=javascript>" + (strMessage != string.Empty ? "alert('" + strMessage + "');" : string.Empty) + "window.opener.location.href = window.opener.location.href;" + "if (window.opener.progressWindow)" + "{ window.opener.progressWindow.close()" + "} window.close();</script>"; if (!ClientScript.IsStartupScriptRegistered("clientScript")) { ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript); } } else { valobj.InnerHtml = "<ul><li>Please enter comments</li></ul>"; spnComments.Visible = true; } }
protected void InsertCamperAnswers(string strFJCID, string strModifiedBy, string strComments) { string strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } //CamperAppl = new CamperApplication(); //CamperAppl.UpdateTimeInCampInApplication(strFJCID); }
private void ProcessCamperAnswers() { string strComments = txtComments.Text.Trim(); string strFJCID = hdnFJCID.Value; string strModifiedBy = Master.UserId; string strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } }
protected void btnNext_Click(object sender, EventArgs e) { if (tblPJLottery.Visible) { var fjcid = Session["FJCID"].ToString(); var camperApp = new CamperApplication(); camperApp.UpdateFederationId(fjcid, ((int)FederationEnum.PJL).ToString()); var previousFedID = Session["FedId"].ToString(); Session["FedId"] = (int)FederationEnum.PJL; var url = "../PJL/Summary.aspx?prev=" + HttpContext.Current.Request.Url.AbsolutePath + "&prevfedid=" + previousFedID; if (rdoYes.Checked) { camperApp.InsertCamperAnswers(fjcid, "7~4~", Master.UserId, "PJL Lottery - Set JDS"); Session["STATUS"] = (int)StatusInfo.EligiblePJLottery; } else { camperApp.InsertCamperAnswers(fjcid, "7~999~", Master.UserId, "PJL Lottery - delete JDS"); //url = "../PJL/Step2_2.aspx?prev=" + HttpContext.Current.Request.Url.AbsolutePath; } Response.Redirect(url); //else //{ // tblDisable.Visible = true; // tblRegular.Visible = false; // tblPJLottery.Visible = false; //} } else { Response.Redirect(tblRegular.Visible ? "Step2_2.aspx" : "../Step1_NL.aspx"); } }
//to insert the Camper Answers protected void InsertCamperAnswers() { string strComments, strFJCID, strModifiedBy, strCamperAnswers; int RowsAffected; strFJCID = hdnFJCID.Value; strModifiedBy = Master.UserId; //to get the comments (used only by the Admin user) strComments = txtComments.Text.Trim(); strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } }
protected void InsertCamperAnswers() { string strFJCID = hdnFJCIDStep2_3.Value; //Modified by id taken from the common.master string strModifiedBy = Master.UserId; //comments (used only by the Admin user) string strComments = txtComments.Text.Trim(); string strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } }
protected void InsertCamperAnswers() { string strFJCID, strModifiedBy, strComments, strCamperAnswers; int RowsAffected; //to get the Comments text (used by the Admin user) strComments = txtComments.Text.Trim(); strFJCID = hdnFJCID.Value; strModifiedBy = Master.UserId; strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } CamperAppl = new CamperApplication(); CamperAppl.UpdateTimeInCampInApplication(strFJCID); }
protected void btnNext_Click(object sender, EventArgs e) { var fjcid = Session["FJCID"].ToString(); var camperApp = new CamperApplication(); camperApp.UpdateFederationId(fjcid, ((int)FederationEnum.PJL).ToString()); var previousFedID = Session["FedId"].ToString(); Session["FedId"] = (int)FederationEnum.PJL; camperApp.InsertCamperAnswers(fjcid, "3~3~", Master.UserId, "PJL Lottery - delete Q1"); var nextUrl = "Step2_2.aspx"; if (Request.QueryString["prev"] != null) { nextUrl += "?prev=" + Request.QueryString["prev"] + "&prevfedid=" + previousFedID; } Response.Redirect(nextUrl); }
protected void InsertCamperAnswers() { DateTime startDate, endDate; try { startDate = Convert.ToDateTime(txtStartDate.Text); endDate = Convert.ToDateTime(txtEndDate.Text); } catch (Exception) { return; } if (startDate > endDate) { return; } txtStartDate.Text = startDate.ToShortDateString(); txtEndDate.Text = endDate.ToShortDateString(); string strFJCID, strComments; int RowsAffected; string strModifiedBy, strCamperAnswers; strFJCID = hdnFJCIDStep2_3.Value; //Modified by id taken from the common.master strModifiedBy = Master.UserId; //comments (used only by the Admin user) strComments = txtComments.Text.Trim(); strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } }
protected void InsertCamperAnswers() { string strFJCID, strComments; int RowsAffected; string strModifiedBy, strCamperAnswers; //-1 for Camper (User id will be passed for Admin user) strFJCID = hdnFJCIDStep2_2.Value; //to get the comments text (used only by the Admin user) strComments = txtComments.Text.Trim(); //Modified by id taken from the common.master strModifiedBy = Master.UserId; strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); CamperAppl = new CamperApplication(); CamperAppl.UpdateTimeInCampInApplication(strFJCID); }
protected void InsertCamperAnswers() { string strFJCID, strComments; int RowsAffected; string strCamperAnswers, strModifiedBy; //-1 for Camper (User id will be passed for Admin user) strFJCID = hdnFJCIDStep2_1.Value; //Modified by id taken from the common.master strModifiedBy = Master.UserId; //to get the comments (used by the Admin user) strComments = txtComments.Text.Trim(); strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "") { RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } }