Exemplo n.º 1
0
        public ReplayBase EditOrgInfo(EditOrgInfoRequestModel condtion)
        {
            condtion.modifiedBy = User.Identity.Name;
            MembersService ms     = new MembersService();
            ReplayBase     result = ms.EditOrgBaseInfo(condtion);

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑组织基础信息
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal ReplayBase EditOrgBaseInfo(EditOrgInfoRequestModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                int num = 0;
                //检查是否有重名
                num = CheckDepartmentCationNumInRootList(condtion.caption, condtion.depmentid);
                if (num == 0)
                {
                    GetOrgBaseInfo(condtion.depmentid);
                    result = BaseSysTemDataBaseManager.DepEditOrgBaseInfo(condtion);//保存信息
                    if (result.ReturnCode == EnumErrorCode.Success)
                    {
                        if (this.orgInfo.baseInfo.caption != condtion.caption)
                        {
                            SearchMemberDepartmentReplay dr = SearchDepartments(new SearchMemberDepartmentRequst()
                            {
                                departmentId = condtion.depmentid,
                                getchild     = true,
                                showdisabled = true,
                                showontheui  = false
                            });
                            List <string> depmentids = new List <string>();
                            foreach (MemberDepartmentBaseInfoModel d in dr.rows)
                            {
                                depmentids.Add(d.depmentid);
                            }
                            BaseSysTemDataBaseManager.DepEditUserDepmentPath(depmentids);
                        }
                    }
                }
                else
                {
                    result.ReturnCode    = EnumErrorCode.EmptyDate;
                    result.ReturnMessage = "该组织名称已存在,不能重复创建";
                }
            }
            catch (Exception e)
            {
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
            }
            return(result);
        }