Exemplo n.º 1
0
        /// <summary>
        /// 登陆的用户添加自己的日程的方法
        /// </summary>
        /// <param name="_c"></param>
        /// <returns></returns>
        public ActionResult AddCalendar()
        {
            Calendar c = new Calendar();

            string ActionTime = Request["ActionTime"];

            c.ActionTime = ActionTime;

            DateTime dt      = Convert.ToDateTime(ActionTime);
            string   newdate = dt.DayOfWeek.ToString();

            newdate        = GetDate(newdate);
            c.ScheduleDate = newdate;

            string Schedule = Request["Schedule"];

            c.Schedule = Schedule;

            EmployeeInfo em = (EmployeeInfo)Session["Employeer"];

            c.EmployeeID = em.ID;

            bool isAdd = dal.AddCalendar(c);

            //ViewBag.isAdd = isAdd;
            return(RedirectToAction("AddLists"));
        }