public override void GenerateHtml(string name, XDoc config) { commadConfig = new CmdConfig(this.Form.Data); if (commadConfig == null) { DisplayError("Cannot init Web Form Control"); } commadConfig.LoadConfig(); if (!commadConfig.SQLIsValid()) { DisplayError("Invalid SQL query"); } else { DisplaySQL(); } }
public override Return OnPreExecute() { conf = new CmdConfig(this.Command.Doc); if (!conf.LoadConfig()) { return(Return.Error); } if (conf.simulate) { Sys.Log("SIMULATE MODE"); } if (!conf.simulate) { //try to create destination file if (!CanCreateFile()) { return(Return.Error); } } return(Return.Continue); }