public ActionResult Create(UTOrganization departmentEntity)
 {
     try
     {
         ModelOrganizationManageIndex model = new ModelOrganizationManageIndex();
         model.Save(departmentEntity);
         return Content(WebTools.ScriptCloseEmbeddedFrameDialog(DialogOption.GetDefaultInstance()));
     }
     catch
     {
         Error = OASys.Resources.Properties.Resources.M00002E;
         ViewBag.PageState = PageState;
         return View(departmentEntity);
     }
 }
        /// <summary>
        /// 保存或新增组织机构
        /// </summary>
        /// <param name="departmentEntity"></param>
        public void Save(UTOrganization departmentEntity)
        {
            //新增
            if (departmentEntity.ID == Guid.Empty)
            {
                departmentEntity.InputDate = DateTime.Now;
                departmentEntity.InputUser = SessionManager.CurrentSysUser.ID;

                bizUTOrganization.SaveOrUpdate(departmentEntity);
                bizSysLogs.SaveOrUpdate(new SysLogs()
                {
                    OperationTime = DateTime.Now,
                    OperatorName = SessionManager.CurrentSysUser.UserName,
                    MachineIP = HttpContext.Current.Request.UserHostAddress,
                    UserAccount = SessionManager.CurrentSysUser.UserAccount,
                    LogTypeID = 1,
                    LogContent = string.Format("【{0}】在【{1}】对【{2}】的【{3}】做了【{4}】操作", SessionManager.CurrentSysUser.UserName, DateTime.Now, Navigation, string.Format("{0}(ID:{1})", departmentEntity.Name, departmentEntity.ID), "保存")
                });
            }//修改
            else
            {
                UTOrganization uTOrgDepartment = bizUTOrganization.GetFirst(x => x.ID == departmentEntity.ID);
                uTOrgDepartment.UpdateDate = DateTime.Now;
                uTOrgDepartment.UpdateUser = SessionManager.CurrentSysUser.ID;
                uTOrgDepartment.Name = departmentEntity.Name;
                uTOrgDepartment.OrderIndex = departmentEntity.OrderIndex;
                uTOrgDepartment.Remark = departmentEntity.Remark;

                uTOrgDepartment.UpdateDate = DateTime.Now;
                uTOrgDepartment.UpdateUser = SessionManager.CurrentSysUser.ID;
                bizUTOrganization.SaveOrUpdate(uTOrgDepartment);
            }
        }