private void GuardarXmlComo(string footerText, string mesSelected, string quincenaSelected, string añoSelected) { string saveFolder; string periodo = ""; this.Text = this.Text + " - Guardando..."; try { if (!Directory.Exists(INIT_PATH + "\\Otras liquidaciones")) { Directory.CreateDirectory(INIT_PATH + "\\Otras liquidaciones"); } saveFileDialog1.InitialDirectory = Path.GetFullPath(INIT_PATH + "\\Otras liquidaciones"); if (saveFileDialog1.ShowDialog() == DialogResult.OK) { saveFolder = saveFileDialog1.FileName; switch (quincenaSelected) { case "No especificar": periodo = string.Format("{0} de {1}", UsuarioSingleton.Instance.Meses[Convert.ToInt32(mesSelected)].ToUpper(), añoSelected); break; case "Primera": periodo = string.Format("{0} de {1} (Quincena 1)", UsuarioSingleton.Instance.Meses[Convert.ToInt32(mesSelected)].ToUpper(), añoSelected); break; case "Segunda": periodo = string.Format("{0} de {1} (Quincena 2)", UsuarioSingleton.Instance.Meses[Convert.ToInt32(mesSelected)].ToUpper(), añoSelected); break; } ManejoXML.GuardarXmlReciboBuilderMini(dgvDetalle, añoSelected, mesSelected, quincenaSelected, saveFolder, _legajo.NumeroLegajo, _legajo.NombreEmpleado, tbxPuesto.Text.ToUpper(), _legajo.FechaIngreso, tbxConvenio.Text.ToUpper(), periodo, footerText); saveFileDialog1.Dispose(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Text = this.Text.Replace(" - Guardando...", ""); } }