Ejemplo n.º 1
0
        ///<summary>
        ///查询部门任务
        ///</summary>
        private void ClassProject(string ProjectId)
        {
            DataTable dt = new DataTable();

            //通过ID查询部门状态是0并且不等于21
            dt = TaskBll.GetList(5, "delflag='0' and Status <>  2  and id='" + ProjectId + "'", "StartTime asc").Tables[0];
            GridView_ClassProject.DataSource = dt;
            GridView_ClassProject.DataBind();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 显示部门任务
        /// </summary>
        /// <param name="strRealName"></param>
        /// <param name="strUserName"></param>
        /// <param name="strDateTime"></param>
        protected void ShowClassProject(string strRealName, string strUserName, string strDateTime)
        {
            try
            {
                DataTable dt     = new DataTable();
                string    strsql = "select top 5 * from vProject_Task where Pro_DELFLAG='0' and Pro_Status=1 and '" + strDateTime + "' between StartTime and endTime and delflag = '0' and Status <> 2 and userInfo Like '%" + strRealName + "(" + strUserName + ")" + "%' order by StartTime asc";
                dt = pagedosql.doSql(strsql).Tables[0];

                if (dt != null)
                {
                    GridView_ClassProject.DataSource = dt;
                    GridView_ClassProject.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取当前用户在选定的月份中的部门任务列表
        /// </summary>
        /// <param name="strRealName"></param>
        /// <param name="strUserName"></param>
        /// <param name="strDateTime"></param>
        protected void ShowClassProject_month(string strRealName, string strUserName, string months)
        {
            try
            {
                DataTable dt         = new DataTable();
                DateTime  selectTime = DateTime.Parse(months);
                DateTime  nexttime   = selectTime.AddMonths(1);

                string strsql = "select top 5 * from vProject_Task where Pro_DELFLAG='0' and Pro_Status=1 and  StartTime>'" + selectTime.ToString() + "' and  endTime<'" + nexttime.ToString() + "'  and delflag = '0' and Status <> 2 and userInfo Like '%" + strRealName + "(" + strUserName + ")" + "%' order by StartTime asc";
                dt = pagedosql.doSql(strsql).Tables[0];

                if (dt != null)
                {
                    GridView_ClassProject.DataSource = dt;
                    GridView_ClassProject.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }