コード例 #1
0
        private void selectsign_Load(object sender, EventArgs e)
        {
            setDate();
            System.DateTime currentTime = new System.DateTime();
            currentTime = System.DateTime.Now;
            String strYMD = currentTime.ToLongDateString();

            comboBox1.Text = strYMD;

            allpeople.Text = getPersonCount().ToString();
            zc.Text        = getCount(comboBox1.Text, "True").ToString();
            cd.Text        = getCount(comboBox1.Text, "False").ToString();
            wqd.Text       = (getPersonCount() - getCount(comboBox1.Text, "True") - getCount(comboBox1.Text, "False")).ToString();


            cmdT = "select eid as 员工号,stime as 签到时间,sflag as 签到状态  from sign where sdate='" + comboBox1.Text + "'";
            DataTable dt    = DBhelper.GetTable(cmdT);
            int       count = dt.Rows.Count;

            if (count % pagesize == 0)
            {
                pagecount = count / pagesize;
            }
            else
            {
                pagecount = count / pagesize + 1;
            }
            allpage.Text = pagecount.ToString();
            index        = 1;
            SetDGV();
        }
コード例 #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            count.Text = getDateCountAD(comboBox1.Text).ToString();
            String cmdText = "select * from ad where date='" + comboBox1.Text + "' ";

            dataGridView1.DataSource = DBhelper.GetTable(cmdText);
        }
コード例 #3
0
        private void selectad_Load(object sender, EventArgs e)
        {
            setDate();
            System.DateTime currentTime = new System.DateTime();
            currentTime = System.DateTime.Now;
            String strYMD = currentTime.ToLongDateString();

            comboBox1.Text = strYMD;
            count.Text     = getDateCountAD(comboBox1.Text).ToString();
            String cmdText = "select * from ad where date='" + comboBox1.Text + "' ";

            dataGridView1.DataSource = DBhelper.GetTable(cmdText);
            this.dataGridView1.Columns[0].FillWeight = 20;
            this.dataGridView1.Columns[1].FillWeight = 170;
        }
コード例 #4
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            depid         = getDeptId(comboBox1.Text);
            allcount.Text = getDeptCountPerson(depid).ToString();
            cmdT          = "select eid as 员工号,ename as 姓名,eage as 年龄,etel as 手机号,ecreatedate as 入职日期  from employee where did=" + depid + "";
            DataTable dt    = DBhelper.GetTable(cmdT);
            int       count = dt.Rows.Count;

            if (count % pagesize == 0)
            {
                pagecount = count / pagesize;
            }
            else
            {
                pagecount = count / pagesize + 1;
            }
            allpage.Text = pagecount.ToString();
            index        = 1;
            SetDGV();
        }
コード例 #5
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            zc.Text  = getCount(comboBox1.Text, "True").ToString();
            cd.Text  = getCount(comboBox1.Text, "False").ToString();
            wqd.Text = (getPersonCount() - getCount(comboBox1.Text, "True") - getCount(comboBox1.Text, "False")).ToString();
            cmdT     = "select eid as 员工号,stime as 签到时间,sflag as 签到状态  from sign where sdate='" + comboBox1.Text + "'";
            DataTable dt    = DBhelper.GetTable(cmdT);
            int       count = dt.Rows.Count;

            if (count % pagesize == 0)
            {
                pagecount = count / pagesize;
            }
            else
            {
                pagecount = count / pagesize + 1;
            }
            allpage.Text = pagecount.ToString();
            index        = 1;
            SetDGV();
        }