Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SaccoClassLibrary1;
using Class1;
using Stimulsoft.Report;
namespace Sacco
{
class SaccoReport
{
private Saccomembers Svcclient = new Saccomembers();
public class Vehiclelist
{
private List<VehicleType> tvehicles = new List<VehicleType>();
private List<CompanyType> company = new List<CompanyType>();
public List<VehicleType> vehicle
{
get { return tvehicles; }
set { tvehicles = value; }
}
public Vehiclelist(List<VehicleType> VEHICLE)
{
vehicle = VEHICLE;
}
}
}
}
Code: Select all
List<VehicleType> tvehicles = new List<VehicleType>();
List<SavingType> saves = new List<SavingType>();
tvehicles = svclient.Getvehicles();
if (tvehicles.Count > 0)
{
StiReport report = new StiReport();
report.Load(Application.StartupPath + "\\vehicle.mrt");
report.ReportAuthor = "Cyrus";
report.ReportDescription = "Vehicles";
report.RegBusinessObject("Stocksales", new SaccoReport.Vehiclelist(tvehicles));
//report.RegBusinessObject("Sacco", svclient.Getvehicles());
report.Show(true);
}