frmUserPay.cs

(完整代码) 2KB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PMS.PMSClass;
namespace PMS
{
    public partial class frmUserPay : Form
    {
        public frmUserPay()
        {
            InitializeComponent();
        }
        DBOperate operate = new DBOperate();
        private void toolStripLabel6_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        public string months;
        private void frmUserPay_Load(object sender, EventArgs e)
        {
            string sql="select YID as '编号',YName as '姓名',YSex as '性别',Ydep as '部门',YZhiwu as '职务',YBasePay as '基本工资',YJintie as '职务津贴',Yjiangli as '奖励',YFK as '罚款',Yquanqin as '全勤奖金',Yjiaban as '加班工资',Yyingfa as '应发工资',Ygeren as '个人所得税',Ypay as '实发工资',YMonth as '统计月份' from tb_pay";
            operate.BindDataGridView(dataGridView1,sql);
            months = "";
            for (int i = 1; i <= 12; i++)
            {
                toolStripComboBox1.Items.Add(i + "月");
            }
        }

        private void toolStripLabel3_Click(object sender, EventArgs e)
        {
            PrintForm.frmUserPayPrint payprint = new PMS.PrintForm.frmUserPayPrint();
            payprint.num = months;
            payprint.ShowDialog();
        }

        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string xmonth=toolStripComboBox1.SelectedItem.ToString().Substring(0,1);
            string sql = "select YID as '编号',YName as '姓名',YSex as '性别',Ydep as '部门',YZhiwu as '职务',YBasePay as '基本工资',YJintie as '职务津贴',Yjiangli as '奖励',YFK as '罚款',Yquanqin as '全勤奖金',Yjiaban as '加班工资',Yyingfa as '应发工资',Ygeren as '个人所得税',Ypay as '实发工资',YMonth as '统计月份' from tb_pay where YMonth='"+xmonth+"'";
            operate.BindDataGridView(dataGridView1, sql);
            months = "where YMonth='" + xmonth + "'";
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。