Пример #1
0
        public string save(string holiday)
        {
            UserInfoService us             = new UserInfoService();
            string          quanxian_save1 = us.new_quanxian("add", "工作时间及休息日");

            if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是")
            {
            }
            else
            {
                return(ResultUtil.error("没有权限!"));
            }

            try
            {
                hs = new HolidayService();
                if (hs.save(holiday))
                {
                    return(ResultUtil.success("新增成功"));
                }
                else
                {
                    return(ResultUtil.success("新增失败"));
                }
            }
            catch (ErrorUtil err)
            {
                return(ResultUtil.fail(401, err.Message));
            }
            catch
            {
                return(ResultUtil.error("查询失败"));
            }
        }