📄 frmsubjectsun.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using property.model.GetConnection;
using property.control.Subject;
namespace property.view.HinderInfo
{
public partial class frmSubjectSun : Form
{
public frmSubjectSun()
{
InitializeComponent();
}
public int P_int_report;//变量
private void frmSubjectSun_Load(object sender, EventArgs e)
{
GetSubject subj = new GetSubject();
subj.fillId(this.cmbTiaoJian);//填冲编号
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void txtsubject_TextChanged(object sender, EventArgs e)
{
}
//条件查找
private void bntsure_Click(object sender, EventArgs e)
{
if (cmbTiaoJian.Text == "")
{
MessageBox.Show("请选择查询条件", "查询信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
cmbTiaoJian.Focus();
return;
}// end if
else
{
FinSubject fsub = new FinSubject();
//调用函数
string P_str_select = fsub.GetsubjectZhangmu(Convert.ToInt32(cmbTiaoJian.Text), this.dataGridView1, "subjectId");
if (P_str_select == "NO")
{
MessageBox.Show("此科目还没有入账\n"+"请继续查找","友情提示",MessageBoxButtons.OK);
cmbTiaoJian.Text = "";
return;
}//
if (P_str_select == "Error")
{
MessageBox.Show("对不起此次操作出现异常没有成功\n" + "请为继续查找","友情提示", MessageBoxButtons.OK);
cmbTiaoJian.Text = "";
return;
}// end block if
P_int_report = 1;//有条件
}// end block else
}
private void bntEsce_Click(object sender, EventArgs e)
{
DialogResult a = MessageBox.Show("是否要退出?", "退出", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (Convert.ToString(a) == "Yes")
{
this.Close();
}// end block
}
//浏览
private void bntFind_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (P_int_report == 1)
{
reportSum frmsum=new reportSum(Convert.ToInt32(cmbTiaoJian.Text),"SubjectID");
frmsum.Show();
P_int_report = 0;
}//end block if
else
{
MessageBox.Show("请先查找数据,再打印");
}// end block
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -