repfrmwarrantinfo.cs

来自「财务凭证管理系统,主要是从事公司或部门的财务方面的管理。此系统给会计人员带来很大」· CS 代码 · 共 58 行

CS
58
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using property.control.warrantInfo;
using CrystalDecisions.CrystalReports.Engine;
using System.Windows.Forms;

namespace property.view.WarrantInfo.CrRepotr
{
    public partial class RepfrmWarrantinfo : Form
    {
        public RepfrmWarrantinfo()
        {
            InitializeComponent();
        }
        public RepfrmWarrantinfo(int P_int_select)
        {
            InitializeComponent();
            P_int_id = P_int_select;
        }
        public RepfrmWarrantinfo(string P_str_select)
        {
            InitializeComponent();
            P_str_Wart = P_str_select;
        }
        public int P_int_id;
        string P_str_Wart;
        private void RepfrmWarrantinfo_Load(object sender, EventArgs e)
        {
            GetWarInfo getwar=new GetWarInfo();
            if (P_int_id != 0)
            {
                string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,
                 Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
                reportPath += @"\view\WarrantInfo\CrRepotr\CrWarrInfo.rpt";
                ReportDocument rd = new ReportDocument();
                rd.Load(reportPath);
                rd.SetDataSource(getwar.getWarRepotInof(P_int_id).Tables[0].DefaultView);
                this.crystalReportViewer1.ReportSource = rd;
            }
            if (P_str_Wart != null)
            {
                string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,
              Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
                reportPath += @"\view\WarrantInfo\CrRepotr\CrWarrInfo.rpt";
                ReportDocument rd = new ReportDocument();
                rd.Load(reportPath);
                rd.SetDataSource(getwar.getWarRepotInof().Tables[0].DefaultView);
                this.crystalReportViewer1.ReportSource = rd;
            
            }
     
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?