public string getInsureBranch(int claimId) { ucAllUserLeads userGetClaim = new ucAllUserLeads(); List<LeadView> lead = new List<LeadView>(); lead = userGetClaim.getLeadList(); string insureBranch = ""; for (var i = 0; i < lead.Count; i++) { if (lead[i].ClaimID == claimId) { insureBranch = lead[i].LocationName; break; } } return insureBranch; }
public void setRulexception() { ucAllUserLeads userGetClaim = new ucAllUserLeads(); List<LeadView> leadView = new List<LeadView>(); leadView = userGetClaim.getLeadList(); int clientID = Convert.ToInt32(Session["ClientId"]); int userID = Convert.ToInt32(Session["UserId"]); int claimId; for (int i = 0; i < leadView.Count; i++) { claimId = leadView[i].ClaimID; if (claimId != 0) { int progressId = getProgressId(claimId); DateTime progressDate = progressClaimRecievedData(claimId); if (progressId != 0) { List<int> ruleId = getRuleId(progressId); for (var j = 0; j < ruleId.Count; j++) { if (ruleId.Count != 0) { List<BusinessRule> businessRuleArr = new List<BusinessRule>(); businessRuleArr = getBusinessRuleId(clientID, ruleId[j]); for (var k = 0; k < businessRuleArr.Count; k++) { int timeInterval = getTimeFlag(businessRuleArr[k].RuleXML, businessRuleArr[k].Description); TimeSpan timeDiff = DateTime.Now - progressDate; if ((timeDiff.Days * 24 + timeDiff.Hours) >= timeInterval) { int checkstate = checkInsertable(businessRuleArr[k].BusinessRuleID, clientID, userID, claimId); if (checkstate == 0) { insertRuleException(businessRuleArr[k].BusinessRuleID, clientID, userID, claimId); } if (checkstate == 1) { updateRuleException(businessRuleArr[k].BusinessRuleID, clientID, userID, claimId); } } } } } } } } }
public void setGlobalSession() { Globals gv = Globals.Instance(); //int[] claimInt; ucAllUserLeads userGetClaim = new ucAllUserLeads(); List<LeadView> lead = new List<LeadView>(); lead = userGetClaim.getLeadList(); int[] claimInt = new int[lead.Count]; for (var i = 0; i < lead.Count; i++) { claimInt[i] = lead[i].ClaimID; } gv.setCliamList(claimInt); //gv.setClaimId(Session["ClaimID"].ToString()); gv.setUserId(Session["UserId"].ToString()); gv.setUserName(Session["UserName"].ToString()); //gv.setClaimId(Session["RoleId"].ToString()); gv.setClientId(Session["ClientId"].ToString()); //gv.setClaimId(Session["ClientShowTask"].ToString()); //gv.setClaimId(Session["rolePermission"].ToString()); //gv.setClaimId(Session["roleActions"].ToString()); //gv.setClaimId(Session["Count"].ToString()); gv.setclaimCount(lead.Count); }
public void formatException() { ucAllUserLeads userGetClaim = new ucAllUserLeads(); List<LeadView> leadView = new List<LeadView>(); leadView = userGetClaim.getLeadList(); int clientID = Convert.ToInt32(Session["ClientId"]); int userID = Convert.ToInt32(Session["UserId"]); int claimId = 0; for (int i = 0; i < leadView.Count; i++) { claimId = leadView[i].ClaimID; formatExceptions(clientID, userID, claimId); } }
private void bindReport() { int clientID = Core.SessionHelper.getClientId(); reportViewer.Reset(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.LocalReport.DataSources.Clear(); reportViewer.LocalReport.EnableExternalImages = true; ReportDataSource reportDataSourceDataSet1 = new ReportDataSource(); ReportDataSource reportDataSourceDataSet2 = new ReportDataSource(); List<ClaimReport> reportData = null; DateTime txtFromDateTime = new DateTime(); txtFromDateTime.Equals(DateTime.MinValue); DateTime txtToDateTime = new DateTime(); //search condition if (txtFromDate.Text != "") { txtFromDateTime = Convert.ToDateTime(txtFromDate.Text); } if (txtToDate.Text != "") { txtToDateTime = Convert.ToDateTime(txtToDate.Text); } int ddlCarrierListCount = 0; int gvLocationListCount = 0; if (ddlCarrier.SelectedIndex == 0) { ddlCarrierListCount = ddlCarrier.Items.Count; } else { for (int i = 0; i < ddlCarrier.Items.Count; i++) { if (ddlCarrier.Items[i].Selected == true) { ddlCarrierListCount = ddlCarrierListCount + 1; } } } if (gvLocation.SelectedIndex == 0) { gvLocationListCount = gvLocation.Items.Count; } else { for (int i = 0; i < gvLocation.Items.Count; i++) { if (gvLocation.Items[i].Selected == true) { gvLocationListCount = gvLocationListCount + 1; } } } int[] ddlCarrierList = new int[ddlCarrierListCount]; string[] gvLocationList = new string[gvLocationListCount]; var j = 0; if (ddlCarrier.SelectedIndex == 0) { for (int i = 1; i < ddlCarrier.Items.Count; i++) { ddlCarrierList[j] = Convert.ToInt32(ddlCarrier.Items[i].Value); j = j + 1; } } else { for (int i = 0; i < ddlCarrier.Items.Count; i++) { if (ddlCarrier.Items[i].Selected == true) { ddlCarrierList[j] = Convert.ToInt32(ddlCarrier.Items[i].Value); j = j + 1; } } } j = 0; if (gvLocation.SelectedIndex == 0) { for (int i = 1; i < gvLocation.Items.Count; i++) { gvLocationList[j] = gvLocation.Items[i].Text; j = j + 1; } }else{ for (int i = 0; i < gvLocation.Items.Count; i++) { if (gvLocation.Items[i].Selected == true) { gvLocationList[j] = gvLocation.Items[i].Text; j = j + 1; } } } //PolicyLimit PolicyLimitObj = new PolicyLimit(); //get the claimList ucAllUserLeads userGetClaim = new ucAllUserLeads(); List<LeadView> lead = new List<LeadView>(); lead = userGetClaim.getLeadList(); if (lead != null) { int[] claimList = new int[lead.Count]; for (var i = 0; i < lead.Count; i++) { claimList[i] = lead[i].ClaimID; } reportData = ClaimManagerObj.GetClaimsByClientId(clientID, claimList); ClaimReportView ClaimReportViewObj = new ClaimReportView(); ClaimReportViewObj = getClaimListingReport(reportData, txtFromDateTime, txtToDateTime, ddlCarrierList, gvLocationList); reportDataSourceDataSet1.Name = "DataSet1"; reportDataSourceDataSet1.Value = ClaimReportViewObj.claimReportArr; reportDataSourceDataSet2.Name = "DataSet2"; reportDataSourceDataSet2.Value = ClaimReportViewObj.ClaimReportAverageObj; reportViewer.LocalReport.DataSources.Add(reportDataSourceDataSet1); reportViewer.LocalReport.DataSources.Add(reportDataSourceDataSet2); reportViewer.LocalReport.ReportPath = Server.MapPath("~/Protected/Reports/Claim/ClaimReport.rdlc"); } }