Exemplo n.º 1
0
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            clsUser user = new clsUser();
            FrmCheckAttendenceLog frm = new FrmCheckAttendenceLog(ENo, 1, OperatorNo, user);

            frm.Owner = this;
            frm.ShowDialog();
            this.txtNo.Text = user.Eno.ToString();
        }
Exemplo n.º 2
0
        private void  除ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int    count = 0;
            string sql   = "select count(*) from t_salary";

            count = (int)DAO.ExecuteScalar(sql);
            if (count <= 0)
            {
                MessageBox.Show("无工资记录!");
                return;
            }
            else
            {
                FrmCheckAttendenceLog frm = new FrmCheckAttendenceLog(Eno, 2);
                frm.ShowDialog();
            }
        }
Exemplo n.º 3
0
 private void btnBrowseAttendence_Click(object sender, EventArgs e)
 {
     if (txtNo.Text == null || txtNo.Text == "")
     {
         MessageBox.Show("请重新选择员工!");
         return;
     }
     else
     {
         ENo = int.Parse(txtNo.Text.Trim());
         string sql   = String.Format("select count(*) from t_CheckRecord where Eno='{0}' and CONVERT(varchar(20), OffWorkTime, 120) like '{1}%'", ENo, DateTime.Now.ToShortDateString().Substring(0, 7));
         int    count = (int)DAO.ExecuteScalar(sql);
         if (count <= 0)
         {
             MessageBox.Show("本月没有职工考勤记录!");
             return;
         }
         else
         {
             FrmCheckAttendenceLog frm = new FrmCheckAttendenceLog(ENo, 0);
             frm.ShowDialog();
         }
     }
 }