Esempio n. 1
0
        private ReportParameter[] CreateReportParameters(KnittingJoParameters parameters)
        {
            List<ReportParameter> reportParameters = new List<ReportParameter>();
            PropertyInfo[] propertyInfos = parameters.GetType().GetProperties();
            foreach (PropertyInfo pInfo in propertyInfos)
            {
                ReportParameter parameter = new ReportParameter(pInfo.Name, (string)pInfo.GetValue(parameters));
                reportParameters.Add(parameter);
            }

            return reportParameters.ToArray();
        }
        public KnittingJoParameters GetReportParameters()
        {
            KnittingJoParameters parameters = new KnittingJoParameters();

            parameters.JoOrderNo = JO.JoNoWrapper;
            parameters.QualitySpecification = JO.QualitySpecifications;
            parameters.JoDate = JO.JoDate.ToString("dd/MM/yyyy");
            parameters.QuoteDate = JO.QuoteDate.ToString("dd/MM/yyyy");
            parameters.QuoteNumber = JO.QuoteNo;
            parameters.SupplierInformation = Constants.GetSupplierInformation(JO.Company);
            parameters.TermsAndConditions = JO.TermsAndConditions;

            return parameters;
        }
Esempio n. 3
0
 public void SetParameters(KnittingJoParameters parameters)
 {
     this.reportViewer1.LocalReport.SetParameters(CreateReportParameters(parameters));
 }
 public KnittingJoGenerator(KnittingJO jo, KnittingJoParameters parameters)
 {
     knittingJoContol = new Reports.KnittingJoControl();
     JO = jo;
     Parameters = parameters;
 }