Ejemplo n.º 1
0
        public IHttpActionResult tryReHire(int ced1, int ced2, int ced3)
        {
            /*parsea la cedula y agrega los 0 pertinentes*/
            string cedula;
            string cedula2 = ced2.ToString();
            string cedula3 = ced3.ToString();

            while (cedula2.Length < 4)
            {
                cedula2 = '0' + cedula2;
            }
            while (cedula3.Length < 4)
            {
                cedula3 = '0' + cedula3;
            }
            cedula = ced1.ToString() + cedula2 + cedula3;
            int ced = Int32.Parse(cedula);

            bool exito = Trabajador.existeTrab(ced);

            return(Json(exito));
        }