KingNET.Business/WebServices/Adm/AdmDeptService.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DMSFrame.WebService;
using KingNET.Param.Adm;
using KingNET.Entity;
using KingNET.Entity.DBEntity;
using KingNET.PageLib.Utils;
using KingNET.Param;
using DMSFrame;


namespace KingNET.Business.WebServices
{
    /// <summary>
    /// 注意命名空间必须是KingNET.Business.WebServices,后缀必须是以Service结尾
    /// </summary>
    public class AdmDeptService : WebServiceFrameBase
    {
        #region Dept
        public void addDept(BaseResult result, admDeptParam param, string action)
        {
            Adm_DeptBLL adm_deptbll = new Adm_DeptBLL();
            if (action == "Add")
            {
                if (!CheckRight("DeptListAdd", ref result))
                {
                    return;
                }
                if (adm_deptbll.ExistsDept(param.DeptName))
                {
                    result.errno = 1;
                    result.errmsg = "机构名称已存在!";
                    return;
                }
                Adm_Dept entity = new Adm_Dept()
                {
                    CreateTime = DateTime.Now,
                    CreateUser = userTicket.UserID,
                    DeleteFlag = false,
                    DeleteTime = StaticConst.DATEBEGIN,
                    DeptName = param.DeptName,
                    DeptParentID = param.DeptParentID.HasValue ? param.DeptParentID : 0,
                    Remark = string.IsNullOrEmpty(param.Remark) ? "" : param.Remark,
                    StatusFlag = EnumStatusFlag.Passed,
                    UpdateTime = StaticConst.DATEBEGIN,
                    UpdateUser = 0,
                };

                entity.DeptID = adm_deptbll.InsertIdentity(entity);
                if (entity.DeptID > 0)
                {

                }
                else
                {
                    result.errno = 1;
                    result.errmsg = "添加机构失败";
                }
后面还有 52 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。