protected void InsertCamperAnswers(string strFJCID, string strModifiedBy, string strComments) { string strCamperAnswers = ConstructCamperAnswers(); if (strFJCID != "" && strCamperAnswers != "" && strModifiedBy != "" && bPerformUpdate) { int RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, strCamperAnswers, strModifiedBy, strComments); } CamperAppl = new CamperApplication(); CamperAppl.UpdateTimeInCampInApplication(strFJCID); }
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 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); }
void btnChkEligibility_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } string strModifiedBy = Master.UserId; int iCampId = Convert.ToInt32(ddlCamp.SelectedValue); string strFJCID = hdnFJCIDStep2_3.Value; string strComments = txtComments.Text.Trim(); bool isReadOnly = objGeneral.IsApplicationReadOnly(strFJCID, Master.CamperUserId); if (!isReadOnly) { var startDate = Convert.ToDateTime(txtStartDate.Text); var endDate = Convert.ToDateTime(txtEndDate.Text); if (startDate > endDate) { lblMsg.Text = "Error: Start date must be earlier than end date."; return; } InsertCamperAnswers(); } if (strFJCID != "" && strModifiedBy != "") { int iStatus; if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); //to check whether the camper is eligible EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Atlanta); objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = Convert.ToInt32(Session["STATUS"]); if (checkStatus == (int)StatusInfo.SystemInEligible) { iStatus = checkStatus; } else { Session["STATUS"] = iStatus; } if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { string strRedirURL; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirURL = ConfigurationManager.AppSettings["AdminRedirURL"]; } else //the user is Camper { strRedirURL = "../ThankYou.aspx"; } //to update the status to the database if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect(strRedirURL, false); } else //if he/she is eligible { Session["FJCID"] = hdnFJCIDStep2_3.Value; CamperAppl.UpdateTimeInCampInApplication(strFJCID); Response.Redirect("../Step2_1.aspx"); } } }