コード例 #1
0
        public ActionResult Par(int id)
        {
            var client  = new RestClient("http://localhost:18080/IRMCJEE-web/IRMC/event/one?idEv=" + id);
            var request = new RestRequest(Method.GET);

            request.AddHeader("Content-type", "application/json");


            IRestResponse <List <_event> > u = client.Execute <List <_event> >(request);


            eventt = u.Data[0];

            fs.Participer(eventt.id_Ev);
            Data.user uss = new Data.user();
            IEnumerable <Data.user> ev = userSe.FindById(1);

            foreach (Data.user r in ev)
            {
                if (r.id == 1)
                {
                    uss = r;
                    break;
                }
                break;
            }


            fs.SendEmail(uss);
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public bool add(user us)
        {
            string query = "INSERT INTO Customer (cususername, email, address, password, name, phone) VALUES ('" + us.username + "', '" + us.email + "', '" + us.address + "', '" + us.password + "', '" + us.name + "', '" + us.phone + "')";

            return(con.add(query));
        }
コード例 #3
0
        /* public string insertcus(Customer cus)
         * {
         *   data.Customers.InsertOnSubmit(cus);
         *   data.SubmitChanges();
         *   return "REgistered!"+cus.address;
         * }*/

        public object login(user us)
        {
            string query = "Select * From Customer where cususername = '******' and password = '******'";

            return(con.login(query));
        }
コード例 #4
0
        public System.Data.DataTable gettrtable(user us)
        {
            string query = "Select Id as [Order ID], taken as [Pending], complete as [Delivered], total as [Total Price] from  Orders where cususername = '******' and total >0";

            return(con.gettable(query));
        }
コード例 #5
0
        public bool addtochart(Products pd, user us)
        {
            string qchart = "INSERT INTO Chart(id,productid,quantity,price)VALUES(@id," + pd.productid + "," + pd.quantity + "," + pd.price + ");";

            return(con.addtochart(qchart));
        }