protected void btnWorkflowRoleIn_ServerClick(object sender, EventArgs e) { try { //检查文件选择框是否为可见状态,update by karen;date by 2006-01-15 string file = this.FileUploadDisplay; switch (this.FileRoleUploadDisplay) { case "none": this.btnWorkflowRoleIn.Attributes["onclick"] = "javascript:if(!window.confirm('将清空原有全局角色,确实要导入数据吗?')) return false;"; this.fileRolediv.Style["display"] = "block"; return; } HttpPostedFile UpRoleFile = this.UpRoleFile.PostedFile; WorkFlowInOut.UpXmlDB(this.GetServerPath, UpRoleFile, this.XmlName); WorkFlowInOut wio = new WorkFlowInOut(); wio.SetNewRoleDataSet(this.GetServerPath, this.GetServerPath, this.XmlName, false); Response.Write(Rms.Web.JavaScript.Alert(true, "已成功导入数据")); this.btnWorkflowRoleIn.Attributes["onclick"] = ""; this.fileRolediv.Style["display"] = "none"; } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } }
protected void BT_Up_ServerClick(object sender, System.EventArgs e) { try { HttpPostedFile UpFile = this.Request.Files[0]; WorkFlowInOut.UpXmlDB(this.GetServerPath, UpFile, this.XmlName); Response.Write(Rms.Web.JavaScript.Alert(true, "上传成功")); } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } }