public void End(bool reboot) { Programador.Stop(); if (this.PV != 0) { using (System.Data.IDbTransaction Trans = this.Impresora.DataBase.BeginTransaction()) { qGen.Update Actualizar = new qGen.Update("pvs", new qGen.Where("id_pv", this.PVenta)); Actualizar.Fields.AddWithValue("lsa", null); this.Impresora.DataBase.Execute(Actualizar); Trans.Commit(); } } Impresora.Terminar(); FormEstado.Close(); if (reboot) { string[] ParametrosAPasar = (string[])(this.Arguments); ParametrosAPasar[0] = ""; string Params = string.Join(" ", ParametrosAPasar).Trim(); Lfx.Environment.Shell.Execute(this.ExecutableName, Params, System.Diagnostics.ProcessWindowStyle.Minimized, false); } System.Windows.Forms.Application.Exit(); }
public void End(bool reboot) { Programador.Stop(); if (this.PV != 0) { try { using (System.Data.IDbTransaction Trans = this.Impresora.Connection.BeginTransaction()) { qGen.Update Actualizar = new qGen.Update("pvs", new qGen.Where("id_pv", this.PVenta)); Actualizar.ColumnValues.AddWithValue("lsa", null); this.Impresora.Connection.ExecuteNonQuery(Actualizar); Trans.Commit(); } } catch (Exception ex) { Log.Error(ex.Message); } } Impresora.Terminar(); FormEstado.Close(); if (reboot) { Lfx.Environment.Shell.Execute(System.Environment.CommandLine, string.Join(" ", System.Environment.GetCommandLineArgs()), System.Diagnostics.ProcessWindowStyle.Minimized, false); } System.Windows.Forms.Application.Exit(); }