private void button4_Click(object sender, EventArgs e) { var index = new IndexForm(); this.Hide(); index.Show(); }
private void buttonClose_Click(object sender, EventArgs e) { //Environment.Exit(0); Close(); IndexForm indexForm = new IndexForm(); indexForm.Show(); }
public void CarregarTemplate() { IndexForm inicio = new IndexForm(); inicio.TopLevel = false; if (panel2.Controls.Count != 0) { panel2.Controls.RemoveAt(0); } panel2.Controls.Add(inicio); inicio.Show(); }
private void button1_Click(object sender, EventArgs e) { DateTime fechaRendicion = ConfiguracionFecha.FechaSistema; //Valido si ya hubo una rendicion en este periodo para esta empresa string empresaCuit = ((ComboBoxItemStringValue)comboEmpresas.SelectedItem).Value; decimal porcentajeComision; if (this.facturas.Count > 0) { if (decimal.TryParse(txtPorcentaje.Text, out porcentajeComision) && porcentajeComision >= 0 && porcentajeComision <= 100) { bool yaHuboRendicion = RendicionesRepository.ExisteRendicionParaEmpresaYPeriodo(empresaCuit, fechaRendicion); if (!yaHuboRendicion) { Rendicion rend = new Rendicion(empresaCuit, facturas, fechaRendicion, porcentajeComision); try { RendicionesRepository.AgregarRendicion(rend); MessageBox.Show("Se ha realizado la rendición correctamente"); this.Hide(); var indexFacturasForm = new IndexForm(); indexFacturasForm.Show(); } catch (Exception exce) { MessageBox.Show("Hubo un error al realizar la rendicion. Intente nuevamente"); } } else { MessageBox.Show("Ya se realizó una rendición para esta empresa en este periodo"); } } else { MessageBox.Show("Ingrese un valor valido para el porcentaje"); } } else { MessageBox.Show("No se puede realizar una rendicion sin facturas asociadas"); } }
private void MstPatientForm_FormClosing(object sender, FormClosingEventArgs e) { IndexForm indexForm = new IndexForm(); indexForm.Show(); }