protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor executor = new ImportExecutor(file, result); var rootOU = PC.SCOrganization.GetRoot(); executor.AddAction(new OguOrganizationImportAction(rootOU) { }); if (Request.Form["includeAcl"] == "includeAcl") { executor.AddAction(new OguAclImportAction(rootOU) { }); } executor.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new AppImportAction() { CopyMode = Request.Form["mergeMode"] == "copyMode", IncludeRoles = Request.Form["iRoles"] == "iRoles", IncludeAcls = Request.Form["iAcl"] == "iAcl", IncludePermissions = Request.Form["iFun"] == "iFun", IncludeRoleDefinitions = Request.Form["iDef"] == "iDef", IncludeRoleMembers = Request.Form["iRoleMembers"] == "iRoleMembers", IncludeRoleConditions = Request.Form["iRoleConditions"] == "iRoleConditions" }); exec.Execute(); return; }
protected void DoDeepFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { if (Path.GetExtension(file.FileName).ToLower() != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } string oguId = Request.Form["parentId"]; if (string.IsNullOrEmpty(oguId)) { throw new HttpException("没有使用parentId"); } Util.EnsureOperationSafe(); PC.SCOrganization parent = oguId == PC.SCOrganization.RootOrganizationID ? PC.SCOrganization.GetRoot() : (PC.SCOrganization)DbUtil.GetEffectiveObject(oguId, "当前组织不存在或已删除"); ImportExecutor executor = new ImportExecutor(file, result); if (Request.Form["includeAcl"] == "includeAcl") { executor.AddAction(new OguAclImportAction(parent) { }); } if (Request.Form["includeUser"] == "includeUser") { executor.AddAction(new OguUserImportAction(parent) { IncludeSecretaries = Request.Form["includeSecretary"] == "includeSecretary" }); } if (Request.Form["includeGroup"] == "includeGroup") { executor.AddAction(new OguGroupImportAction(parent) { IncludeConditions = Request.Form["includeGroupConditions"] == "includeGroupConditions", IncludeMembers = Request.Form["includeGroupMembers"] == "includeGroupMembers" }); } executor.AddAction(new OguFullImportAction(parent) { IncludeOrganizations = this.Request.Form["includeOrg"] == "includeOrg", IncludeAcl = this.Request.Form["includeAcl"] == "includeAcl", IncludeUser = this.Request.Form["includeUser"] == "includeUser", IncludeSecretaries = this.Request.Form["includeSecretary"] == "includeSecretary", IncludeGroup = this.Request.Form["includeGroup"] == "includeGroup", IncludeGroupConditions = this.Request.Form["includeGroupConditions"] == "includeGroupConditions", IncludeGroupMembers = this.Request.Form["includeGroupMembers"] == "includeGroupMembers" }); executor.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new RoleConstMembersImportAction(this.ctlUpload.Tag)); exec.Execute(); return; }
protected void DoFileUpload(HttpPostedFile file, UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new AllUserImportAction() { IncludeOrganizationRelation = Request.Form["includeOrg"] == "includeOrg", IncludeSecretaries = Request.Form["includeSecretaries"] == "includeSecretaries", IncludeGroupConstMembers = this.Request.Form["includeGroupMembers"] == "includeGroupMembers" }); exec.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor executor = new ImportExecutor(file, result); executor.AddAction(new AllGroupImportAction() { IncludeConditions = Request.Form["includeConditionMembers"] == "includeConditionMembers", IncludeMembers = Request.Form["includeConstMembers"] == "includeConstMembers" }); executor.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") { throw new InvalidDataException("上传的文件类型错误"); } ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new PermissionImportAction(this.ctlUpload.Tag) { ApplicationId = Request.Form["parentId"], CopyMode = Request.Form["mergeMode"] == "copyMode" }); exec.Execute(); return; }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new RoleImportAction(this.ctlUpload.Tag) { IncludeConstMembers = Request.Form["iRoleMembers"] == "iRoleMembers", IncludeConditions = Request.Form["iRoleConditions"] == "iRoleConditions", CopyMode = Request.Form["mergeMode"] == "copyMode", IncludeRoleDefinitions = Request.Form["iDef"] == "iDef" }); exec.Execute(); return; }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor executor = new ImportExecutor(file, result); var rootOU = PC.SCOrganization.GetRoot(); executor.AddAction(new OguOrganizationImportAction(rootOU) { }); if (Request.Form["includeAcl"] == "includeAcl") executor.AddAction(new OguAclImportAction(rootOU) { }); executor.Execute(); }
protected void DoFileUpload(HttpPostedFile file, UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new AllUserImportAction() { IncludeOrganizationRelation = Request.Form["includeOrg"] == "includeOrg", IncludeSecretaries = Request.Form["includeSecretaries"] == "includeSecretaries", IncludeGroupConstMembers = this.Request.Form["includeGroupMembers"] == "includeGroupMembers" }); exec.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor executor = new ImportExecutor(file, result); executor.AddAction(new AllGroupImportAction() { IncludeConditions = Request.Form["includeConditionMembers"] == "includeConditionMembers", IncludeMembers = Request.Form["includeConstMembers"] == "includeConstMembers" }); executor.Execute(); }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new GroupConstMembersImportAction(this.ctlUpload.Tag)); exec.Execute(); return; }
protected void DoFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { var fileType = Path.GetExtension(file.FileName).ToLower(); if (fileType != ".xml") throw new InvalidDataException("上传的文件类型错误"); ImportExecutor exec = new ImportExecutor(file, result); exec.AddAction(new PermissionImportAction(this.ctlUpload.Tag) { ApplicationId = Request.Form["parentId"], CopyMode = Request.Form["mergeMode"] == "copyMode" }); exec.Execute(); return; }
protected void DoDeepFileUpload(HttpPostedFile file, MCS.Web.WebControls.UploadProgressResult result) { if (Path.GetExtension(file.FileName).ToLower() != ".xml") throw new InvalidDataException("上传的文件类型错误"); string oguId = Request.Form["parentId"]; if (string.IsNullOrEmpty(oguId)) throw new HttpException("没有使用parentId"); Util.EnsureOperationSafe(); PC.SCOrganization parent = oguId == PC.SCOrganization.RootOrganizationID ? PC.SCOrganization.GetRoot() : (PC.SCOrganization)DbUtil.GetEffectiveObject(oguId, "当前组织不存在或已删除"); ImportExecutor executor = new ImportExecutor(file, result); if (Request.Form["includeAcl"] == "includeAcl") executor.AddAction(new OguAclImportAction(parent) { }); if (Request.Form["includeUser"] == "includeUser") { executor.AddAction(new OguUserImportAction(parent) { IncludeSecretaries = Request.Form["includeSecretary"] == "includeSecretary" }); } if (Request.Form["includeGroup"] == "includeGroup") { executor.AddAction(new OguGroupImportAction(parent) { IncludeConditions = Request.Form["includeGroupConditions"] == "includeGroupConditions", IncludeMembers = Request.Form["includeGroupMembers"] == "includeGroupMembers" }); } executor.AddAction(new OguFullImportAction(parent) { IncludeOrganizations = this.Request.Form["includeOrg"] == "includeOrg", IncludeAcl = this.Request.Form["includeAcl"] == "includeAcl", IncludeUser = this.Request.Form["includeUser"] == "includeUser", IncludeSecretaries = this.Request.Form["includeSecretary"] == "includeSecretary", IncludeGroup = this.Request.Form["includeGroup"] == "includeGroup", IncludeGroupConditions = this.Request.Form["includeGroupConditions"] == "includeGroupConditions", IncludeGroupMembers = this.Request.Form["includeGroupMembers"] == "includeGroupMembers" }); executor.Execute(); }