protected void btnTakeJobMissedUploadedProposal_Click(object sender, EventArgs e) { if (grdMissedUploadedProposal.Rows.Count < 1) { return; } if (txtProposalUploadId.Text != "") { ScriptManager.RegisterStartupScript(this, GetType(), "Message", "alert('Complete the current job before taking new job');", true); return; } ClearComponents(); // btnTakeJob.Enabled = false; ProposalUpload proposalUpload = new ProposalUpload(); ProposalUploadController proposalUploadController = new ProposalUploadController(); string COMPLETED_BY_PROCESSING = System.Configuration.ConfigurationManager.AppSettings["COMPLETED_BY_PROCESSING"].ToString(); string APPROVED_BY_SCRUTINIZING = System.Configuration.ConfigurationManager.AppSettings["APPROVED_BY_SCRUTINIZING"].ToString(); string UserCode = ""; string UserBranch = ""; HttpCookie reqCookies = Request.Cookies["userInfo"]; if (reqCookies != null) { UserCode = reqCookies["UserCode"].ToString(); UserBranch = reqCookies["UserBranch"].ToString(); } string TAKEN_BY_VALIDATORS = System.Configuration.ConfigurationManager.AppSettings["TAKEN_BY_VALIDATORS"].ToString(); proposalUpload = proposalUploadController.GetEarliestUploadedProposalOfGivenStatusAndUser(TAKEN_BY_VALIDATORS, UserCode); if (proposalUpload.ProposalUploadId == 0) { return; } txtJobType.Text = proposalUpload.JobType; if (txtJobType.Text == "N") { txtJobTypeName.Text = "New"; divQuotationNo.Visible = true; divJobNo.Visible = false; divPolicyNo.Visible = false; txtTCSPolicyNo.Enabled = true; } else if (txtJobType.Text == "E") { txtJobTypeName.Text = "Endorsement"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; txtTCSPolicyNo.Enabled = false; } else if (txtJobType.Text == "R") { txtJobTypeName.Text = "Renewal"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; txtTCSPolicyNo.Enabled = false; } else if (txtJobType.Text == "C") { txtJobTypeName.Text = "Cancellation"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; txtTCSPolicyNo.Text = proposalUpload.TCSProposalNo; txtTCSPolicyNo.Enabled = false; } txtProposalUploadId.Text = proposalUpload.ProposalUploadId.ToString(); txtJobNo.Text = proposalUpload.JobNumber; txtSystemName.Text = proposalUpload.SystemName; txtTCSPolicyID.Text = proposalUpload.TCSPolicyId.ToString(); txtProposalNo.Text = proposalUpload.TCSProposalNo; txtQuotationNo.Text = proposalUpload.QuotationNo; txtVehicleNo.Text = proposalUpload.VehicleNo; txtEngineNo.Text = proposalUpload.EngineNo; txtChassisNo.Text = proposalUpload.ChassisNo; if (proposalUpload.IsCoverNoteAvailable == 1) { chkIsCoverNoteAvailable.Checked = true; } else { chkIsCoverNoteAvailable.Checked = false; } txtCoverNotePeriod.Text = proposalUpload.CoverNotePeriod; txtAddressLine1.Text = proposalUpload.AddressLine1; txtAddressLine2.Text = proposalUpload.AddressLine2; txtAddressLine3.Text = proposalUpload.AddressLine3; txtYearOfMake.Text = proposalUpload.YearOfMake; txtFirstRegDate.Text = proposalUpload.FirstRegDate; txtCubicCapacity.Text = proposalUpload.CubicCapacity; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; txtEnteredBranchCode.Text = proposalUpload.EnteredUserBranchCode; txtProposalUploadUserCode.Text = proposalUpload.EnteredUser; txtEndorsementType.Text = proposalUpload.EndorsementType; txtCancellationType.Text = proposalUpload.CancellationType; string INITIAL = System.Configuration.ConfigurationManager.AppSettings["INITIAL"].ToString(); if (txtJobType.Text == "N") { loadUploadedDocumentsToGrid(proposalUpload.QuotationNo); } else if (txtJobType.Text == "E") { txtPolicyNo.Text = proposalUpload.TCSPolicyNo; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; loadUploadedDocumentsToGrid(proposalUpload.JobNumber); string ENDORSEMENT_ADDED = System.Configuration.ConfigurationManager.AppSettings["ENDORSEMENT_ADDED"].ToString(); string jobRemark = ""; jobRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, ENDORSEMENT_ADDED); string initialRemark = ""; initialRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, INITIAL); txtJobRemarks.Text = jobRemark + " " + initialRemark; } else if (txtJobType.Text == "R") { txtPolicyNo.Text = proposalUpload.TCSPolicyNo; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; loadUploadedDocumentsToGrid(proposalUpload.JobNumber); string RENEWAL_ADDED = System.Configuration.ConfigurationManager.AppSettings["RENEWAL_ADDED"].ToString(); string jobRemark = ""; jobRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, RENEWAL_ADDED); string initialRemark = ""; initialRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, INITIAL); txtJobRemarks.Text = jobRemark + " " + initialRemark; } else if (txtJobType.Text == "C") { txtPolicyNo.Text = proposalUpload.TCSPolicyNo; txtTCSPolicyNo.Text = proposalUpload.TCSPolicyNo; loadUploadedDocumentsToGrid(proposalUpload.JobNumber); string CANCELLATION_ADDED = System.Configuration.ConfigurationManager.AppSettings["CANCELLATION_ADDED"].ToString(); string jobRemark = ""; jobRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, CANCELLATION_ADDED); string initialRemark = ""; initialRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, INITIAL); txtJobRemarks.Text = jobRemark + " " + initialRemark; } txtScrutinizationRemarks.Text = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, APPROVED_BY_SCRUTINIZING); txtProcessingRemarks.Text = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, COMPLETED_BY_PROCESSING); txtIssueType.Text = proposalUpload.IssueType; txtPolicyType.Text = proposalUpload.PolicyType; loadPendingsOfJob(Convert.ToInt32(txtProposalUploadId.Text)); }
protected void btnTakeJobMissedUploadedProposal_Click(object sender, EventArgs e) { if (grdMissedUploadedProposal.Rows.Count < 1) { return; } if (txtProposalUploadId.Text != "") { ScriptManager.RegisterStartupScript(this, GetType(), "Message", "alert('Complete the current job before taking new job');", true); return; } //if (txtProposalUploadId.Text != "") //{ // lblMessage.Text = "Complete the current job before taking new job"; // return; //} ClearComponents(); ProposalUpload proposalUpload = new ProposalUpload(); ProposalUploadController proposalUploadController = new ProposalUploadController(); string UserCode = ""; string UserBranch = ""; HttpCookie reqCookies = Request.Cookies["userInfo"]; if (reqCookies != null) { UserCode = reqCookies["UserCode"].ToString(); UserBranch = reqCookies["UserBranch"].ToString(); } string TAKEN_BY_CREDIT_CONTROLLER = System.Configuration.ConfigurationManager.AppSettings["TAKEN_BY_CREDIT_CONTROLLER"].ToString(); proposalUpload = proposalUploadController.GetEarliestUploadedProposalOfGivenStatusAndUser(TAKEN_BY_CREDIT_CONTROLLER, UserCode); txtJobType.Text = proposalUpload.JobType; if (txtJobType.Text == "N") { txtJobTypeName.Text = "New"; divQuotationNo.Visible = true; divJobNo.Visible = false; divPolicyNo.Visible = false; } else if (txtJobType.Text == "E") { txtJobTypeName.Text = "Endorsement"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; } else if (txtJobType.Text == "R") { txtJobTypeName.Text = "Renewal"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; } else if (txtJobType.Text == "C") { txtJobTypeName.Text = "Cancellation"; divQuotationNo.Visible = false; divJobNo.Visible = true; divPolicyNo.Visible = true; } txtProposalUploadId.Text = proposalUpload.ProposalUploadId.ToString(); txtQuotationNo.Text = proposalUpload.QuotationNo; txtJobNo.Text = proposalUpload.JobNumber; txtVehicleNo.Text = proposalUpload.VehicleNo; txtEngineNo.Text = proposalUpload.EngineNo; txtChassisNo.Text = proposalUpload.ChassisNo; if (proposalUpload.IsCoverNoteAvailable == 1) { chkIsCoverNoteAvailable.Checked = true; } else { chkIsCoverNoteAvailable.Checked = false; } txtCoverNotePeriod.Text = proposalUpload.CoverNotePeriod; txtAddressLine1.Text = proposalUpload.AddressLine1; txtAddressLine2.Text = proposalUpload.AddressLine2; txtAddressLine3.Text = proposalUpload.AddressLine3; txtYearOfMake.Text = proposalUpload.YearOfMake; txtFirstRegDate.Text = proposalUpload.FirstRegDate; txtCubicCapacity.Text = proposalUpload.CubicCapacity; txtProposalUploadUserCode.Text = proposalUpload.EnteredUser; txtPolicyNo.Text = proposalUpload.TCSPolicyNo; txtEndorsementType.Text = proposalUpload.EndorsementType; txtCancellationType.Text = proposalUpload.CancellationType; string INITIAL = System.Configuration.ConfigurationManager.AppSettings["INITIAL"].ToString(); if (txtJobType.Text == "C") { loadUploadedDocumentsToGrid(proposalUpload.JobNumber); string CANCELLATION_ADDED = System.Configuration.ConfigurationManager.AppSettings["CANCELLATION_ADDED"].ToString(); txtJobRemarks.Text = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, CANCELLATION_ADDED); string jobRemark = ""; jobRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, CANCELLATION_ADDED); string initialRemark = ""; initialRemark = proposalUploadController.GetRemarksOfStatus(txtProposalUploadId.Text, INITIAL); txtJobRemarks.Text = jobRemark + " " + initialRemark; } loadPendings(); loadRejectReasons(); loadAttachedDocs(); }