Пример #1
0
        /// <summary>
        /// 提交请假申请
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public static bool SubLeave(Entity.Leave l, out string msg)
        {
            TimeSpan ts1 = l.lStart.AddMinutes(5) - System.DateTime.Now;
            double   i1  = ts1.Seconds;
            TimeSpan ts2 = l.lStop.AddMinutes(5) - l.lStart;
            double   i2  = ts2.Seconds;

            if (i1 <= 0)
            {
                msg = "假期开始时间不可早于当前时间!";
                return(false);
            }

            else if (i2 <= 0)
            {
                msg = "假期结束时间不可早于开始时间!";
                return(false);
            }

            else if (EDAL.WorkDAL.SubLeave(l) > 0)
            {
                msg = "您的请假申请已提交,请耐心等待答复!";
                return(true);
            }
            else
            {
                msg = "抱歉,申请提交失败!";
                return(false);
            }
        }
Пример #2
0
 /// 报到
 /// </summary>
 /// <returns></returns>
 public static bool UpLState(Entity.Leave l)
 {
     if (EDAL.WorkDAL.UpLState(l) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 /// <summary>
 /// 更新信息状态
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public static void UpState(Entity.Leave l)
 {
     EDAL.WorkDAL.UpPState(l);
 }