public string Post(VacationDto vacation)
        {
            vacation.CreateTime = DateTime.Now;
            vacation.NID        = Guid.NewGuid().ToString();
            var model = EmitCore.Convert <VacationDto, Vacation>(vacation);

            vacationService.Insert(model);
            return(CommonMethods.Start(vacation.NID, "001001", vacation.UID, String.Format("{0}请假{1}天", vacation.Name, vacation.Day)));
        }
        public string Post(Vacation vacation)
        {
            vacation.Day = vacation.EndDate.Subtract(vacation.StartDate).Days;
            string key = (String.IsNullOrEmpty(vacation.NID)) ? Guid.NewGuid().ToString() : vacation.NID;

            if (String.IsNullOrEmpty(vacation.NID))
            {
                vacation.CreateDateTime = DateTime.Now;
                vacation.NID            = key;
                vacation.NodeName       = "开始";
                vacationService.Insert(vacation);
            }
            else
            {
                vacationService.Update(vacation);
            }
            return(key);
        }