public ActionResult Create(UTOrganization departmentEntity)
 {
     try
     {
         ModelOrganizationManageIndex model = new ModelOrganizationManageIndex();
         model.Save(departmentEntity);
         var option = DialogOption.GetDefaultInstance();
         option.RefreshOpenerAsynchronous = false;
         return Content(WebTools.ScriptCloseDialog(option));
     }
     catch
     {
         Error = CNDreams.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);
            }//修改
            else
            {
                UTOrganization uTOrgDepartment = bizUTOrganization.GetFirst(ReflectionTools.SerializeExpression<UTOrganization>(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);
            }
        }