protected void Button5_ServerClick(object sender, EventArgs e) { try { //检查文件选择框是否为可见状态,update by karen;date by 2006-01-15 string file = this.FileUploadDisplay; switch (this.FileUploadDisplay) { case "none": this.Button5.Attributes["onclick"] = "javascript:if(!window.confirm('将清空原有流程表,确实要导入数据吗?')) return false;"; this.filediv.Style["display"] = "block"; return; } HttpPostedFile UpFile = this.UpFile.PostedFile; WorkFlowInOut.UpXmlDB(this.GetServerPath, UpFile, this.XmlName); WorkFlowInOut wio = new WorkFlowInOut(); wio.SetNewDataSet(this.GetServerPath, this.GetServerPath, this.XmlName, false); Response.Write(Rms.Web.JavaScript.Alert(true, "已成功导入数据")); this.Button5.Attributes["onclick"] = ""; this.filediv.Style["display"] = "none"; } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } }
protected void BT_OutWorkFlow_ServerClick(object sender, System.EventArgs e) { try { //WorkFlowInOut wio = new WorkFlowInOut(); //wio.OverWriteAllWorkFlow(this.GetOldDataPath,this.GetServerPath); WorkFlowInOut wio = new WorkFlowInOut(); wio.SetNewDataSet(this.GetServerPath, this.GetOldDataPath, "WorkFlowDB.xml"); Response.Write(Rms.Web.JavaScript.Alert(true, "已成功导入数据")); } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } }