Esempio n. 1
0
        public string getDateInfo(string userId, string startDay1, string endData1)
        {
            string couw = "";

            try
            {
                DateTime startDay = DateTime.Parse(startDay1);
                DateTime endData  = DateTime.Parse(endData1);
                //用户的计划包括个人计划和项目任务,而且数据
                userId   = commons.RequestSafeString(userId, 50);
                startDay = DateTime.Parse(startDay.ToString("yyyy-MM-dd") + " 00:00:00");
                endData  = DateTime.Parse(endData.ToString("yyyy-MM-dd") + " 23:59:59");
                DateTime s = DateTime.Parse(startDay.ToString("yyyy-MM-dd"));
                DateTime e = DateTime.Parse(endData.ToString("yyyy-MM-dd"));
                int      i = int.Parse(commons.DateDiff(s, e));
                if (i >= 0)
                {
                    for (int j = 0; j <= i; j++)
                    {
                        DateTime s1 = DateTime.Parse(s.AddDays(j).ToString("yyyy-MM-dd") + " 00:00:00");
                        //DateTime e1 = DateTime.Parse(s.AddDays(j).ToString("yyyy-MM-dd") + " 23:59:59");
                        couw = couw + "<day date=\"" + s.AddDays(j).ToString("yyyy-MM-dd") + "\">";
                        couw = couw + getPersonal_Plan(userId, s1);
                        couw = couw + getProject_Plan(userId, s1);
                        couw = couw + "</day>";
                    }
                }
            }
            catch
            {
            }
            return(couw);
        }