示例#1
0
        /// <summary>
        /// 查询出个人任务
        /// </summary>
        private void PersonProjectShow(string PersonId)
        {
            DataTable dt = new DataTable();

            //通过ID查询出状态是0并且不等于的2
            dt = PlanPersonalBll.GetList(5, "Delflag = '0' and Status <> 2 and  id = '" + PersonId + "'", "StartTime asc").Tables[0];
            GridView_PresonProject.DataSource = dt;
            GridView_PresonProject.DataBind();
        }
示例#2
0
        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            //获得传进来的用户ID
            string    strId = Session["User_users"].ToString();
            DataTable dt    = new DataTable();
            //获得选中的时间
            string strdateTime = Calendar1.SelectedDate.ToString();
            //通过ID获得用户在这个时间内的任务
            string strsql = "select top 5 * from Personal_plan where '" + strdateTime + "' between StartTime and endTime and delflag ='0' and Status <> 2 and UserId = '" + strId + "' order by StartTime asc ";

            dt = pageControl.doSql(strsql).Tables[0];
            GridView_PresonProject.DataSource = dt;
            GridView_PresonProject.DataBind();
        }
示例#3
0
        ///// <summary>
        ///// 查看自己的便签条
        ///// </summary>
        ///// <param name="strId"></param>
        //protected void ShowNote(string strId)
        //{
        //    try
        //    {
        //        DataTable dt = new DataTable();

        //        dt = bNotepad.GetList(2, "delflag = '0' and UserId='" + strId + "'", "ID DESC").Tables[0];
        //        if (dt != null)
        //        {
        //            GridVie_NoteDetial.DataSource = dt;
        //            GridVie_NoteDetial.DataBind();
        //        }
        //        else
        //        {

        //        }
        //    }
        //    catch (Exception)
        //    {
        //    }
        //}

        /// <summary>
        /// 通过ID获得自己个人计划
        /// </summary>
        /// <param name="PersonId"></param>
        protected void ShowPersonProject(string PersonId, string strDateTime)
        {
            try
            {
                DataTable dt = new DataTable();
                //通过ID查询出状态是0并且不等于的2
                string strDateTimeStart = DateTime.Parse(strDateTime).ToString("yyyy-MM-dd") + " 23:59:00";
                string strDateTimeEnd   = DateTime.Parse(strDateTime).ToString("yyyy-MM-dd") + " 00:00:00";
                dt = bPlan.GetList(5, "Delflag = '0' and Status <> 2 and  UserID = '" + PersonId + "' and '" + strDateTimeStart + "' > StartTime and '" + strDateTimeEnd + "'< endTime", "StartTime asc").Tables[0];
                if (dt != null)
                {
                    GridView_PresonProject.DataSource = dt;
                    GridView_PresonProject.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }
示例#4
0
        /// <summary>
        /// 获取当前用户在选定的月份中的个人计划列表
        /// </summary>
        /// <param name="PersonId"></param>
        protected void ShowPersonProject_month(string PersonId, string months)
        {
            try
            {
                DataTable dt         = new DataTable();
                DateTime  selectTime = DateTime.Parse(months);
                DateTime  nexttime   = selectTime.AddMonths(1);

                //通过ID查询出状态是0并且不等于的2
                dt = bPlan.GetList("Delflag = '0' and Status <> 2 and  UserID = '" + PersonId + "' and  StartTime>'" + selectTime.ToString() + "' and  endTime<'" + nexttime.ToString() + "'  order by StartTime asc").Tables[0];
                if (dt != null)
                {
                    GridView_PresonProject.DataSource = dt;
                    GridView_PresonProject.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }