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 AdminUnitImportAction() { ParentID = this.ctlUpload.Tag, IncludeRoleMembers = Request.Form["includeSchemaRoles"] == "includeSchemaRoles", IncludeScopeConditions = Request.Form["includeScopeCondition"] == "includeScopeCondition", ImportSubUnits = Request.Form["deepImport"] == "deepImport" }); executor.Execute(); }
internal ImportContext(ImportExecutor executor) { this.executor = executor; }