private void button2_Click(object sender, EventArgs e) { Inicial mp = new Inicial(); mp.Show(); this.Hide(); }
static void Main(string[] args) { { const int Anos = 3, Anoinicio = 2010; const double Taxamin = 2, Taxamax = 3, Inicial = 1500; double Acumu = 0; Console.Write((Inicial.ToString() + "EUR").PadRight(8)); for (double Taxa = Taxamin; Taxa <= Taxamax; Taxa += 0.5) { Console.Write("{0,13:P1}", Taxa / 100); } Console.WriteLine(); for (int N = 1; N <= Anos; N++) { Console.Write((Anoinicio + N).ToString().PadRight(8)); for (double Taxa = Taxamin; Taxa <= Taxamax; Taxa += 0.5) { Acumu = Math.Round(Inicial * Math.Pow((1 + Taxa / 100), N), 2); Console.Write("{0, 13:F2}", Acumu); } Console.WriteLine(); } } }
private void btnVolver_Click(object sender, EventArgs e) { Inicial ini = new Inicial(); ini.Show(); this.Dispose(); }
public ActionResult SaveDropzoneJsUploadedFiles() { foreach (string fileName in Request.Files) { HttpPostedFileBase file = Request.Files[fileName]; string result = new StreamReader(file.InputStream).ReadToEnd(); XmlDocument doc = new XmlDocument(); doc.LoadXml(result); Inicial datos_generales = new Inicial(); string json = JsonConvert.SerializeXmlNode(doc); json = json.Replace("?", ""); json = json.Replace("@", ""); json = json.Replace("cfdi:", ""); json = json.Replace("tfd:", ""); json = json.Replace("nomina12:", ""); json = json.Replace("pago10:", ""); datos_generales = JsonConvert.DeserializeObject <Inicial>(json); var rfc_e = db.rfc_lista_negra.Where(x => x.rfc == datos_generales.Comprobante.Emisor.Rfc).ToList(); var rfc_r = db.rfc_lista_negra.Where(x => x.rfc == datos_generales.Comprobante.Receptor.Rfc).ToList(); } return(Json(new { Message = string.Empty })); }
private void btnCancelar_Click(object sender, EventArgs e) { Inicial inicial = new Inicial(); this.Hide(); inicial.Show(); }
private void addLinha() { tb.Rows.Add(new String[] { Inicial.ToString(), funcao(Inicial).ToString(), derivada(Inicial).ToString(), (funcao(Inicial) / derivada(Inicial)).ToString(), Parada.ToString() }); iteracao++; }
protected override int GetHashCodeCore() { unchecked { var hashCode = Inicial.GetHashCode(); hashCode = (hashCode * 397) ^ Final.GetHashCode(); return(hashCode); } }
private void addLinha() { tb.Rows.Add(new String[] { Inicial.ToString(), Final.ToString(), Medio.ToString(), funcao(Inicial).ToString(), funcao(Final).ToString(), funcao(Medio).ToString(), Parada.ToString() }); iteracao++; }
private void btnCancelar_Click(object sender, EventArgs e) { if (editing) { if (ejecutaAdmin) { if (tipoUsuario == 3) { UberFrba.Abm_Cliente.AbmCliente abmCliente = new Abm_Cliente.AbmCliente(); this.Hide(); abmCliente.Show(); } else { UberFrba.Abm_Chofer.AbmChofer abmChofer = new Abm_Chofer.AbmChofer(); this.Hide(); abmChofer.Show(); } } else { this.Hide(); } } else { if (altaConRol) { if (tipoUsuario == 3) { UberFrba.Abm_Cliente.AbmCliente abmCliente = new Abm_Cliente.AbmCliente(); this.Hide(); abmCliente.Show(); } else { UberFrba.Abm_Chofer.AbmChofer abmChofer = new Abm_Chofer.AbmChofer(); this.Hide(); abmChofer.Show(); } } else { Inicial formInicial = new Inicial(); this.Hide(); formInicial.Show(); } } }
private void button2_Click(object sender, EventArgs e) { String t1 = textBox1.Text; String t3 = textBox3.Text; String t4 = textBox4.Text; int res = RestauranteDAO.updates(idRestaurante, t1, t3, t4); if (res == 0) { MessageBox.Show("Actualizações efectuadas"); } else { MessageBox.Show("Ocorreu algum erro"); } mp = new Inicial(); mp.Show(); this.Dispose(); }
private void newton_raphson(double precisao) { double ant = 0; iteracao = 0; Parada = 0; Medio = 0; do { Inicial = auxInicial; Medio = (funcao(Inicial) / derivada(Inicial)); auxInicial = auxInicial - Medio; Parada = Math.Abs(Inicial - ant); ant = Inicial; addLinha(); } while (Parada > precisao); rcText.AppendText("Raiz encontrada: " + Inicial.ToString() + " - Iterações necessárias: " + iteracao.ToString() + "\n"); }
private void Tarifario_FormClosing(object sender, FormClosingEventArgs e) { Inicial ini = new Inicial(); ini.Show(); }
private void button1_Click(object sender, EventArgs e) { mp = new Inicial(); mp.Show(); this.Dispose(); }
private void btnRegistrar_Click(object sender, EventArgs e) { int esChofer = 0; int esCliente = 0; bool huboErrorDato = false; bool errorYaExiste = false; List <string> lstErroresCampos = new List <string>(); List <string> lstErroresExistencia = new List <string>(); huboErrorDato = validarCampos(ref lstErroresCampos); if (huboErrorDato) { Validator.mostrarErrores(lstErroresCampos, ""); } else { Usuario usuarioNuevo = crearNuevoUsuario(ref esChofer, ref esCliente); errorYaExiste = verificarExistencia(ref lstErroresExistencia, usuarioNuevo); if (errorYaExiste) { Validator.mostrarErrores(lstErroresExistencia, ""); } else { List <SqlParameter> parameterList = cargarParametrosComunesQuery(usuarioNuevo); try { if (editing) { #region if editing bool continuar = true; if (!chkHabilitado.Checked && !ejecutaAdmin) { DialogResult dr = MessageBox.Show("Si se inhabilita saldrá automáticamente del sistema y tendrá que contactar al administrador para volver a ingresar. ¿Desea continuar?", "Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.No) { continuar = false; chkHabilitado.Checked = true; } } if (continuar) { if (chkHabilitado.Checked) { parameterList.Add(new SqlParameter("@habilitado", 1)); } else { parameterList.Add(new SqlParameter("@habilitado", 0)); } parameterList.Add(new SqlParameter("@idUsuario", userAEditar.Id_Usuario)); if (tipoUsuario == 3) { parameterList.Add(new SqlParameter("@codPost", usuarioNuevo.CodPost)); SQLHelper.ExecuteNonQuery("PR_editarCliente", CommandType.StoredProcedure, parameterList); } else if (tipoUsuario == 2) { SQLHelper.ExecuteNonQuery("PR_editarChofer", CommandType.StoredProcedure, parameterList); } MessageBox.Show("El usuario se ha modificado"); userAEditar = usuarioNuevo; if (ejecutaAdmin) { if (tipoUsuario == 3) { UberFrba.Abm_Cliente.AbmCliente abmCliente = new Abm_Cliente.AbmCliente(); this.Hide(); abmCliente.Show(); } else if (tipoUsuario == 2) { UberFrba.Abm_Chofer.AbmChofer abmChofer = new Abm_Chofer.AbmChofer(); this.Hide(); abmChofer.Show(); } } else { if (usuarioNuevo.Habilitado) { this.Hide(); } else { Inicial frmInicial = new Inicial(); frmPrincipal.Close(); frmInicial.Show(); this.Close(); } } } #endregion } else { parameterList.Add(new SqlParameter("@esChofer", esChofer)); parameterList.Add(new SqlParameter("@esCliente", esCliente)); parameterList.Add(new SqlParameter("@codPost", usuarioNuevo.CodPost)); SQLHelper.ExecuteNonQuery("PR_altaUsuario", CommandType.StoredProcedure, parameterList); MessageBox.Show("El usuario se ha registrado correctamente"); if (altaConRol) { if (rolAlta == 3) { UberFrba.Abm_Cliente.AbmCliente abmCliente = new Abm_Cliente.AbmCliente(); this.Hide(); abmCliente.Show(); } else if (rolAlta == 2) { UberFrba.Abm_Chofer.AbmChofer abmChofer = new Abm_Chofer.AbmChofer(); this.Hide(); abmChofer.Show(); } } else { Inicial inicialForm = new Inicial(); this.Hide(); inicialForm.Show(); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); //MessageBox.Show("Hubo un error registrando el usuario. Revise los datos ingresados e intente de nuevo"); } } } }
private void btnSalir_Click(object sender, EventArgs e) { Inicial prev = new Inicial(); prev.Show(); this.Hide(); }
public DefinePlano() { mp = new Inicial(); InitializeComponent(); }
public DadosRecolhidos() { mp = new Inicial(); InitializeComponent(); }
public Login(Inicial frm) { this.frm = frm; InitializeComponent(); }