Ejemplo n.º 1
0
        //按时间查询
        public static DataTable Work1(Entity.Work work1)
        {
            string    sqlstr = "select WID,PName,Work.PID,Wtime,WState from Work,Person where Person.PID=Work.PID and Wtime='" + work1.wTime + "' ";
            DataTable dt1    = DBHelper.GetDT(sqlstr);

            return(dt1);
        }
Ejemplo n.º 2
0
        private void btn_find_Click(object sender, EventArgs e)
        {
            Entity.Work       wr = new Entity.Work();
            Entity.Department dp = new Entity.Department();
            Entity.Person     pr = new Entity.Person();
            if (radioButton1.Checked)
            {
                wr.wTime = this.dateTimePicker1.Value;
                dataGridView1.DataSource = BLL.WorkBLL.work5(wr, this.dateTimePicker2.Value);
                int i = this.dataGridView1.Rows.Count;
                if (i == 0)
                {
                    Msg.Box.Show("未查找到您所要的信息!");
                }
            }
            else if (radioButton2.Checked)
            {
                dp.depID = int.Parse(this.comboBox1.SelectedValue.ToString());

                dataGridView1.DataSource = BLL.WorkBLL.work2(dp);
                int i = this.dataGridView1.Rows.Count;
                if (i == 0)
                {
                    Msg.Box.Show("未查找到您所要的信息");
                }
            }
            else
            {
                Msg.Box.Show("您还未勾选查询方式!");
                return;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 按时间段查询
 /// </summary>
 /// <returns></returns>
 public static DataTable work5(Entity.Work w, DateTime stoptime)
 {
     return(DAL.WorkDAL.work5(w, stoptime));
 }
Ejemplo n.º 4
0
 //按时间查询
 public static DataTable Work1(Entity.Work work1)
 {
     return(DAL.WorkDAL.Work1(work1));
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 按时间段查询
        /// </summary>
        /// <returns></returns>
        public static DataTable work5(Entity.Work w, DateTime stopTime)
        {
            DataTable dt = DBHelper.GetDT("select WID,PName,Work.PID,Wtime,WState,DepName from Work,Person,Department,Job where Person.PID=Work.PID and Person.JID=Job.JID and Job.DepID=Department.DepID  and Wtime between '" + w.wTime + "' and '" + stopTime + "'");

            return(dt);
        }