private void button1_Click(object sender, EventArgs e) { Properties.Settings.Default.Pass = textBox3.Text; Properties.Settings.Default.RutaEmpresaADM = seleccionEmpresa1.lrutaempresa; RegConcepto Factura = (RegConcepto)comboBox1.SelectedItem; Properties.Settings.Default.Concepto = Factura.Codigo.Trim(); Properties.Settings.Default.Save(); string archivo = botonExcel1.mRegresarNombre(); lrn.mLLenarInfoFacturacionMasiva(archivo); List <string> lista = new List <string>(); bool incluyetimbrado = true; lista = lrn.mGrabarDoctos(incluyetimbrado, 1); if (lista.Count != 0) { MessageBox.Show(lista[0].ToString()); } else { MessageBox.Show("Proceso Terminado"); } }
private void mProcesar(int manual = 1) { Properties.Settings.Default.Pass = textBox3.Text; Properties.Settings.Default.RutaEmpresaADM = empresasComercial1.aliasbdd; RegConcepto Factura = (RegConcepto)comboBox1.SelectedItem; Properties.Settings.Default.Concepto = Factura.Codigo.Trim(); RegConcepto Devolucion = (RegConcepto)comboBox2.SelectedItem; Properties.Settings.Default.ConceptoD = Devolucion.Codigo.Trim(); RegConcepto Pago = (RegConcepto)comboBox3.SelectedItem; Properties.Settings.Default.ConceptoP = Pago.Codigo.Trim(); Properties.Settings.Default.Save(); string archivo = textBox1.Text; //lrn.mLLenarInfoFacturacionMasiva(archivo); string lllenardocumento = lrn.mLlenarinfoXML(archivo); if (lllenardocumento == "") { List <string> lista = new List <string>(); bool incluyetimbrado = true; long folio = 0; listaerrores.Clear(); lrn.mGrabarDoctosComercial(1, ref folio, 1); if (listaerrores.Count != 0) { if (manual == 1) { MessageBox.Show("Existen errores por favor revise bitacora"); } mGrabaErroresBitacora(); } else if (manual == 1) { MessageBox.Show("Proceso Terminado"); } } else { MessageBox.Show(lllenardocumento); } }
private void button1_Click(object sender, EventArgs e) { //Properties.Settings.Default.Pass = textBox3.Text; Properties.Settings.Default.RutaEmpresaADM = empresasComercial1.aliasbdd; RegConcepto Factura = (RegConcepto)comboBox1.SelectedItem; Properties.Settings.Default.Concepto = Factura.Codigo.Trim(); RegConcepto Pedido = (RegConcepto)comboBox2.SelectedItem; Properties.Settings.Default.ConceptoP = Pedido.Codigo.Trim(); Properties.Settings.Default.Save(); string archivo = botonExcel1.mRegresarNombre(); string lrespuesta = lrn.mLLenarInfoPedidosFacturas(archivo); if (lrespuesta == "") { long folio = 0; bool incluyetimbrado = true; lrn.mGrabarDoctosComercial(0, ref folio, 1, 0, 0);; if (listaerrores.Count != 0) { MessageBox.Show("Existen errores por favor revise bitacora"); mGrabaErroresBitacora(); //MessageBox.Show(lista[0].ToString()); } else { MessageBox.Show("Proceso Terminado"); } } else { MessageBox.Show(lrespuesta); } }
private void button1_Click(object sender, EventArgs e) { progressBar1.Value = 0; listaerrores.Clear(); Properties.Settings.Default.Pass = textBox3.Text; Properties.Settings.Default.RutaEmpresaADM = empresasComercial1.aliasbdd; RegConcepto Factura = (RegConcepto)comboBox1.SelectedItem; Properties.Settings.Default.Concepto = Factura.Codigo.Trim(); /* * Properties.Settings.Default.serverOrigen = txtServer.Text; * Properties.Settings.Default.databaseOrigen = txtBD.Text; * Properties.Settings.Default.userOrigen = txtUser.Text; * Properties.Settings.Default.passwordO = txtPass.Text; */ Properties.Settings.Default.databaseOrigen = "DSN=" + textBox1.Text + ";UID=Reports;Pwd=;"; Properties.Settings.Default.DSN = textBox1.Text; Properties.Settings.Default.Save(); //string archivo = textBox1.Text; int lFolioInicial = int.Parse(textBox2.Text); int lFolioFinal = int.Parse(textBox4.Text); lrn.mLlenarinfoMicroplane(lFolioInicial, lFolioFinal); List <string> lista = new List <string>(); long lultimofolio = 0; if (checkBox1.Checked == true) { bool incluyetimbrado = true; //lista = lrn.mGrabarDoctosComercial(1); lrn.mGrabarDoctosComercial(1, ref lultimofolio, 0, 1); if (listaerrores.Count != 0) { MessageBox.Show("Existen errores por favor revise bitacora"); mGrabaErroresBitacora(); } else { MessageBox.Show("Proceso Terminado"); } Properties.Settings.Default.UltimoFolio = lultimofolio.ToString(); textBox2.Text = lultimofolio.ToString(); Properties.Settings.Default.Save(); } else { MessageBox.Show("Se leyeron " + lrn.lbd._RegDoctos.Count() + " documentos"); Properties.Settings.Default.UltimoFolio = lultimofolio.ToString(); textBox2.Text = lultimofolio.ToString(); Properties.Settings.Default.Save(); } }