public string gerarPdf(string header, BasicInfoClass basicInfo) { System.IO.File.WriteAllText(@"C:/Users/fernandat/Documents/Visual Studio 2015/Projects/Chiesi/Chiesi/relatorioPdf.html", "<h1>" + reportTxt + "</h1>", Encoding.UTF8); return("PDF FINAL GERADO"); }
//conts public FillingStart(EquipamentType typeEq, string Product) { this.eq = this.eqFact.ConstructEquipament(typeEq); this.infos = BasicInfoClass.GetBasicInfo(); this.prod = ProductClass.GetProductClass(); this.tank = TankClass.GetTankClass(); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); }
public Pdf(string txt) { reportTxt = txt; binfos = BasicInfoClass.GetBasicInfo(); logClass = new LogClass(); text = new Text(); Batch = binfos.KeepBatch; eq = eqFact.ConstructEquipament(EquipamentType.PLC); }
public BeginOfManipulation(EquipamentType typeEq, string OperationName, string Product) { this.eq = this.eqFact.ConstructEquipament(typeEq); this.OperationName = OperationName; this.prod = ProductClass.GetProductClass(); this.basicInfo = BasicInfoClass.GetBasicInfo(); this.errorlog = new ErrorLog(); this.convert = new Convertion(typeEq); this.logAction = new LogAction(); }
public EndFilling(EquipamentType typeEq, bool checkBreak) { this.eq = this.eqFact.ConstructEquipament(typeEq); this.infos = BasicInfoClass.GetBasicInfo(); this.tank = TankClass.GetTankClass(); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); this.checkBreak = checkBreak; //this.logAction = new //logAction(); }
public RecirculationHoseDrain(EquipamentType typeEq) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) this.operationID = "11"; this.eq = this.eqFact.ConstructEquipament(typeEq); this.OperationName = OperationName; this.prod = ProductClass.GetProductClass(); this.infos = BasicInfoClass.GetBasicInfo(); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); //this.logAction = new //logAction(); }
public ZeroLoadCell(EquipamentType typeEq) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) // e a ZeroLoadCell this.operationID = "2"; this.tank = TankClass.GetTankClass(); this.basicInfo = BasicInfoClass.GetBasicInfo(); this.eq = this.eqFact.ConstructEquipament(typeEq); errorlog = new ErrorLog(); this.convert = new Convertion(typeEq); this.logAction = new LogAction(); }
public EndOfManipulation(EquipamentType typeEq, bool checkBreak, bool gerarPdf) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) this.operationID = "12"; this.infos = BasicInfoClass.GetBasicInfo(); this.eq = this.eqFact.ConstructEquipament(typeEq); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); this.checkBreak = checkBreak; this.gerarPdf = gerarPdf; //this.logAction = new //logAction(); }
public TankFinalWeight(EquipamentType typeEq, string OperationName, bool checkBreak) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) this.operationID = "11"; this.eq = this.eqFact.ConstructEquipament(typeEq); this.OperationName = OperationName; this.checkBreak = checkBreak; this.infos = BasicInfoClass.GetBasicInfo(); this.tanks = TankClass.GetTankClass(); this.errorlog = new ErrorLog(); this.convert = new Convertion(typeEq); //this.logAction = new //logAction(); }
public TempMonitoringClass(EquipamentType typeEq, bool checkBreak) { //ID da Operação - cada operação possui um ID exceto a incial this.operationID = "4"; this.eq = this.eqFact.ConstructEquipament(typeEq); this.shaker = ShakerClass.GetShakerClass(); this.prod = ProductClass.GetProductClass(); this.basicInfo = BasicInfoClass.GetBasicInfo(); this.errorlog = new ErrorLog(); this.convert = new Convertion(typeEq); this.checkBreak = checkBreak; //this.logAction = new //logAction(); }
public AdditionClass(EquipamentType typeEq, string headerName, bool checkBreak, bool gerarPdf, int index) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) this.operationID = "7"; this.eq = this.eqFact.ConstructEquipament(typeEq); this.index = index; this.headerName = headerName; this.checkBreak = checkBreak; this.gerarPdf = gerarPdf; this.infos = BasicInfoClass.GetBasicInfo(); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); //this.logAction = new //logAction(); }
//conts public FirstLoading(EquipamentType typeEq, string headerName, string limitFlow, string limitCell, int index) { this.operationID = "3"; this.index = index; this.eq = this.eqFact.ConstructEquipament(typeEq); this.headerName = headerName; this.flux = FlowmeterClass.GetFlowmeterClass(); this.cell = LoadingCellClass.GetLoadingCellClass(); this.infos = BasicInfoClass.GetBasicInfo(); this.errorlog = new ErrorLog(); this.limitCell = limitCell; this.limitFlow = limitFlow; this.convert = new Convertion(typeEq); //this.logAction = new //logAction(); }
public FourthLoadingClass(EquipamentType typeEq, string headerName, string limitFlow, string limitCell, int index) { //ID da Operação - cada operação possui um ID exceto a incial this.index = index; this.operationID = "5"; this.eq = this.eqFact.ConstructEquipament(typeEq); this.headerName = headerName; this.flux = FlowmeterClass.GetFlowmeterClass(); this.cell = LoadingCellClass.GetLoadingCellClass(); this.infos = BasicInfoClass.GetBasicInfo(); this.gli = GlicerolClass.GetGlicerolClass(); this.errorlog = new ErrorLog(); this.limitCell = limitCell; this.limitFlow = limitFlow; this.convert = new Convertion(typeEq); //this.logAction = new //logAction(); }
public string gerarPdf(string header, BasicInfoClass basicInfo) { string preBody = "<html>" + " <head>"; preBody += "<link rel='stylesheet' type='text/css' href='" + ConfigurationManager.AppSettings["STYLESHEET"] + "'/>" + "<meta charset='UTF - 8'/>" + " </head>" + " <body>"; string posBody = "</body></html>"; string curpath = Directory.GetCurrentDirectory(); string path = ConfigurationManager.AppSettings["RELATORIOPATH"]; string pathBckp = ConfigurationManager.AppSettings["RELATORIOPATHBCKP"]; string logopath = ConfigurationManager.AppSettings["LOGOPATH"]; var headermodified = header.Replace("/", ""); var htmlContent = preBody + "<h1 id='produto'>" + reportTxt + "</h1>" + posBody; var htmlToPdf = new HtmlToPdfConverter(); htmlToPdf.CustomWkHtmlPageArgs = "--encoding utf-8 --images "; htmlToPdf.PageHeaderHtml = "<img id = 'logo' src = '" + logopath + "' >"; htmlToPdf.PageFooterHtml = "<img class='fot' src =''>"; var pdfBytes = htmlToPdf.GeneratePdf(htmlContent); File.WriteAllBytes(path + headermodified + Batch + ".pdf", pdfBytes); File.WriteAllBytes(pathBckp + headermodified + Batch + ".pdf", pdfBytes); eq.Write(ConfigurationManager.AppSettings["OKREAD"], "True"); //htmlToPdf.LogReceived += (sender, e) => //{ // Console.WriteLine("WkHtmlToPdf Log: {0}", e.Data); //}; //logClass.writeLog(header, basicInfo); Status.SetModeToIdle(); text.cleanTxt(); return("PDF FINAL GERADO"); }
public ValveClass(EquipamentType typeEq, string valveTime, bool checkIniValve, bool finalValve, string lowLimit, string highLimit, string valvName, string id) { //ID da Operação - cada operação possui um ID exceto a incial(BeginOfMAnipulation) this.operationID = id; this.valvName = valvName; this.checkIniValve = checkIniValve; this.finalValve = finalValve; this.lobules = LobulesClass.GetLobulesClass(); this.anchor = AnchorClass.GetAnchorClass(); this.basicInfo = BasicInfoClass.GetBasicInfo(); this.valveTime = valveTime; this.highLimit = highLimit; this.lowLimit = lowLimit; this.errorlog = new ErrorLog(); this.convert = new Convertion(typeEq); this.eq = this.eqFact.ConstructEquipament(typeEq); //this.logAction = new //logAction(); }
public LowSpeedMix(EquipamentType typeEq, string mixTime, string rpmLimit, bool checkBreak, bool secondTable = false) { //ID da Operação - cada operação possui um ID exceto a incial this.operationID = "8"; this.basicInfo = BasicInfoClass.GetBasicInfo(); this.anchor = AnchorClass.GetAnchorClass(); this.mixTime = mixTime; this.eq = this.eqFact.ConstructEquipament(typeEq); this.errorlog = new ErrorLog(); this.rpmLimit = rpmLimit; this.checkBreak = checkBreak; this.convert = new Convertion(typeEq); if (secondTable == true) { this.secondTable = true; } else { this.secondTable = false; } //this.logAction = new //logAction(); }
public void writeLog(string header, BasicInfoClass basicInfo) { // Pega do App.config o endereço para salvar o Log AD string path = ConfigurationManager.AppSettings["PATHADCHIESI"] + ".txt"; // This text is added only once to the file. if (!File.Exists(path)) { // Create a file to write to. using (StreamWriter sw = File.CreateText(path)) { sw.WriteLine(header + ", gerado por: " + '\n' + " Assinatura: " + basicInfo.OperatorLogin + '\n' + " Data: " + basicInfo.Date.ToString("dd/MM/yyyy") + '\n' + " Hora: " + basicInfo.Hour.ToString("HH:mm:ss") + '\n'); } } // This text is always added, making the file longer over time // if it is not deleted. using (StreamWriter sw = File.AppendText(path)) { sw.WriteLine(header + ", gerado por: " + '\n' + " Assinatura: " + basicInfo.OperatorLogin + '\n' + " Data: " + basicInfo.Date.ToString("dd/MM/yyyy") + '\n' + " Hora: " + basicInfo.Hour.ToString("HH:mm:ss") + '\n'); } // Open the file to read from. using (StreamReader sr = File.OpenText(path)) { string s = ""; while ((s = sr.ReadLine()) != null) { Console.WriteLine(s); } } }
public HighSpeedMix(EquipamentType typeEq, string anchorLimit, string turbineLimit, string clenilLimit, string clenilStrongLimit, bool changeTable, bool clenilForte, bool checkBreak, string mixTime, int index) { //ID da Operação - cada operação possui um ID exceto a incial this.operationID = "6"; this.index = index; this.basicInfo = BasicInfoClass.GetBasicInfo(); this.anchor = AnchorClass.GetAnchorClass(); this.turbine = TurbineClass.GetTurbineClass(); this.clenil = ClenilClass.GetClenilClass(); this.clenilStrong = ClenilStrong.GetClenilStrong(); this.anchorLimit = anchorLimit; this.turbineLimit = turbineLimit; this.clenilLimit = clenilLimit; this.clenilForte = clenilForte; this.checkBreak = checkBreak; this.mixTime = mixTime; this.clenilStrongLimit = clenilStrongLimit; this.changeTable = changeTable; this.eq = this.eqFact.ConstructEquipament(typeEq); this.convert = new Convertion(typeEq); this.errorlog = new ErrorLog(); //this.logAction = new //logAction(); }
//public Dictionary<string, string> tagValues = new Dictionary<string, string>(); public Text() { this.LastValues = new Dictionary <string, Dictionary <string, string> >(); binfos = BasicInfoClass.GetBasicInfo(); }