Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Inicial mp = new Inicial();

            mp.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        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();
                }
            }
        }
Exemplo n.º 3
0
        private void btnVolver_Click(object sender, EventArgs e)
        {
            Inicial ini = new Inicial();

            ini.Show();
            this.Dispose();
        }
Exemplo n.º 4
0
        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 }));
        }
Exemplo n.º 5
0
        private void btnCancelar_Click(object sender, EventArgs e)
        {
            Inicial inicial = new Inicial();

            this.Hide();
            inicial.Show();
        }
Exemplo n.º 6
0
 private void addLinha()
 {
     tb.Rows.Add(new String[] { Inicial.ToString(),
                                funcao(Inicial).ToString(),
                                derivada(Inicial).ToString(),
                                (funcao(Inicial) / derivada(Inicial)).ToString(),
                                Parada.ToString() });
     iteracao++;
 }
Exemplo n.º 7
0
        protected override int GetHashCodeCore()
        {
            unchecked
            {
                var hashCode = Inicial.GetHashCode();
                hashCode = (hashCode * 397) ^ Final.GetHashCode();

                return(hashCode);
            }
        }
Exemplo n.º 8
0
 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++;
 }
Exemplo n.º 9
0
 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();
         }
     }
 }
Exemplo n.º 10
0
        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();
        }
Exemplo n.º 11
0
        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");
        }
Exemplo n.º 12
0
        private void Tarifario_FormClosing(object sender, FormClosingEventArgs e)
        {
            Inicial ini = new Inicial();

            ini.Show();
        }
Exemplo n.º 13
0
 private void button1_Click(object sender, EventArgs e)
 {
     mp = new Inicial();
     mp.Show();
     this.Dispose();
 }
Exemplo n.º 14
0
        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");
                    }
                }
            }
        }
Exemplo n.º 15
0
 private void btnSalir_Click(object sender, EventArgs e)
 {
     Inicial prev = new Inicial();
     prev.Show();
     this.Hide();
 }
Exemplo n.º 16
0
 public DefinePlano()
 {
     mp = new Inicial();
     InitializeComponent();
 }
Exemplo n.º 17
0
        public DadosRecolhidos()
        {
            mp = new Inicial();

            InitializeComponent();
        }
Exemplo n.º 18
0
 public Login(Inicial frm)
 {
     this.frm = frm;
     InitializeComponent();
 }