private void mnuInvestPrint_Click(object sender, EventArgs e) { InvestProject project = getCurrentProject(); ReportGenerate. PrintExcelProject(project); }
static void Main(string[] args) { ReportGenerate r = new ReportGenerate(); var form = new ExcelUploadForm(r); form.OpenFileDialog(); Application.EnableVisualStyles(); Application.Run(form); }
protected void lkbDownload3B_Click(object sender, EventArgs e) { try { LinkButton lkbdownload = (LinkButton)sender; String UserID = Convert.ToString(lkbdownload.CommandArgument.ToString()); var userId = Common.LoggedInUserID(); //var Month = Convert.ToByte(uc_invoiceMonth.GetValue); var SelectedMonth = Int32.Parse(uc_invoiceMonth.GetValue); /// var invoice = unitOfWork.OfflineAudittrailRepository.Filter(f => f.UserID == userId).FirstOrDefault(); ReportGenerate.ExcelDownloadGstr_3B(userId, SelectedMonth); } catch (Exception ex) { cls_ErrorLog ob = new cls_ErrorLog(); cls_ErrorLog.LogError(ex, Common.LoggedInUserID()); } }
public void GetReportTest() { var oneGenerationPacman = new List <Pacman> { new Pacman { ID = 1, AveragePoints = 73, Generation = 3, MaxPoints = 543, Points = new [] { 0, 13, 36, 33, 56, 543, 0, -5, -15 }, PointsString = "0,13,36,33,56,543,0,-5,-15", PositivePointsCount = 5, Strategy = new Strategy(), Weight = 345 }, new Pacman { ID = 2, AveragePoints = 87, Generation = 3, MaxPoints = 332, Points = new [] { 0, 200, 200, 13, 56, 332, 4, -5, -15 }, PointsString = "0,200,200,13,56,332,4,-5, -15", PositivePointsCount = 6, Strategy = new Strategy(), Weight = 34556 }, }; var mockSqlConnect = new Mock <ISqLiteConnection>(); mockSqlConnect.Setup(x => x.GetOneGenerationPacmans(3)).Returns(oneGenerationPacman); var reportGenerate = new ReportGenerate(mockSqlConnect.Object); var report = reportGenerate.CalculateReport(3); var expectReport = new Report { Generation = 3, MaxAveragePoints = 87, MinAveragePoints = 73, MaxPointsOfFirst = 332, CountPositivePointsOfFirst = 6, MaxPoints = 543, MaxCountPositivePoints = 6, MaxCountPositivePointsAveragePoints = 87, MaxPointsAveragePoints = 73 }; Assert.IsTrue(report.Generation == expectReport.Generation); Assert.IsTrue(report.MaxAveragePoints == expectReport.MaxAveragePoints); Assert.IsTrue(report.MinAveragePoints == expectReport.MinAveragePoints); Assert.IsTrue(report.MaxPointsOfFirst == expectReport.MaxPointsOfFirst); Assert.IsTrue(report.CountPositivePointsOfFirst == expectReport.CountPositivePointsOfFirst); Assert.IsTrue(report.MaxPoints == expectReport.MaxPoints); Assert.IsTrue(report.MaxCountPositivePoints == expectReport.MaxCountPositivePoints); Assert.IsTrue(report.MaxCountPositivePointsAveragePoints == expectReport.MaxCountPositivePointsAveragePoints); Assert.IsTrue(report.MaxPointsAveragePoints == expectReport.MaxPointsAveragePoints); }
public ExcelUploadForm(ReportGenerate generator) { _generator = generator; }
protected void BtnFilter_Click(object sender, EventArgs e) { LoadScriptManager(); LtrOrganizationsMonths.Text = LtrReportsOrganizations.Text = LtrReportsSosialStaus.Text = LtrReportsApplicationsFamily.Text = LtrReportsCase.Text = LtrReportsServices.Text = LtrReportsEvents.Text = ""; StringBuilder th = new StringBuilder(); StringBuilder Organizations = new StringBuilder(); StringBuilder Months = new StringBuilder(); StringBuilder Years = new StringBuilder(); for (int i = 0; i < DListFilterMultiOrganizations.Items.Count; i++) { if (DListFilterMultiOrganizations.Items[i].Selected) { Organizations.Append(DListFilterMultiOrganizations.Items[i].Value + ","); } } if (Organizations.Length < 1) { Config.MsgBoxAjax("Heç bir qurum seçilməyib"); return; } if (int.Parse(DListFilterReportsTypes.SelectedValue) == (int)Tools.ReportsTypes.Aylıq_hesabat) { Years.Append(DListFilterYears.SelectedValue); for (int i = 0; i < DListFilterMultiMonths.Items.Count; i++) { if (DListFilterMultiMonths.Items[i].Selected) { Months.Append(DListFilterMultiMonths.Items[i].Value + ","); th.AppendFormat("<th>{0}</th>", Config.GetMonthShortName(int.Parse(DListFilterMultiMonths.Items[i].Value))); } } if (Months.Length < 1) { Config.MsgBoxAjax("Heç bir ay seçilməyib"); return; } LtrReportsOrganizations.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsForOrganizations", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "ID", "ID"); LtrReportsOrganizations.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsPersonsForGender", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "Gender,Priority"); LtrReportsServices.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsPersonsServices", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "ParentID", "ServicesID,Priority,ParentID,Level,Rownumber"); LtrReportsSosialStaus.Text += ReportGenerate.GetReports("ReportsMonthlySosialStatus", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsCaseOpening", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsCaseOpeningForTypes", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsCase.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsCaseClosing", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsCaseClosingForTypes", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsApplicationsFamily.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsFamilyForStatus", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsApplicationsFamily.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsApplicationsFamily.Text += ReportGenerate.GetReports("ReportsMonthlyApplicationsFamilyForTypes", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsEvents.Text += ReportGenerate.GetReports("ReportsMonthlyEventsForPolicyTypes", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsEvents.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsEvents.Text += ReportGenerate.GetReports("ReportsMonthlyEventsForOrganizations", Tools.ReportsTypes.Aylıq_hesabat, Organizations, Years, Months, "Level", "ID,Level"); } else if (int.Parse(DListFilterReportsTypes.SelectedValue) == (int)Tools.ReportsTypes.İllik_hesabat) { for (int i = 0; i < DListFilterMultiYears.Items.Count; i++) { if (DListFilterMultiYears.Items[i].Selected) { Years.Append(DListFilterMultiYears.Items[i].Value + ","); th.AppendFormat("<th>{0}</th>", DListFilterMultiYears.Items[i].Value); } } if (Years.Length < 1) { Config.MsgBoxAjax("Heç bir il seçilməyib"); return; } LtrReportsOrganizations.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsForOrganizations", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "ID", "ID"); LtrReportsOrganizations.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsPersonsForGender", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "Gender,Priority"); LtrReportsServices.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsPersonsServices", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "ParentID", "ServicesID,Priority,ParentID,Level,Rownumber"); LtrReportsSosialStaus.Text += ReportGenerate.GetReports("ReportsYearlySosialStatus", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsCaseOpening", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsCaseOpeningForTypes", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsCase.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsCaseClosing", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsCase.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsCaseClosingForTypes", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsApplicationsFamily.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsFamilyForStatus", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsApplicationsFamily.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsApplicationsFamily.Text += ReportGenerate.GetReports("ReportsYearlyApplicationsFamilyForTypes", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsEvents.Text += ReportGenerate.GetReports("ReportsYearlyEventsForPolicyTypes", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Priority", "ID,Priority"); LtrReportsEvents.Text += "<tbody class=\"gap\"></tbody>"; LtrReportsEvents.Text += ReportGenerate.GetReports("ReportsYearlyEventsForOrganizations", Tools.ReportsTypes.İllik_hesabat, Organizations, Years, Months, "Level", "ID,Level"); } LtrOrganizationsMonths.Text = LtrSosialStatusMonths.Text = LtrApplicationFammilyMonths.Text = LtrCaseMonths.Text = LtrServicesMonths.Text = LtrEventsMonths.Text = th.ToString(); }