📄 repfrmwarrantinfo.cs
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -