Ejemplo n.º 1
0
        public ActionResult Index()
        {
            var model = new ImportNormViewModel();

            //var list = new List<Person>()
            //{
            //    new Person() {Name = "Nguyen Van Name1", Age = 10},
            //    new Person() {Name = "Le Van Name2", Age = 15},
            //    new Person() {Name = "Tran Van Name3", Age = 20}
            //};

            //var myList = list.Where(x => x != null && x.Age >= 15).Select(x => x.Name.Split(' ').Take(x.Name.Length - 1).Last());
            //var myList2 = list.Where(x => x != null && x.Age >= 15 && x.Name.StartsWith("Le")).Select(x => x.Name.Split(' ').Take(x.Name.Length - 1).Last());
            //var myList3 = list.Where(x => x != null && x.Age >= 15 && x.Name.EndsWith("Name3")).Select(x => x.Name.Split(' ').Take(x.Name.Length - 1).Last());

            //foreach (var firstName in myList)
            //{
            //    Debug.WriteLine(firstName);
            //}

            //foreach (var firstName in myList2)
            //{
            //    Debug.WriteLine(firstName);
            //}

            //foreach (var firstName in myList3)
            //{
            //    Debug.WriteLine(firstName);
            //}

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult TestPost(ImportNormViewModel model)
        {
            //TODO: Code for business here

            return(Json(new
            {
                status = "OK",
                message = Message.IMPORT_Excel_File_Corrupt
            }, JsonRequestBehavior.AllowGet));
        }