5
Answers

Sumation Error

Hello Team,

Am trying to sum up the quantity and Total Amount in my dataTable footer, but is showing underline red, how do I modified the code to to perform this sumation and the total should only display the Quantity and TotalAmount at the footer after a date range is selected such as StartDate to EndDate , 

 public ActionResult getNewOrder()
        {
            using (db = new ASPNETMASTERPOSTEntities())
            {
                var dataList = db.tblCustomers.Include("tblOrders");
                var modifiedData = dataList.AsEnumerable().SelectMany(x => x.tblOrders.Select(d => new OrderViewModel
                {
                    CustomerId = x.CustomerId,
                    CustomerName = d.tblCustomer.CustomerName,
                    PhoneNo = d.tblCustomer.PhoneNo,
                    OrderDate = d.tblCustomer.OrderDate,
                    CategoryName = d.CategoryName,
                    ProductName = d.ProductName,
                    Quantity = d.Sum(x=>x.tblOrders.Quantity),
                    UnitPrice = d.UnitPrice,
                    TotalAmount = d.Sum(x => x.tblOrders.TotalAmount),
                    OrderId = d.OrderId
                })).ToList();
                return Json(modifiedData, JsonRequestBehavior.AllowGet);
            }
        }

Answers (5)
6
Mahesh Chand

Mahesh Chand

1 272.2k 241.8m 1y

In college, I worked on Ada and Lisp, two languages focused on AI dev. AI was more like an evolution of computer science and many contributed to the evolution. Here is what ChatGPT tells me:

The invention of artificial intelligence (AI) is not attributed to a single individual, but rather to a group of pioneering scientists, mathematicians, and theorists across several decades. Key figures and milestones in the early development of AI include:

  1. Alan Turing (1912-1954): Often considered the father of theoretical computer science and artificial intelligence. His 1950 paper, "Computing Machinery and Intelligence," proposed the idea of a machine that could simulate any human intelligence, leading to the famous Turing Test for evaluating AI.

  2. John McCarthy (1927-2011): An American computer scientist who coined the term "Artificial Intelligence" in 1955. He organized the famous Dartmouth Conference in 1956, which brought together researchers interested in neural networks, the study of intelligence, and the possibility of directly simulating intelligence.

  3. Marvin Minsky (1927-2016): An American cognitive scientist and co-founder of the Massachusetts Institute of Technology's AI laboratory, he made many contributions to AI, including theories on how to model the human mind and the development of robotic hands with tactile sensors.

  4. Herbert A. Simon (1916-2001) and Allen Newell (1927-1992): Their work on the Logic Theorist, a program considered by many to be the first AI program, was a significant milestone. They also contributed to the development of the General Problem Solver (GPS), a computer program designed to mimic human problem-solving.

Accepted
4
Sam Hobbs

Sam Hobbs

54 29.3k 2.1m 1y

Artificial Intelligence is a general term. More specific terms are Natural Language (people's language) recognition, knowledge bases, expert systems, pattern recognition (learning) and others.

Very many have contributed to AI. I think IBM is worth mentioning as a business that has developed AI very much but they are not the only ones by far. IBM's Watson is the only AI system that has competed on the TV show Jeopardy and it was able to perform better than two of the top human champions. The achievement included Natural Language recognition to recognize the "clues" (Jeopardy's version of questions) and a large expert system used by Watson to find the responses. ChatGPT is getting the most attention but IBM's systems are likely more capable.

3
Tahir Ansari

Tahir Ansari

257 7.5k 222.5k 1y

The concept of artificial intelligence (AI) has a long history, and it has been developed by numerous researchers and scientists over the years. The term "artificial intelligence" was coined in 1955 by John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon during the Dartmouth Conference. These researchers are often credited with founding the field of AI.