📄 reports.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
namespace Customer_Maintenance_Project
{
/// <summary>
/// Summary description for Reports.
/// </summary>
public class Reports : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.Button btnExit;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Reports()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.btnExit = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.Location = new System.Drawing.Point(32, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(352, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Select the radio button to generate the report.";
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.radioButton3,
this.radioButton2,
this.radioButton1,
this.radioButton4});
this.groupBox1.Location = new System.Drawing.Point(24, 56);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(344, 168);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Reports:";
//
// radioButton3
//
this.radioButton3.Location = new System.Drawing.Point(16, 96);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(264, 24);
this.radioButton3.TabIndex = 2;
this.radioButton3.Text = "Monthly Balancing and Alignment Report";
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
//
// radioButton2
//
this.radioButton2.Location = new System.Drawing.Point(16, 64);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(264, 24);
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "Monthly Consumer Visit Report";
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.Location = new System.Drawing.Point(16, 32);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(264, 24);
this.radioButton1.TabIndex = 0;
this.radioButton1.Text = "Monthly Consummable Report";
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// radioButton4
//
this.radioButton4.Location = new System.Drawing.Point(16, 128);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(264, 24);
this.radioButton4.TabIndex = 6;
this.radioButton4.Text = "Monthly Worker Report";
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(152, 248);
this.btnExit.Name = "btnExit";
this.btnExit.TabIndex = 11;
this.btnExit.Text = "E&xit";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// Reports
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(400, 285);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnExit,
this.groupBox1,
this.label1});
this.Name = "Reports";
this.Text = "Reports";
this.Load += new System.EventHandler(this.Reports_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void btnExit_Click(object sender, System.EventArgs e)
{
Form1 newForm1 = new Form1();
newForm1.Show();
this.Hide();
}
private void Reports_Load(object sender, System.EventArgs e)
{
}
private void crystalReportViewer1_Load(object sender, System.EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{
ConsumableForm newForm = new ConsumableForm();
newForm.Show();
this.Hide();
}
private void radioButton4_CheckedChanged(object sender, System.EventArgs e)
{
MonthlyReport newForm = new MonthlyReport();
newForm.Show();
this.Hide();
}
private void radioButton3_CheckedChanged(object sender, System.EventArgs e)
{
AlignmentForm newForm = new AlignmentForm();
newForm.Show();
this.Hide();
}
private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
{
CustomerVisitForm newForm = new CustomerVisitForm();
newForm.Show();
this.Hide();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -